]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
authorcbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info>
Mon, 8 Aug 2016 17:50:01 +0000 (13:50 -0400)
committercbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info>
Mon, 8 Aug 2016 17:50:01 +0000 (13:50 -0400)
keyboards/clueboard2/Makefile [deleted file]
keyboards/clueboard2/clueboard2.c [deleted file]
keyboards/planck/keymaps/jeebak/keymap.c
keyboards/planck/keymaps/jeebak/readme.md
quantum/keymap_extras/keymap_cyrillic.h [deleted file]
quantum/keymap_extras/keymap_russian.h [new file with mode: 0644]
quantum/keymap_extras/keymap_unicode_cyrillic.h [new file with mode: 0644]
tmk_core/avr.mk

diff --git a/keyboards/clueboard2/Makefile b/keyboards/clueboard2/Makefile
deleted file mode 100644 (file)
index e9367a9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no  # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes  # Console for debug(+400)
-COMMAND_ENABLE ?= yes    # Commands for debug and configuration
-NKRO_ENABLE ?= yes             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE ?= no   # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality (+1150)
-MIDI_ENABLE ?= no              # MIDI controls
-AUDIO_ENABLE ?= no
-UNICODE_ENABLE ?= no           # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-
-ifndef QUANTUM_DIR
-       include ../../Makefile
-endif
diff --git a/keyboards/clueboard2/clueboard2.c b/keyboards/clueboard2/clueboard2.c
deleted file mode 100644 (file)
index d78ffed..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "clueboard2.h"
-
-void matrix_init_kb(void) {
-       // put your keyboard start-up code here
-       // runs once when the firmware starts up
-       matrix_init_user();
-       led_init_ports();
-
-    // JTAG disable for PORT F. write JTD bit twice within four cycles.
-    MCUCR |= (1<<JTD);
-    MCUCR |= (1<<JTD);
-};
-
-void led_init_ports() {
-    // * Set our LED pins as output
-    DDRB |= (1<<4);
-}
-
-void led_set_kb(uint8_t usb_led) {
-    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
-        // Turn capslock on
-        PORTB |= (1<<4);
-    } else {
-        // Turn capslock off
-        PORTB &= ~(1<<4);
-    }
-}
-
-/* Clueboard 2.0 LED locations:
- *
- * Capslock: B4, pull high to turn on
- * LCtrl: Shared with Capslock, DO NOT INSTALL LED'S IN BOTH
- * Page Up: B7, pull high to turn on
- * Escape: D6, pull high to turn on
- * Arrows: D4, pull high to turn on
- */
-
-void backlight_init_ports(void) {
-    print("init_backlight_pin()\n");
-    // Set our LED pins as output
-    DDRD |= (1<<6); // Esc
-    DDRB |= (1<<7); // Page Up
-    DDRD |= (1<<4); // Arrows
-
-    // Set our LED pins low
-    PORTD &= ~(1<<6); // Esc
-    PORTB &= ~(1<<7); // Page Up
-    PORTD &= ~(1<<4); // Arrows
-}
-
-void backlight_set(uint8_t level) {
-    if ( level == 0 ) {
-        // Turn off light
-        PORTD |= (1<<6); // Esc
-        PORTB |= (1<<7); // Page Up
-        PORTD |= (1<<4); // Arrows
-    } else {
-        // Turn on light
-        PORTD &= ~(1<<6); // Esc
-        PORTB &= ~(1<<7); // Page Up
-        PORTD &= ~(1<<4); // Arrows
-    }
-}
index ec142ecbb53d911daa33c7aa91a8ec05fa535198..cb7ccb58842f919a76bdcae9669dc1cd17570a51 100644 (file)
@@ -21,9 +21,10 @@ extern keymap_config_t keymap_config;
 #define _RAISE 4
 #define _PLOVER 5
 #define _TOUCHCURSOR 6
-#define _MOUSE 7
+#define _MOUSECURSOR 7
 #define _ADJUST 16
 
+// Keycodes
 enum planck_keycodes {
   QWERTY = SAFE_RANGE,
   COLEMAK,
@@ -35,24 +36,60 @@ enum planck_keycodes {
   EXT_PLV
 };
 
+enum macro_keycodes {
+  KC_ALT_TAB,
+  KC_CMD_TAB,
+  KC_CTL_TAB,
+  KC_CMD_SLSH,
+  KC_AG_FIND,
+  KC_AG_AGAIN,
+  KC_AG_UNDO,
+  KC_AG_CUT,
+  KC_AG_COPY,
+  KC_AG_PASTE,
+  KC_AG_DESK_L,
+  KC_AG_DESK_R,
+  KC_AG_TAB_C,
+  KC_AG_TAB_N,
+  KC_AG_TAB_R,
+};
+
 // Fillers to make layering more clear
 #define _______ KC_TRNS
 #define XXXXXXX KC_NO
 
 // Custom macros
 #define CTL_ESC     CTL_T(KC_ESC)               // Tap for Esc, hold for Ctrl
-#define LT_TC       LT(_TOUCHCURSOR, KC_SPC)    // L-ayer T-ap T-ouch C-ursor
-//                  ^-- Requires KC_TRNS / _______ for the trigger key in the destination layer
 #define SFT_ENT     SFT_T(KC_ENT)               // Tap for Enter, hold for Shift
-#define LT_ML       LT(_MOUSE, KC_A)            // L-ayer T-ap M-ouse C-ursor (on A)
+#define HPR_TAB     ALL_T(KC_TAB)               // Tap for Tab, hold for Hyper
+#define GUI_SEM     GUI_T(KC_SCLN)              // Tap for Semicolon, hold for GUI
+#define ALT_QUO     ALT_T(KC_QUOT)              // Tap for Quote, hold for Alt
+// Requires KC_TRNS/_______ for the trigger key in the destination layer
+#define LT_TC       LT(_TOUCHCURSOR, KC_SPC)    // L-ayer T-ap T-ouch C-ursor
+#define LT_MC(kc)   LT(_MOUSECURSOR, kc)        // L-ayer T-ap M-ouse C-ursor
+#define ALT_TAB     M(KC_ALT_TAB)               // Macro for Alt-Tab
+#define CMD_TAB     M(KC_CMD_TAB)               // Macro for Cmd-Tab
+#define CTL_TAB     M(KC_CTL_TAB)               // Macro for Ctl-Tab
+#define CMD_SLSH    M(KC_CMD_SLSH)              // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility)
+#define AG_FIND     M(KC_AG_FIND)               // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings
+#define AG_AGAIN    M(KC_AG_AGAIN)
+#define AG_UNDO     M(KC_AG_UNDO)
+#define AG_CUT      M(KC_AG_CUT)
+#define AG_COPY     M(KC_AG_COPY)
+#define AG_PASTE    M(KC_AG_PASTE)
+#define AG_D_L      M(KC_AG_DESK_L)             // For Virtual Desktop Switching: Left, and
+#define AG_D_R      M(KC_AG_DESK_R)             //                                Right
+#define AG_T_C      M(KC_AG_TAB_C)              // For Chrome, etc. Tab Close,
+#define AG_T_N      M(KC_AG_TAB_N)              //                  Tab New, and
+#define AG_T_R      M(KC_AG_TAB_R)              //                  Tab Reopen Closed
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 /* Qwerty
  * ,-----------------------------------------------------------------------------------------.
- * | Tab      |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  |  Bksp  |
+ * | Hyper/Tab|   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  |  Bksp  |
  * |----------+------+------+------+------+-------------+------+------+------+------+--------|
- * | Ctrl/Esc | ML/A |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |   "    |
+ * | Ctrl/Esc |   A  |   S  | MC/D |   F  |   G  |   H  |   J  |   K  |   L  |GUI/; | Alt/"  |
  * |----------+------+------+------+------+------|------+------+------+------+------+--------|
  * | Shift    |   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Sft/Ent |
  * |----------+------+------+------+------+------+------+------+------+------+------+--------|
@@ -60,17 +97,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------------'
  */
 [_QWERTY] = {
-  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
-  {CTL_ESC, LT_ML,   KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
+  {HPR_TAB, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
+  {CTL_ESC, KC_A,    KC_S, LT_MC(KC_D),KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    GUI_SEM, ALT_QUO},
   {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, SFT_ENT},
   {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER,   LT_TC,   LT_TC,   RAISE,   KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
 },
 
 /* Colemak
  * ,-----------------------------------------------------------------------------------------.
- * | Tab      |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  |  Bksp  |
+ * | Hyper/Tab|   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  |  Bksp  |
  * |----------+------+------+------+------+-------------+------+------+------+------+--------|
- * | Ctrl/Esc | ML/A |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |   "    |
+ * | Ctrl/Esc |   A  |   R  | MC/S |   T  |   D  |   H  |   N  |   E  |   I  |   O  |   "    |
  * |----------+------+------+------+------+------|------+------+------+------+------+--------|
  * | Shift    |   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |Sft/Ent |
  * |----------+------+------+------+------+------+------+------+------+------+------+--------|
@@ -78,17 +115,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------------'
  */
 [_COLEMAK] = {
-  {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
-  {CTL_ESC, LT_ML,   KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
+  {HPR_TAB, KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
+  {CTL_ESC, KC_A,    KC_R, LT_MC(KC_S),KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
   {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, SFT_ENT},
   {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER,   LT_TC,   LT_TC,   RAISE,   KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
 },
 
 /* Dvorak
  * ,-----------------------------------------------------------------------------------------.
- * | Tab      |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  |  Bksp  |
+ * | Hyper/Tab|   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  |  Bksp  |
  * |----------+------+------+------+------+-------------+------+------+------+------+--------|
- * | Ctrl/Esc | ML/A |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |   /    |
+ * | Ctrl/Esc |   A  |   O  | MC/E |   U  |   I  |   D  |   H  |   T  |   N  |   S  |   /    |
  * |----------+------+------+------+------+------|------+------+------+------+------+--------|
  * | Shift    |   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |Sft/Ent |
  * |----------+------+------+------+------+------+------+------+------+------+------+--------|
@@ -96,8 +133,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------------'
  */
 [_DVORAK] = {
-  {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_BSPC},
-  {CTL_ESC, LT_ML,   KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH},
+  {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_BSPC},
+  {CTL_ESC, KC_A,    KC_O, LT_MC(KC_E),KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH},
   {KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    SFT_ENT},
   {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER,   LT_TC,   LT_TC,   RAISE,   KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
 },
@@ -124,27 +161,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * ,-----------------------------------------------------------------------------------.
  * |   0  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
  * |------+------+------+------+------+-------------+------+------+------+------+------|
- * |   $  |   4  |   5  |   6  |   .  |   +  |   *  |   4  |   5  |   6  |   -  |  |   |
+ * |   $  |   4  |   5  |   6  |   .  |   +  |   .  |   4  |   5  |   6  |   *  |  |   |
  * |------+------+------+------+------+------|------+------+------+------+------+------|
- * |   =  |   7  |   8  |   9  |   0  |   -  |   /  |   1  |   2  |   3  |   .  |  \   |
+ * |   =  |   7  |   8  |   9  |   0  |   -  |   .  |   1  |   2  |   3  |   /  |  \   |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * |Brite |      |      |      |      |             |      | Prev | Stop | Slct | Mute |
  * `-----------------------------------------------------------------------------------'
  */
 [_RAISE] = {
   {KC_0,    KC_1,    KC_2,    KC_3,    KC_4,   KC_5,     KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_DLR,  KC_4,    KC_5,    KC_6,    KC_DOT, KC_PLUS,  KC_ASTR, KC_4,    KC_5,    KC_6,    KC_MINS, KC_PIPE},
-  {KC_EQL,  KC_7,    KC_8,    KC_9,    KC_0,   KC_MINS,  KC_SLSH, KC_1,    KC_2,    KC_3,    KC_DOT,  KC_BSLS},
+  {KC_DLR,  KC_4,    KC_5,    KC_6,    KC_DOT, KC_PLUS,  KC_DOT,  KC_4,    KC_5,    KC_6,    KC_ASTR, KC_PIPE},
+  {KC_EQL,  KC_7,    KC_8,    KC_9,    KC_0,   KC_MINS,  KC_DOT,  KC_1,    KC_2,    KC_3,    KC_SLSH, KC_BSLS},
   {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE}
 },
 
 /* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations
  * ,-----------------------------------------------------------------------------------.
- * |      |      |      |Shift | GUI  |  ~   |Insert| Home |  Up  | End  | Bksp |      |
+ * |AltTab|CmdTab|CtlTab| GUI  |Shift |  ~   |Insert| Home |  Up  | End  | Bksp |      |
  * |------+------+------+------+------+-------------+------+------+------+------+------|
- * |      | Alt  |Space |      | Find |Again | PgUp | Left | Down |Right |      |      |
+ * |      | Alt  |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L|Desk_R|
  * |------+------+------+------+------+------|------+------+------+------+------+------|
- * |      | Undo | Cut  | Copy |Paste |  `   | PgDn | Del  |      |      |      |      |
+ * |      | Undo | Cut  | Copy |Paste |  `   | PgDn | Del  |Tab_N |Tab_R |iTerm2|      |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * |      |      |      |      |      |             |      |      |      |      |      |
  * `-----------------------------------------------------------------------------------'
@@ -154,28 +191,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  */
 
 [_TOUCHCURSOR] = {
-  {_______, _______, _______, KC_LSFT, KC_LGUI, KC_TILD, KC_INS,  KC_HOME, KC_UP,   KC_END,  KC_BSPC, _______},
-  {_______, KC_LALT, KC_SPC,  _______, KC_FIND,KC_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______},
-  {_______, KC_UNDO, KC_CUT,  KC_COPY, KC_PASTE,KC_GRV,  KC_PGDN, KC_DEL,  _______, _______, _______, _______},
+  {ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS,  KC_HOME, KC_UP,   KC_END,  KC_BSPC, _______},
+  {_______, KC_LALT, KC_SPC,  AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L,  AG_D_R },
+  {_______, AG_UNDO, AG_CUT,  AG_COPY, AG_PASTE,KC_GRV,  KC_PGDN, KC_DEL,  AG_T_N,  AG_T_R,  CMD_SLSH,_______},
   {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
 },
 
 /* Mouse Layer
  * ,-----------------------------------------------------------------------------------.
- * |      |      |ACCL0 |ACCL1 |ACCL2 |ACCL2 |      |WHL_L |  Up  |WHL_R | BTN2 |      |
+ * |      |      |ACCL0 |      |      |      |      |WHL_L |  Up  |WHL_R | BTN2 |      |
  * |------+------+------+------+------+-------------+------+------+------+------+------|
- * |      |      |      | BTN3 | BTN1 | BTN4 |WHL_Up| Left | Down |Right |      |      |
+ * |      |ACCL2 | BTN2 |      | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 |
  * |------+------+------+------+------+------|------+------+------+------+------+------|
- * |      |      |      |      | BTN2 | BTN5 |WHL_Dn| BTN1 |      |      |      |      |
+ * |      |      |      |      | BTN3 |      |WHL_Dn| BTN1 |      |      | BTN3 |      |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * |      |      |      |      |      |             |      |      |      |      |      |
  * `-----------------------------------------------------------------------------------'
  */
 
-[_MOUSE] = {
-  {_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_ACL2, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______},
-  {_______, _______, _______, KC_BTN3, KC_BTN1, KC_BTN4, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______},
-  {_______, _______, _______, _______, KC_BTN2, KC_BTN5, KC_WH_D, KC_BTN1, _______, _______, _______, _______},
+[_MOUSECURSOR] = {
+  {_______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______},
+  {_______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5},
+  {_______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______},
   {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
 },
 
@@ -330,6 +367,64 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   return true;
 }
 
+/*
+ * Macro definition
+ */
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+    if (!eeconfig_is_enabled()) {
+      eeconfig_init();
+    }
+
+    bool use_cmd = true;    // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc.
+    // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in:
+    // quantum/quantum.c
+    if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) {
+      use_cmd = false;      // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc.
+    }
+
+    switch (id) {
+      case KC_ALT_TAB:
+        if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT),  D(TAB), END ) : MACRO( U(TAB), END )); }
+        else        { return (record->event.pressed ? MACRO( D(LGUI),  D(TAB), END ) : MACRO( U(TAB), END )); }
+      case KC_CMD_TAB:
+        if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI),  D(TAB), END ) : MACRO( U(TAB), END )); }
+        else        { return (record->event.pressed ? MACRO( D(LALT),  D(TAB), END ) : MACRO( U(TAB), END )); }
+
+      case KC_CTL_TAB:
+        return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END ));
+      case KC_CMD_SLSH:
+        return (record->event.pressed ? MACRO( D(LGUI),  D(SLSH),END ) : MACRO( U(SLSH),END ));
+
+      case KC_AG_FIND:
+        return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END );
+      case KC_AG_AGAIN:
+        return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END );
+      case KC_AG_UNDO:
+        return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END );
+      case KC_AG_CUT:
+        return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END );
+      case KC_AG_COPY:
+        return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END );
+      case KC_AG_PASTE:
+        return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END );
+
+      case KC_AG_DESK_L:
+        return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END );
+      case KC_AG_DESK_R:
+        return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END );
+
+      case KC_AG_TAB_C:
+        return use_cmd ? MACRODOWN( D(LGUI),            T(W), END ) : MACRODOWN( D(LCTRL),            T(W), END );
+      case KC_AG_TAB_N:
+        return use_cmd ? MACRODOWN( D(LGUI),            T(T), END ) : MACRODOWN( D(LCTRL),            T(T), END );
+      case KC_AG_TAB_R:
+        return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END );
+    }
+
+    return MACRO_NONE;
+}
+
 void matrix_init_user(void) {
     #ifdef AUDIO_ENABLE
         startup_user();
index eb8104379d3abaecfc7a81db034f0bc4ac225cbf..e1dd1dca511336b27ccde0d981c970674062a28c 100644 (file)
@@ -7,36 +7,47 @@ the exact changes. The diagrams in this README shows the highlights of the
 changes from the default mappings.
 
 I also decided to change all calls to `persistant_default_layer_set()` to
-`update_tri_layer()` since this is my personal perference.
+`default_layer_set()` since this is my personal perference.
+
+## Macros
+```
+#define ALT_TAB     M(KC_ALT_TAB)
+```
 
 ## Base Layers (Qwerty/Colemak/Dvorak)
 These base layers are mostly the same as the default mappings. The interesting
-changes are shown below. The `Ctrl/Esc`, mapped using `CTL_T(KC_ESC)` will emit
-an `Escape` when tapped, and act as a `Control` key when held. A `TODO` item is
-to see if it can also act as a `CapsLock` when double-tapped. The right shift
-key acts as `Enter` when tapped, and as a `Shift` key when held. The arrow
-keys, which have been moved to the
+changes are shown below.
+
+- The `Ctrl/Esc`, will emit an `Escape` when tapped, and act as a `Control` key when held,
+- `GUI/;` as `;` and `GUI`,
+- `Alt/"` as `"` and `Alt`,
+- `Sft/Ent` as `Enter` and `Shift`, and
+- `Hyper/Tab` as `Tab` and `Hyper`
+
+A `TODO` item is to see if it can also act as a `CapsLock` when double-tapped.
+The arrow keys, which have been moved to the
 [TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been
-replaced with the Media keys as shown. The `ML/A` key activates the Mouse layer
-when held, and emits an `A` when tapped.
+replaced with the Media keys as shown. The `MC/kc` key activates the
+`MouseCursor` layer when held, and emits the corresponding `kc` for its layer,
+when tapped.
 ```
   ,-----------------------------------------------------------------------------------------.
-  |          |      |      |      |      |      |      |      |      |      |      |        |
+  | Hyper/Tab|      |      |      |      |      |      |      |      |      |      |        |
   |----------+------+------+------+------+-------------+------+------+------+------+--------|
-  | Ctrl/Esc | ML/A |      |      |      |      |      |      |      |      |      |        |
+  | Ctrl/Esc |      |      |MC/kc |      |      |      |      |      |      |GUI/; | Alt/"  |
   |----------+------+------+------+------+------|------+------+------+------+------+--------|
   |          |      |      |      |      |      |      |      |      |      |      |Sft/Ent |
   |----------+------+------+------+------+------+------+------+------+------+------+--------|
   | PrntScrn | RGUI | Alt  | GUI  |Lower |  TC/Space   |Raise | Next | Vol- | Vol+ |  Play  |
   `-----------------------------------------------------------------------------------------'
-``` 
-  
+```
+
 ## Lower Layer (Symbols and Function Keys)
 The symbols and functions keys are essentially the same as the default mapping.
 The most notable changes are that the symbol keys from the `RAISE` layer have
 been moved here. The remaining Media keys replace those that are now on the
 base layers. The `BACKLIT` key has also been moved here.
-``` 
+```
   ,-----------------------------------------------------------------------------------.
   |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
   |------+------+------+------+------+-------------+------+------+------+------+------|
@@ -46,62 +57,71 @@ base layers. The `BACKLIT` key has also been moved here.
   |------+------+------+------+------+------+------+------+------+------+------+------|
   |Brite |      |      |      |      |             |      | Prev | Stop | Slct | Mute |
   `-----------------------------------------------------------------------------------'
-``` 
-  
+```
+
 ## Raise Layer (Numbers and Arithmetic Operators)
 All of the numbers and arithmetic operators are available on this layer. Some
 keys are duplicated for the convenience of their positions. The `0` and `$`
 keys at the far left are for quick access to beginning and end of line in vim.
-``` 
+```
   ,-----------------------------------------------------------------------------------.
   |   0  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
   |------+------+------+------+------+-------------+------+------+------+------+------|
-  |   $  |   4  |   5  |   6  |   .  |   +  |   *  |   4  |   5  |   6  |   -  |  |   |
+  |   $  |   4  |   5  |   6  |   .  |   +  |   .  |   4  |   5  |   6  |   *  |  |   |
   |------+------+------+------+------+------|------+------+------+------+------+------|
-  |   =  |   7  |   8  |   9  |   0  |   -  |   /  |   1  |   2  |   3  |   .  |  \   |
+  |   =  |   7  |   8  |   9  |   0  |   -  |   .  |   1  |   2  |   3  |   /  |  \   |
   |------+------+------+------+------+------+------+------+------+------+------+------|
   |Brite |      |      |      |      |             |      | Prev | Stop | Slct | Mute |
   `-----------------------------------------------------------------------------------'
-``` 
-  
+```
+
 ## TouchCursor layer plus personal customizations
 [TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key
 as the modifier, with the `IJKL` home row keys representing the inverted-T of
 the arrow keys. All of the default TouchCursor keymappings for the right hand
 are represented below. My personalizations include all of the keys shown for
-the left hand. Having the `Alt` and `Shift` keys readily accessible from the
-home row allows quick word jumps and highlighting when used in conjunction with
-the arrow keys. The `KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND,` and
-`KC_AGAIN` keycodes have been mapped but they don't seem to work on Mac.
-Presumably they'll work under Windows.
-``` 
+the left hand. Having the `Alt` and `Shift` keys (as well as the `Control` key
+from the base layers) readily accessible from the home row allows quick word
+jumps and highlighting when used in conjunction with the arrow keys. The
+`Alt-Tab` macro is not only useful under Windows, but also under Mac when used
+with alternative switchers like [HyperSwitch](https://bahoom.com/hyperswitch).
+The `Cmd-Tab` and `Ctrl-Tab` sequences are duplicated for easy access while in
+this layer. The `KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND,` and `KC_AGAIN`
+keycodes do not seem to work. There are macros in place that'll "automatically"
+choose the correct version (`Cmd-Tab` vs. `Alt-Tab`, `Cmd-C` vs. `Ctrl-C`,
+etc.) depending on which layout you've currently selected (`AG_NORM` or
+`AG_SWAP`) in the `_ADJUST` layer. The `Desk_L` and `Desk_R` macros are what I
+use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and
+`Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as
+Google Chrome.
+```
   ,-----------------------------------------------------------------------------------.
-  |      |      |      |Shift | GUI  |  ~   |Insert| Home |  Up  | End  | Bksp |      |
+  |AltTab|CmdTab|CtlTab|  GUI |Shift |  ~   |Insert| Home |  Up  | End  | Bksp |      |
   |------+------+------+------+------+-------------+------+------+------+------+------|
-  |      | Alt  |Space |      | Find |Again | PgUp | Left | Down |Right |      |      |
+  |      | Alt  |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L|Desk_R|
   |------+------+------+------+------+------|------+------+------+------+------+------|
-  |      | Undo | Cut  | Copy |Paste |  `   | PgDn | Del  |      |      |      |      |
+  |      | Undo | Cut  | Copy |Paste |  `   | PgDn | Del  |Tab_N |Tab_R |iTerm2|      |
   |------+------+------+------+------+------+------+------+------+------+------+------|
   |      |      |      |      |      |             |      |      |      |      |      |
   `-----------------------------------------------------------------------------------'
-``` 
+```
 
 ## Mouse Layer
 The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer.
-The `A` key is used to activate this layer. All 16 keycodes for the mouse from
-the `doc/keycode.txt` file are represented, and logically located, IMHO. The
-left and right click buttons are duplicated; on the right hand side, for a
-quick click here and there, and again on the left hand side for when the
+The `D` key (on QWERTY) is used to activate this layer. All 16 keycodes for the
+mouse from the `doc/keycode.txt` file are represented, and logically located,
+IMHO. The left and right click buttons are duplicated; on the right hand side,
+for a quick click here and there, and again on the left hand side for when the
 buttons need to be held for dragging things or highlighting text, thus allowing
 the right hand to be free to use the up/down/left/right actions.
-``` 
+```
   ,-----------------------------------------------------------------------------------.
-  |      |      |ACCL0 |ACCL1 |ACCL2 |ACCL2 |      |WHL_L |  Up  |WHL_R | BTN2 |      |
+  |      |      |ACCL0 |      |      |      |      |WHL_L |  Up  |WHL_R | BTN2 |      |
   |------+------+------+------+------+-------------+------+------+------+------+------|
-  |      |      |      | BTN3 | BTN1 | BTN4 |WHL_Up| Left | Down |Right |      |      |
+  |      |ACCL2 | BTN2 |      | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 |
   |------+------+------+------+------+------|------+------+------+------+------+------|
-  |      |      |      |      | BTN2 | BTN5 |WHL_Dn| BTN1 |      |      |      |      |
+  |      |      |      |      | BTN3 |      |WHL_Dn| BTN1 |      |      | BTN3 |      |
   |------+------+------+------+------+------+------+------+------+------+------+------|
   |      |      |      |      |      |             |      |      |      |      |      |
   `-----------------------------------------------------------------------------------'
-``` 
+```
diff --git a/quantum/keymap_extras/keymap_cyrillic.h b/quantum/keymap_extras/keymap_cyrillic.h
deleted file mode 100644 (file)
index d5390af..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-#ifndef KEYMAP_CYRILLIC_H
-#define KEYMAP_CYRILLIC_H
-
-#include "keymap.h"
-
-/*
- * This is based off of
- * https://en.wikipedia.org/wiki/Cyrillic_script
- */
-
-// Capital                   Char russian/ukrainian/bulgarian
-#define CY_A     UC(0x0410) // А  rus ukr bul
-#define CY_BE    UC(0x0411) // Б  rus ukr bul
-#define CY_VE    UC(0x0412) // В  rus ukr bul
-#define CY_GHE   UC(0x0413) // Г  rus ukr bul
-#define CY_GHEUP UC(0x0490) // Ґ      ukr
-#define CY_DE    UC(0x0414) // Д  rus ukr bul
-#define CY_DJE   UC(0x0402) // Ђ
-#define CY_GJE   UC(0x0403) // Ѓ
-#define CY_IE    UC(0x0415) // Е  rus ukr bul
-#define CY_IO    UC(0x0401) // Ё  rus
-#define CY_UIE   UC(0x0404) // Є      ukr
-#define CY_ZHE   UC(0x0416) // Ж  rus ukr bul
-#define CY_ZE    UC(0x0417) // З  rus ukr bul
-#define CY_DZE   UC(0x0405) // Ѕ
-#define CY_I     UC(0x0418) // И  rus ukr bul
-#define CY_B_U_I UC(0x0406) // І      ukr
-#define CY_YI    UC(0x0407) // Ї      ukr
-#define CY_SRT_I UC(0x0419) // Й  rus ukr bul
-#define CY_JE    UC(0x0408) // Ј
-#define CY_KA    UC(0x041a) // К  rus ukr bul
-#define CY_EL    UC(0x041b) // Л  rus ukr bul
-#define CY_LJE   UC(0x0409) // Љ
-#define CY_EM    UC(0x041c) // М  rus ukr bul
-#define CY_EN    UC(0x041d) // Н  rus ukr bul
-#define CY_NJE   UC(0x040a) // Њ
-#define CY_O     UC(0x041e) // О  rus ukr bul
-#define CY_PE    UC(0x041f) // П  rus ukr bul
-#define CY_ER    UC(0x0420) // Р  rus ukr bul
-#define CY_ES    UC(0x0421) // С  rus ukr bul
-#define CY_TE    UC(0x0422) // Т  rus ukr bul
-#define CY_TSHE  UC(0x040b) // Ћ
-#define CY_KJE   UC(0x040c) // Ќ
-#define CY_U     UC(0x0423) // У  rus ukr bul
-#define CY_SRT_U UC(0x040e) // Ў
-#define CY_EF    UC(0x0424) // Ф  rus ukr bul
-#define CY_HA    UC(0x0425) // Х  rus     bul
-#define CY_TSE   UC(0x0426) // Ц  rus ukr bul
-#define CY_CHE   UC(0x0427) // Ч  rus ukr bul
-#define CY_DZHE  UC(0x040f) // Џ
-#define CY_SHA   UC(0x0428) // Ш  rus ukr bul
-#define CY_SHCHA UC(0x0429) // Щ  rus ukr bul
-#define CY_HSIGN UC(0x042a) // Ъ  rus     bul
-#define CY_YERU  UC(0x042b) // Ы  rus
-#define CY_SSIGN UC(0x042c) // Ь  rus ukr bul
-#define CY_E     UC(0x042d) // Э  rus
-#define CY_YU    UC(0x042e) // Ю  rus ukr bul
-#define CY_YA    UC(0x042f) // Я  rus ukr bul
-// Important Cyrillic non-Slavic letters
-#define CY_PALOCHKA UC(0x04c0) // Ӏ
-#define CY_SCHWA UC(0x04d8) // Ә
-#define CY_GHE_S UC(0x0492) // Ғ
-#define CY_ZE_D  UC(0x0498) // Ҙ
-#define CY_ES_D  UC(0x04aa) // Ҫ
-#define CY_BR_KA UC(0x04a0) // Ҡ
-#define CY_ZHE_D UC(0x0496) // Җ
-#define CY_KA_D  UC(0x049a) // Қ
-#define CY_EN_D  UC(0x04a2) // Ң
-#define CY_ENGHE UC(0x04a4) // Ҥ
-#define CY_BRD_O UC(0x04e8) // Ө
-#define CY_STR_U UC(0x04ae) // Ү
-#define CY_S_U_S UC(0x04b0) // Ұ
-#define CY_SHHA  UC(0x04ba) // Һ
-#define CY_HA_D  UC(0x04b2) // Ҳ
-
-
-// Small
-#define CY_a     UC(0x0430) // a  rus ukr bul
-#define CY_be    UC(0x0431) // б  rus ukr bul
-#define CY_ve    UC(0x0432) // в  rus ukr bul
-#define CY_ghe   UC(0x0433) // г  rus ukr bul
-#define CY_gheup UC(0x0491) // ґ      ukr
-#define CY_de    UC(0x0434) // д  rus ukr bul
-#define CY_dje   UC(0x0452) // ђ
-#define CY_gje   UC(0x0453) // ѓ
-#define CY_ie    UC(0x0435) // е  rus ukr bul
-#define CY_io    UC(0x0451) // ё  rus
-#define CY_uie   UC(0x0454) // є      ukr
-#define CY_zhe   UC(0x0436) // ж  rus ukr bul
-#define CY_ze    UC(0x0437) // з  rus ukr bul
-#define CY_dze   UC(0x0455) // ѕ
-#define CY_i     UC(0x0438) // и  rus ukr bul
-#define CY_b_u_i UC(0x0456) // і      ukr
-#define CY_yi    UC(0x0457) // ї      ukr
-#define CY_srt_i UC(0x0439) // й  rus ukr bul
-#define CY_je    UC(0x0458) // ј
-#define CY_ka    UC(0x043a) // к  rus ukr bul
-#define CY_el    UC(0x043b) // л  rus ukr bul
-#define CY_lje   UC(0x0459) // љ
-#define CY_em    UC(0x043c) // м  rus ukr bul
-#define CY_en    UC(0x043d) // н  rus ukr bul
-#define CY_nje   UC(0x045a) // њ
-#define CY_o     UC(0x043e) // о  rus ukr bul
-#define CY_pe    UC(0x043f) // п  rus ukr bul
-#define CY_er    UC(0x0440) // р  rus ukr bul
-#define CY_es    UC(0x0441) // с  rus ukr bul
-#define CY_te    UC(0x0442) // т  rus ukr bul
-#define CY_tshe  UC(0x045b) // ћ
-#define CY_kje   UC(0x045c) // ќ
-#define CY_u     UC(0x0443) // у  rus ukr bul
-#define CY_srt_u UC(0x045e) // ў
-#define CY_ef    UC(0x0444) // ф  rus ukr bul
-#define CY_ha    UC(0x0445) // х  rus ukr bul
-#define CY_tse   UC(0x0446) // ц  rus ukr bul
-#define CY_che   UC(0x0447) // ч  rus ukr bul
-#define CY_dzhe  UC(0x045f) // џ
-#define CY_sha   UC(0x0448) // ш  rus ukr bul
-#define CY_shcha UC(0x0449) // щ  rus ukr bul
-#define CY_hsign UC(0x044a) // ъ  rus     bul
-#define CY_yeru  UC(0x044b) // ы  rus
-#define CY_ssign UC(0x044c) // ь  rus ukr bul
-#define CY_e     UC(0x044d) // э  rus
-#define CY_yu    UC(0x044e) // ю  rus ukr bul
-#define CY_ya    UC(0x044f) // я  rus ukr bul
-// Important Cyrillic non-Slavic letters
-#define CY_palochka UC(0x04cf) // ӏ
-#define CY_schwa UC(0x04d9) // ә
-#define CY_ghe_s UC(0x0493) // ғ
-#define CY_ze_d  UC(0x0499) // ҙ
-#define CY_es_d  UC(0x04ab) // ҫ
-#define CY_br_ka UC(0x04a1) // ҡ
-#define CY_zhe_d UC(0x0497) // җ
-#define CY_ka_d  UC(0x049b) // қ
-#define CY_en_d  UC(0x04a3) // ң
-#define CY_enghe UC(0x04a5) // ҥ
-#define CY_brd_o UC(0x04e9) // ө
-#define CY_str_u UC(0x04af) // ү
-#define CY_s_u_s UC(0x04b1) // ұ
-#define CY_shha  UC(0x04bb) // һ
-#define CY_ha_d  UC(0x04b3) // ҳ
-
-
-// Extra
-#define CY_slr_ve UC(0x1c80) // ᲀ CYRILLIC SMALL LETTER ROUNDED VE
-#define CY_ll_de  UC(0x1c81) // ᲁ CYRILLIC SMALL LETTER LONG-LEGGED DE
-#define CY_ZEMLYA UC(0xa640) // Ꙁ CYRILLIC CAPITAL LETTER ZEMLYA
-#define CY_zemlya UC(0xa641) // ꙁ CYRILLIC SMALL LETTER ZEMLYA
-#define CY_RV_DZE UC(0xa644) // Ꙅ CYRILLIC CAPITAL LETTER REVERSED DZE
-#define CY_rv_DZE UC(0xa645) // ꙅ CYRILLIC SMALL LETTER REVERSED DZE
-#define CY_slw_es UC(0x1c83) // ᲃ CYRILLIC SMALL LETTER WIDE ES
-#define CY_st_te  UC(0x1c84) // ᲄ CYRILLIC SMALL LETTER TALL TE
-#define CY_3l_te  UC(0x1c85) // ᲅ CYRILLIC SMALL LETTER THREE-LEGGED TE
-#define CY_thsign UC(0x1c86) // ᲆ CYRILLIC SMALL LETTER TALL HARD SIGN
-#define CY_YERUBY UC(0xa650) // Ꙑ CYRILLIC CAPITAL LETTER YERU WITH BACK YER
-#define CY_yeruby UC(0xa651) // ꙑ CYRILLIC SMALL LETTER YERU WITH BACK YER
-#define CY_RUBLE  UC(0x20bd) // ₽
-#define CY_NUMERO UC(0x2116) // №
-
-// The letters Zje and Sje are made for other letters and accent marks
-
-#endif
diff --git a/quantum/keymap_extras/keymap_russian.h b/quantum/keymap_extras/keymap_russian.h
new file mode 100644 (file)
index 0000000..237e9ab
--- /dev/null
@@ -0,0 +1,77 @@
+#ifndef KEYMAP_RUSSIAN_H
+#define KEYMAP_RUSSIAN_H
+
+#include "keymap.h"
+
+// Normal Chracters      // reg   SHIFT
+#define RU_A     KC_F    // а and А
+#define RU_BE    KC_COMM // б and Б
+#define RU_VE    KC_D    // в and В
+#define RU_GHE   KC_U    // г and Г
+#define RU_DE    KC_L    // д and Д
+#define RU_IE    KC_T    // е and Е
+#define RU_IO    KC_GRV  // ё and Ё
+#define RU_ZHE   KC_SCLN // ж and Ж
+#define RU_ZE    KC_P    // з and З
+#define RU_I     KC_B    // и and И
+#define RU_SRT_I KC_Q    // й and Й
+#define RU_KA    KC_R    // к and К
+#define RU_EL    KC_K    // л and Л
+#define RU_EM    KC_V    // м and М
+#define RU_EN    KC_Y    // н and Н
+#define RU_O     KC_J    // о and О
+#define RU_PE    KC_G    // п and П
+#define RU_ER    KC_H    // р and Р
+#define RU_ES    KC_C    // с and С
+#define RU_TE    KC_N    // т and Т
+#define RU_U     KC_E    // у and У
+#define RU_EF    KC_A    // ф and Ф
+#define RU_HA    KC_LBRC // х and Х
+#define RU_TSE   KC_W    // ц and Ц
+#define RU_CHE   KC_X    // ч and Ч
+#define RU_SHA   KC_I    // ш and Ш
+#define RU_SHCHA KC_O    // щ and Щ
+#define RU_HSIGN KC_RBRC // ъ and Ъ
+#define RU_YERU  KC_S    // ы and Ы
+#define RU_SSIGN KC_M    // ь and Ь
+#define RU_E     KC_QUOT // э and Э
+#define RU_YU    KC_DOT  // ю and Ю
+#define RU_YA    KC_Z    // я and Я
+
+#define RU_1     KC_1    // 1 and !
+#define RU_2     KC_2    // 2 and "
+#define RU_3     KC_3    // 3 and №
+#define RU_4     KC_4    // 4 and ;
+#define RU_5     KC_5    // 5 and %
+#define RU_6     KC_6    // 6 and :
+#define RU_7     KC_7    // 7 and ?
+#define RU_8     KC_8    // 8 and *
+#define RU_9     KC_9    // 9 and (
+#define RU_0     KC_0    // 0 and )
+
+#define RU_MINS  KC_MINS // - and _
+#define RU_EQL   KC_EQL  // = and +
+#define RU_BSLS  KC_BSLS // \ and /
+#define RU_DOT   KC_SLSH // . and ,
+
+// Shifted Chracters
+#define RU_EXLM LSFT(RU_1) // !
+#define RU_DQUT LSFT(RU_2) // "
+#define RU_NMRO LSFT(RU_3) // №
+#define RU_SCLN LSFT(RU_4) // ;
+#define RU_PERC LSFT(RU_5) // %
+#define RU_COLN LSFT(RU_6) // :
+#define RU_QUES LSFT(RU_7) // ?
+#define RU_ASTR LSFT(RU_8) // *
+#define RU_LPRN LSFT(RU_9) // (
+#define RU_RPRN LSFT(RU_0) // )
+
+#define RU_UNDR LSFT(RU_MINS) // _
+#define RU_PLUS LSFT(RU_EQL)  // +
+#define RU_SLSH LSFT(RU_BSLS) // /
+#define RU_COMM LSFT(RU_DOT)  // ,
+
+// Alt Gr-ed characters
+#define RU_RUBL RALT(RU_8) // ₽
+
+#endif
diff --git a/quantum/keymap_extras/keymap_unicode_cyrillic.h b/quantum/keymap_extras/keymap_unicode_cyrillic.h
new file mode 100644 (file)
index 0000000..a40626d
--- /dev/null
@@ -0,0 +1,163 @@
+#ifndef KEYMAP_CYRILLIC_H
+#define KEYMAP_CYRILLIC_H
+
+#include "keymap.h"
+
+/*
+ * This is based off of
+ * https://en.wikipedia.org/wiki/Cyrillic_script
+ *
+ * Unicode is iffy, a software implementation is preferred
+ */
+
+// Capital                   Char russian/ukrainian/bulgarian
+#define CY_A     UC(0x0410) // А  rus ukr bul
+#define CY_BE    UC(0x0411) // Б  rus ukr bul
+#define CY_VE    UC(0x0412) // В  rus ukr bul
+#define CY_GHE   UC(0x0413) // Г  rus ukr bul
+#define CY_GHEUP UC(0x0490) // Ґ      ukr
+#define CY_DE    UC(0x0414) // Д  rus ukr bul
+#define CY_DJE   UC(0x0402) // Ђ
+#define CY_GJE   UC(0x0403) // Ѓ
+#define CY_IE    UC(0x0415) // Е  rus ukr bul
+#define CY_IO    UC(0x0401) // Ё  rus
+#define CY_UIE   UC(0x0404) // Є      ukr
+#define CY_ZHE   UC(0x0416) // Ж  rus ukr bul
+#define CY_ZE    UC(0x0417) // З  rus ukr bul
+#define CY_DZE   UC(0x0405) // Ѕ
+#define CY_I     UC(0x0418) // И  rus ukr bul
+#define CY_B_U_I UC(0x0406) // І      ukr
+#define CY_YI    UC(0x0407) // Ї      ukr
+#define CY_SRT_I UC(0x0419) // Й  rus ukr bul
+#define CY_JE    UC(0x0408) // Ј
+#define CY_KA    UC(0x041a) // К  rus ukr bul
+#define CY_EL    UC(0x041b) // Л  rus ukr bul
+#define CY_LJE   UC(0x0409) // Љ
+#define CY_EM    UC(0x041c) // М  rus ukr bul
+#define CY_EN    UC(0x041d) // Н  rus ukr bul
+#define CY_NJE   UC(0x040a) // Њ
+#define CY_O     UC(0x041e) // О  rus ukr bul
+#define CY_PE    UC(0x041f) // П  rus ukr bul
+#define CY_ER    UC(0x0420) // Р  rus ukr bul
+#define CY_ES    UC(0x0421) // С  rus ukr bul
+#define CY_TE    UC(0x0422) // Т  rus ukr bul
+#define CY_TSHE  UC(0x040b) // Ћ
+#define CY_KJE   UC(0x040c) // Ќ
+#define CY_U     UC(0x0423) // У  rus ukr bul
+#define CY_SRT_U UC(0x040e) // Ў
+#define CY_EF    UC(0x0424) // Ф  rus ukr bul
+#define CY_HA    UC(0x0425) // Х  rus     bul
+#define CY_TSE   UC(0x0426) // Ц  rus ukr bul
+#define CY_CHE   UC(0x0427) // Ч  rus ukr bul
+#define CY_DZHE  UC(0x040f) // Џ
+#define CY_SHA   UC(0x0428) // Ш  rus ukr bul
+#define CY_SHCHA UC(0x0429) // Щ  rus ukr bul
+#define CY_HSIGN UC(0x042a) // Ъ  rus     bul
+#define CY_YERU  UC(0x042b) // Ы  rus
+#define CY_SSIGN UC(0x042c) // Ь  rus ukr bul
+#define CY_E     UC(0x042d) // Э  rus
+#define CY_YU    UC(0x042e) // Ю  rus ukr bul
+#define CY_YA    UC(0x042f) // Я  rus ukr bul
+// Important Cyrillic non-Slavic letters
+#define CY_PALOCHKA UC(0x04c0) // Ӏ
+#define CY_SCHWA UC(0x04d8) // Ә
+#define CY_GHE_S UC(0x0492) // Ғ
+#define CY_ZE_D  UC(0x0498) // Ҙ
+#define CY_ES_D  UC(0x04aa) // Ҫ
+#define CY_BR_KA UC(0x04a0) // Ҡ
+#define CY_ZHE_D UC(0x0496) // Җ
+#define CY_KA_D  UC(0x049a) // Қ
+#define CY_EN_D  UC(0x04a2) // Ң
+#define CY_ENGHE UC(0x04a4) // Ҥ
+#define CY_BRD_O UC(0x04e8) // Ө
+#define CY_STR_U UC(0x04ae) // Ү
+#define CY_S_U_S UC(0x04b0) // Ұ
+#define CY_SHHA  UC(0x04ba) // Һ
+#define CY_HA_D  UC(0x04b2) // Ҳ
+
+
+// Small
+#define CY_a     UC(0x0430) // a  rus ukr bul
+#define CY_be    UC(0x0431) // б  rus ukr bul
+#define CY_ve    UC(0x0432) // в  rus ukr bul
+#define CY_ghe   UC(0x0433) // г  rus ukr bul
+#define CY_gheup UC(0x0491) // ґ      ukr
+#define CY_de    UC(0x0434) // д  rus ukr bul
+#define CY_dje   UC(0x0452) // ђ
+#define CY_gje   UC(0x0453) // ѓ
+#define CY_ie    UC(0x0435) // е  rus ukr bul
+#define CY_io    UC(0x0451) // ё  rus
+#define CY_uie   UC(0x0454) // є      ukr
+#define CY_zhe   UC(0x0436) // ж  rus ukr bul
+#define CY_ze    UC(0x0437) // з  rus ukr bul
+#define CY_dze   UC(0x0455) // ѕ
+#define CY_i     UC(0x0438) // и  rus ukr bul
+#define CY_b_u_i UC(0x0456) // і      ukr
+#define CY_yi    UC(0x0457) // ї      ukr
+#define CY_srt_i UC(0x0439) // й  rus ukr bul
+#define CY_je    UC(0x0458) // ј
+#define CY_ka    UC(0x043a) // к  rus ukr bul
+#define CY_el    UC(0x043b) // л  rus ukr bul
+#define CY_lje   UC(0x0459) // љ
+#define CY_em    UC(0x043c) // м  rus ukr bul
+#define CY_en    UC(0x043d) // н  rus ukr bul
+#define CY_nje   UC(0x045a) // њ
+#define CY_o     UC(0x043e) // о  rus ukr bul
+#define CY_pe    UC(0x043f) // п  rus ukr bul
+#define CY_er    UC(0x0440) // р  rus ukr bul
+#define CY_es    UC(0x0441) // с  rus ukr bul
+#define CY_te    UC(0x0442) // т  rus ukr bul
+#define CY_tshe  UC(0x045b) // ћ
+#define CY_kje   UC(0x045c) // ќ
+#define CY_u     UC(0x0443) // у  rus ukr bul
+#define CY_srt_u UC(0x045e) // ў
+#define CY_ef    UC(0x0444) // ф  rus ukr bul
+#define CY_ha    UC(0x0445) // х  rus ukr bul
+#define CY_tse   UC(0x0446) // ц  rus ukr bul
+#define CY_che   UC(0x0447) // ч  rus ukr bul
+#define CY_dzhe  UC(0x045f) // џ
+#define CY_sha   UC(0x0448) // ш  rus ukr bul
+#define CY_shcha UC(0x0449) // щ  rus ukr bul
+#define CY_hsign UC(0x044a) // ъ  rus     bul
+#define CY_yeru  UC(0x044b) // ы  rus
+#define CY_ssign UC(0x044c) // ь  rus ukr bul
+#define CY_e     UC(0x044d) // э  rus
+#define CY_yu    UC(0x044e) // ю  rus ukr bul
+#define CY_ya    UC(0x044f) // я  rus ukr bul
+// Important Cyrillic non-Slavic letters
+#define CY_palochka UC(0x04cf) // ӏ
+#define CY_schwa UC(0x04d9) // ә
+#define CY_ghe_s UC(0x0493) // ғ
+#define CY_ze_d  UC(0x0499) // ҙ
+#define CY_es_d  UC(0x04ab) // ҫ
+#define CY_br_ka UC(0x04a1) // ҡ
+#define CY_zhe_d UC(0x0497) // җ
+#define CY_ka_d  UC(0x049b) // қ
+#define CY_en_d  UC(0x04a3) // ң
+#define CY_enghe UC(0x04a5) // ҥ
+#define CY_brd_o UC(0x04e9) // ө
+#define CY_str_u UC(0x04af) // ү
+#define CY_s_u_s UC(0x04b1) // ұ
+#define CY_shha  UC(0x04bb) // һ
+#define CY_ha_d  UC(0x04b3) // ҳ
+
+
+// Extra
+#define CY_slr_ve UC(0x1c80) // ᲀ CYRILLIC SMALL LETTER ROUNDED VE
+#define CY_ll_de  UC(0x1c81) // ᲁ CYRILLIC SMALL LETTER LONG-LEGGED DE
+#define CY_ZEMLYA UC(0xa640) // Ꙁ CYRILLIC CAPITAL LETTER ZEMLYA
+#define CY_zemlya UC(0xa641) // ꙁ CYRILLIC SMALL LETTER ZEMLYA
+#define CY_RV_DZE UC(0xa644) // Ꙅ CYRILLIC CAPITAL LETTER REVERSED DZE
+#define CY_rv_DZE UC(0xa645) // ꙅ CYRILLIC SMALL LETTER REVERSED DZE
+#define CY_slw_es UC(0x1c83) // ᲃ CYRILLIC SMALL LETTER WIDE ES
+#define CY_st_te  UC(0x1c84) // ᲄ CYRILLIC SMALL LETTER TALL TE
+#define CY_3l_te  UC(0x1c85) // ᲅ CYRILLIC SMALL LETTER THREE-LEGGED TE
+#define CY_thsign UC(0x1c86) // ᲆ CYRILLIC SMALL LETTER TALL HARD SIGN
+#define CY_YERUBY UC(0xa650) // Ꙑ CYRILLIC CAPITAL LETTER YERU WITH BACK YER
+#define CY_yeruby UC(0xa651) // ꙑ CYRILLIC SMALL LETTER YERU WITH BACK YER
+#define CY_RUBL   UC(0x20bd) // ₽
+#define CY_NMRO   UC(0x2116) // №
+
+// The letters Zje and Sje are made for other letters and accent marks
+
+#endif
index 6c03e1650e80e6e747f0f8755830092d982a0f54..b48173341a4b9930d9fbfc1910e670da0df797bf 100644 (file)
@@ -138,6 +138,11 @@ else
 endif
        dfu-programmer $(MCU) reset
 
+# Convert hex to bin.
+flashbin: $(BUILD_DIR)/$(TARGET).hex
+       $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
+       $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;
+       $(COPY) $(BUILD_DIR)/$(TARGET).bin FLASH.bin; 
 
 # Generate avr-gdb config/init file which does the following:
 #     define the reset signal, load the target file, connect to target, and set