diff options
| author | Erez Zukerman <ezuk@madmimi.com> | 2015-10-27 00:54:46 +0200 |
|---|---|---|
| committer | Erez Zukerman <ezuk@madmimi.com> | 2015-10-27 00:54:46 +0200 |
| commit | 0c47e8b008ccb6bfbb7051a5c2e4b0031dae0fa5 (patch) | |
| tree | 0f883338e928824d1940fe98f23a69d0e4194e20 /quantum/keymap_common.h | |
| parent | cc1c32671eb1eb43a87e55ac4ffa60b15115e48d (diff) | |
| download | qmk_firmware-0c47e8b008ccb6bfbb7051a5c2e4b0031dae0fa5.tar.gz qmk_firmware-0c47e8b008ccb6bfbb7051a5c2e4b0031dae0fa5.zip | |
[Jack & Erez] Comments + tiny updates and cleanup
Diffstat (limited to 'quantum/keymap_common.h')
| -rw-r--r-- | quantum/keymap_common.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 30ef9365a..b1df4eb0f 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h | |||
| @@ -72,33 +72,51 @@ extern const uint16_t fn_actions[]; | |||
| 72 | #define RGUI(kc) kc | 0x1800 | 72 | #define RGUI(kc) kc | 0x1800 |
| 73 | 73 | ||
| 74 | // Aliases for shifted symbols | 74 | // Aliases for shifted symbols |
| 75 | // Each key has a 4-letter code, and some have longer aliases too. | ||
| 76 | // While the long aliases are descriptive, the 4-letter codes | ||
| 77 | // make for nicer grid layouts (everything lines up), and are | ||
| 78 | // the preferred style for Quantum. | ||
| 75 | #define KC_TILD LSFT(KC_GRV) // ~ | 79 | #define KC_TILD LSFT(KC_GRV) // ~ |
| 76 | #define KC_TILDE KC_TILD | 80 | #define KC_TILDE KC_TILD |
| 81 | |||
| 77 | #define KC_EXLM LSFT(KC_1) // ! | 82 | #define KC_EXLM LSFT(KC_1) // ! |
| 78 | #define KC_EXCLAIM KC_EXLM | 83 | #define KC_EXCLAIM KC_EXLM |
| 84 | |||
| 79 | #define KC_AT LSFT(KC_2) // @ | 85 | #define KC_AT LSFT(KC_2) // @ |
| 80 | #define KC_HASH LSFT(KC_3) // # | 86 | #define KC_HASH LSFT(KC_3) // # |
| 87 | |||
| 81 | #define KC_DLR LSFT(KC_4) // $ | 88 | #define KC_DLR LSFT(KC_4) // $ |
| 82 | #define KC_DOLLAR KC_DLR | 89 | #define KC_DOLLAR KC_DLR |
| 90 | |||
| 83 | #define KC_PERC LSFT(KC_5) // % | 91 | #define KC_PERC LSFT(KC_5) // % |
| 84 | #define KC_PERCENT KC_PERC | 92 | #define KC_PERCENT KC_PERC |
| 93 | |||
| 85 | #define KC_CIRC LSFT(KC_6) // ^ | 94 | #define KC_CIRC LSFT(KC_6) // ^ |
| 86 | #define KC_CIRCUMFLEX KC_CIRC | 95 | #define KC_CIRCUMFLEX KC_CIRC |
| 96 | |||
| 87 | #define KC_AMPR LSFT(KC_7) // & | 97 | #define KC_AMPR LSFT(KC_7) // & |
| 88 | #define KC_AMPERSAND KC_AMPR | 98 | #define KC_AMPERSAND KC_AMPR |
| 99 | |||
| 89 | #define KC_ASTR LSFT(KC_8) // * | 100 | #define KC_ASTR LSFT(KC_8) // * |
| 90 | #define KC_ASTERISK KC_ASTR | 101 | #define KC_ASTERISK KC_ASTR |
| 102 | |||
| 91 | #define KC_LPRN LSFT(KC_9) // ( | 103 | #define KC_LPRN LSFT(KC_9) // ( |
| 92 | #define KC_LEFT_PAREN KC_LPRN | 104 | #define KC_LEFT_PAREN KC_LPRN |
| 105 | |||
| 93 | #define KC_RPRN LSFT(KC_0) // ) | 106 | #define KC_RPRN LSFT(KC_0) // ) |
| 94 | #define KC_RIGHT_PAREN KC_RPRN | 107 | #define KC_RIGHT_PAREN KC_RPRN |
| 108 | |||
| 95 | #define KC_UNDS LSFT(KC_MINS) // _ | 109 | #define KC_UNDS LSFT(KC_MINS) // _ |
| 96 | #define KC_UNDERSCORE KC_UNDS | 110 | #define KC_UNDERSCORE KC_UNDS |
| 111 | |||
| 97 | #define KC_PLUS LSFT(KC_EQL) // + | 112 | #define KC_PLUS LSFT(KC_EQL) // + |
| 113 | |||
| 98 | #define KC_LCBR LSFT(KC_LBRC) // { | 114 | #define KC_LCBR LSFT(KC_LBRC) // { |
| 99 | #define KC_LEFT_CURLY_BRACE KC_LCBR | 115 | #define KC_LEFT_CURLY_BRACE KC_LCBR |
| 116 | |||
| 100 | #define KC_RCBR LSFT(KC_RBRC) // } | 117 | #define KC_RCBR LSFT(KC_RBRC) // } |
| 101 | #define KC_RIGHT_CURLY_BRACE KC_RCBR | 118 | #define KC_RIGHT_CURLY_BRACE KC_RCBR |
| 119 | |||
| 102 | #define KC_PIPE LSFT(KC_SLSH) // | | 120 | #define KC_PIPE LSFT(KC_SLSH) // | |
| 103 | 121 | ||
| 104 | // Alias for function layers than expand past FN31 | 122 | // Alias for function layers than expand past FN31 |
| @@ -112,6 +130,9 @@ extern const uint16_t fn_actions[]; | |||
| 112 | 130 | ||
| 113 | #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) | 131 | #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) |
| 114 | 132 | ||
| 133 | // These affect the backlight (if your keyboard has one). | ||
| 134 | // We don't need to comment them out if your keyboard doesn't have a backlight, | ||
| 135 | // since they don't take up any space. | ||
| 115 | #define BL_ON 0x4009 | 136 | #define BL_ON 0x4009 |
| 116 | #define BL_OFF 0x4000 | 137 | #define BL_OFF 0x4000 |
| 117 | #define BL_0 0x4000 | 138 | #define BL_0 0x4000 |
| @@ -142,7 +163,7 @@ extern const uint16_t fn_actions[]; | |||
| 142 | // when: | 163 | // when: |
| 143 | // ON_PRESS = 1 | 164 | // ON_PRESS = 1 |
| 144 | // ON_RELEASE = 2 | 165 | // ON_RELEASE = 2 |
| 145 | // ON_BOTH = 3 | 166 | // Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. |
| 146 | #define TO(layer, when) (layer | 0x5100 | (when << 0x4)) | 167 | #define TO(layer, when) (layer | 0x5100 | (when << 0x4)) |
| 147 | 168 | ||
| 148 | // Momentary switch layer - 256 layer max | 169 | // Momentary switch layer - 256 layer max |
| @@ -153,7 +174,11 @@ extern const uint16_t fn_actions[]; | |||
| 153 | 174 | ||
| 154 | #define MIDI(n) (n | 0x6000) | 175 | #define MIDI(n) (n | 0x6000) |
| 155 | 176 | ||
| 156 | #define UNI(n) (n | 0x8000) | 177 | // For sending unicode codes. |
| 178 | // You may not send codes over 1FFF -- this supports most of UTF8. | ||
| 179 | // To have a key that sends out Œ, go UC(0x0152) | ||
| 180 | #define UNICODE(n) (n | 0x8000) | ||
| 181 | #define UC(n) UNICODE(n) | ||
| 157 | 182 | ||
| 158 | 183 | ||
| 159 | #endif | 184 | #endif |
