diff options
| author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
|---|---|---|
| committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
| commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
| tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/quantum_keycodes.h | |
| parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) | |
| download | qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.tar.gz qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.zip | |
clang-format changes
Diffstat (limited to 'quantum/quantum_keycodes.h')
| -rw-r--r-- | quantum/quantum_keycodes.h | 353 |
1 files changed, 176 insertions, 177 deletions
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index c112d76ba..f5dca02e6 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -17,13 +17,13 @@ | |||
| 17 | #define QUANTUM_KEYCODES_H | 17 | #define QUANTUM_KEYCODES_H |
| 18 | 18 | ||
| 19 | #ifndef MIDI_ENABLE_STRICT | 19 | #ifndef MIDI_ENABLE_STRICT |
| 20 | #define MIDI_ENABLE_STRICT 0 | 20 | # define MIDI_ENABLE_STRICT 0 |
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) | 23 | #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) |
| 24 | #ifndef MIDI_TONE_KEYCODE_OCTAVES | 24 | # ifndef MIDI_TONE_KEYCODE_OCTAVES |
| 25 | #define MIDI_TONE_KEYCODE_OCTAVES 3 | 25 | # define MIDI_TONE_KEYCODE_OCTAVES 3 |
| 26 | #endif | 26 | # endif |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | // Fillers to make layering more clear | 29 | // Fillers to make layering more clear |
| @@ -32,63 +32,63 @@ | |||
| 32 | 32 | ||
| 33 | enum quantum_keycodes { | 33 | enum quantum_keycodes { |
| 34 | // Ranges used in shortcuts - not to be used directly | 34 | // Ranges used in shortcuts - not to be used directly |
| 35 | QK_BASIC = 0x0000, | 35 | QK_BASIC = 0x0000, |
| 36 | QK_BASIC_MAX = 0x00FF, | 36 | QK_BASIC_MAX = 0x00FF, |
| 37 | QK_MODS = 0x0100, | 37 | QK_MODS = 0x0100, |
| 38 | QK_LCTL = 0x0100, | 38 | QK_LCTL = 0x0100, |
| 39 | QK_LSFT = 0x0200, | 39 | QK_LSFT = 0x0200, |
| 40 | QK_LALT = 0x0400, | 40 | QK_LALT = 0x0400, |
| 41 | QK_LGUI = 0x0800, | 41 | QK_LGUI = 0x0800, |
| 42 | QK_RMODS_MIN = 0x1000, | 42 | QK_RMODS_MIN = 0x1000, |
| 43 | QK_RCTL = 0x1100, | 43 | QK_RCTL = 0x1100, |
| 44 | QK_RSFT = 0x1200, | 44 | QK_RSFT = 0x1200, |
| 45 | QK_RALT = 0x1400, | 45 | QK_RALT = 0x1400, |
| 46 | QK_RGUI = 0x1800, | 46 | QK_RGUI = 0x1800, |
| 47 | QK_MODS_MAX = 0x1FFF, | 47 | QK_MODS_MAX = 0x1FFF, |
| 48 | QK_FUNCTION = 0x2000, | 48 | QK_FUNCTION = 0x2000, |
| 49 | QK_FUNCTION_MAX = 0x2FFF, | 49 | QK_FUNCTION_MAX = 0x2FFF, |
| 50 | QK_MACRO = 0x3000, | 50 | QK_MACRO = 0x3000, |
| 51 | QK_MACRO_MAX = 0x3FFF, | 51 | QK_MACRO_MAX = 0x3FFF, |
| 52 | QK_LAYER_TAP = 0x4000, | 52 | QK_LAYER_TAP = 0x4000, |
| 53 | QK_LAYER_TAP_MAX = 0x4FFF, | 53 | QK_LAYER_TAP_MAX = 0x4FFF, |
| 54 | QK_TO = 0x5000, | 54 | QK_TO = 0x5000, |
| 55 | QK_TO_MAX = 0x50FF, | 55 | QK_TO_MAX = 0x50FF, |
| 56 | QK_MOMENTARY = 0x5100, | 56 | QK_MOMENTARY = 0x5100, |
| 57 | QK_MOMENTARY_MAX = 0x51FF, | 57 | QK_MOMENTARY_MAX = 0x51FF, |
| 58 | QK_DEF_LAYER = 0x5200, | 58 | QK_DEF_LAYER = 0x5200, |
| 59 | QK_DEF_LAYER_MAX = 0x52FF, | 59 | QK_DEF_LAYER_MAX = 0x52FF, |
| 60 | QK_TOGGLE_LAYER = 0x5300, | 60 | QK_TOGGLE_LAYER = 0x5300, |
| 61 | QK_TOGGLE_LAYER_MAX = 0x53FF, | 61 | QK_TOGGLE_LAYER_MAX = 0x53FF, |
| 62 | QK_ONE_SHOT_LAYER = 0x5400, | 62 | QK_ONE_SHOT_LAYER = 0x5400, |
| 63 | QK_ONE_SHOT_LAYER_MAX = 0x54FF, | 63 | QK_ONE_SHOT_LAYER_MAX = 0x54FF, |
| 64 | QK_ONE_SHOT_MOD = 0x5500, | 64 | QK_ONE_SHOT_MOD = 0x5500, |
| 65 | QK_ONE_SHOT_MOD_MAX = 0x55FF, | 65 | QK_ONE_SHOT_MOD_MAX = 0x55FF, |
| 66 | QK_TAP_DANCE = 0x5700, | 66 | QK_TAP_DANCE = 0x5700, |
| 67 | QK_TAP_DANCE_MAX = 0x57FF, | 67 | QK_TAP_DANCE_MAX = 0x57FF, |
| 68 | QK_LAYER_TAP_TOGGLE = 0x5800, | 68 | QK_LAYER_TAP_TOGGLE = 0x5800, |
| 69 | QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, | 69 | QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, |
| 70 | QK_LAYER_MOD = 0x5900, | 70 | QK_LAYER_MOD = 0x5900, |
| 71 | QK_LAYER_MOD_MAX = 0x59FF, | 71 | QK_LAYER_MOD_MAX = 0x59FF, |
| 72 | #ifdef STENO_ENABLE | 72 | #ifdef STENO_ENABLE |
| 73 | QK_STENO = 0x5A00, | 73 | QK_STENO = 0x5A00, |
| 74 | QK_STENO_BOLT = 0x5A30, | 74 | QK_STENO_BOLT = 0x5A30, |
| 75 | QK_STENO_GEMINI = 0x5A31, | 75 | QK_STENO_GEMINI = 0x5A31, |
| 76 | QK_STENO_MAX = 0x5A3F, | 76 | QK_STENO_MAX = 0x5A3F, |
| 77 | #endif | 77 | #endif |
| 78 | #ifdef SWAP_HANDS_ENABLE | 78 | #ifdef SWAP_HANDS_ENABLE |
| 79 | QK_SWAP_HANDS = 0x5B00, | 79 | QK_SWAP_HANDS = 0x5B00, |
| 80 | QK_SWAP_HANDS_MAX = 0x5BFF, | 80 | QK_SWAP_HANDS_MAX = 0x5BFF, |
| 81 | #endif | 81 | #endif |
| 82 | QK_MOD_TAP = 0x6000, | 82 | QK_MOD_TAP = 0x6000, |
| 83 | QK_MOD_TAP_MAX = 0x7FFF, | 83 | QK_MOD_TAP_MAX = 0x7FFF, |
| 84 | #ifdef UNICODE_ENABLE | 84 | #ifdef UNICODE_ENABLE |
| 85 | QK_UNICODE = 0x8000, | 85 | QK_UNICODE = 0x8000, |
| 86 | QK_UNICODE_MAX = 0xFFFF, | 86 | QK_UNICODE_MAX = 0xFFFF, |
| 87 | #endif | 87 | #endif |
| 88 | #ifdef UNICODEMAP_ENABLE | 88 | #ifdef UNICODEMAP_ENABLE |
| 89 | QK_UNICODEMAP = 0x8000, | 89 | QK_UNICODEMAP = 0x8000, |
| 90 | QK_UNICODEMAP_MAX = 0xBFFF, | 90 | QK_UNICODEMAP_MAX = 0xBFFF, |
| 91 | QK_UNICODEMAP_PAIR = 0xC000, | 91 | QK_UNICODEMAP_PAIR = 0xC000, |
| 92 | QK_UNICODEMAP_PAIR_MAX = 0xFFFF, | 92 | QK_UNICODEMAP_PAIR_MAX = 0xFFFF, |
| 93 | #endif | 93 | #endif |
| 94 | 94 | ||
| @@ -118,7 +118,7 @@ enum quantum_keycodes { | |||
| 118 | MAGIC_TOGGLE_ALT_GUI, | 118 | MAGIC_TOGGLE_ALT_GUI, |
| 119 | GRAVE_ESC, | 119 | GRAVE_ESC, |
| 120 | 120 | ||
| 121 | // Leader key | 121 | // Leader key |
| 122 | #ifdef LEADER_ENABLE | 122 | #ifdef LEADER_ENABLE |
| 123 | KC_LEAD, | 123 | KC_LEAD, |
| 124 | #endif | 124 | #endif |
| @@ -144,7 +144,6 @@ enum quantum_keycodes { | |||
| 144 | CLICKY_DOWN, | 144 | CLICKY_DOWN, |
| 145 | CLICKY_RESET, | 145 | CLICKY_RESET, |
| 146 | 146 | ||
| 147 | |||
| 148 | #ifdef FAUXCLICKY_ENABLE | 147 | #ifdef FAUXCLICKY_ENABLE |
| 149 | // Faux clicky | 148 | // Faux clicky |
| 150 | FC_ON, | 149 | FC_ON, |
| @@ -164,7 +163,7 @@ enum quantum_keycodes { | |||
| 164 | MUV_IN, | 163 | MUV_IN, |
| 165 | MUV_DE, | 164 | MUV_DE, |
| 166 | 165 | ||
| 167 | // Midi | 166 | // Midi |
| 168 | #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) | 167 | #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) |
| 169 | MI_ON, | 168 | MI_ON, |
| 170 | MI_OFF, | 169 | MI_OFF, |
| @@ -174,7 +173,7 @@ enum quantum_keycodes { | |||
| 174 | #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) | 173 | #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) |
| 175 | MIDI_TONE_MIN, | 174 | MIDI_TONE_MIN, |
| 176 | 175 | ||
| 177 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0 | 176 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0 |
| 178 | MI_C = MIDI_TONE_MIN, | 177 | MI_C = MIDI_TONE_MIN, |
| 179 | MI_Cs, | 178 | MI_Cs, |
| 180 | MI_Db = MI_Cs, | 179 | MI_Db = MI_Cs, |
| @@ -192,9 +191,9 @@ enum quantum_keycodes { | |||
| 192 | MI_As, | 191 | MI_As, |
| 193 | MI_Bb = MI_As, | 192 | MI_Bb = MI_As, |
| 194 | MI_B, | 193 | MI_B, |
| 195 | #endif | 194 | # endif |
| 196 | 195 | ||
| 197 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1 | 196 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1 |
| 198 | MI_C_1, | 197 | MI_C_1, |
| 199 | MI_Cs_1, | 198 | MI_Cs_1, |
| 200 | MI_Db_1 = MI_Cs_1, | 199 | MI_Db_1 = MI_Cs_1, |
| @@ -212,9 +211,9 @@ enum quantum_keycodes { | |||
| 212 | MI_As_1, | 211 | MI_As_1, |
| 213 | MI_Bb_1 = MI_As_1, | 212 | MI_Bb_1 = MI_As_1, |
| 214 | MI_B_1, | 213 | MI_B_1, |
| 215 | #endif | 214 | # endif |
| 216 | 215 | ||
| 217 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2 | 216 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2 |
| 218 | MI_C_2, | 217 | MI_C_2, |
| 219 | MI_Cs_2, | 218 | MI_Cs_2, |
| 220 | MI_Db_2 = MI_Cs_2, | 219 | MI_Db_2 = MI_Cs_2, |
| @@ -232,9 +231,9 @@ enum quantum_keycodes { | |||
| 232 | MI_As_2, | 231 | MI_As_2, |
| 233 | MI_Bb_2 = MI_As_2, | 232 | MI_Bb_2 = MI_As_2, |
| 234 | MI_B_2, | 233 | MI_B_2, |
| 235 | #endif | 234 | # endif |
| 236 | 235 | ||
| 237 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3 | 236 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3 |
| 238 | MI_C_3, | 237 | MI_C_3, |
| 239 | MI_Cs_3, | 238 | MI_Cs_3, |
| 240 | MI_Db_3 = MI_Cs_3, | 239 | MI_Db_3 = MI_Cs_3, |
| @@ -252,9 +251,9 @@ enum quantum_keycodes { | |||
| 252 | MI_As_3, | 251 | MI_As_3, |
| 253 | MI_Bb_3 = MI_As_3, | 252 | MI_Bb_3 = MI_As_3, |
| 254 | MI_B_3, | 253 | MI_B_3, |
| 255 | #endif | 254 | # endif |
| 256 | 255 | ||
| 257 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4 | 256 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4 |
| 258 | MI_C_4, | 257 | MI_C_4, |
| 259 | MI_Cs_4, | 258 | MI_Cs_4, |
| 260 | MI_Db_4 = MI_Cs_4, | 259 | MI_Db_4 = MI_Cs_4, |
| @@ -272,9 +271,9 @@ enum quantum_keycodes { | |||
| 272 | MI_As_4, | 271 | MI_As_4, |
| 273 | MI_Bb_4 = MI_As_4, | 272 | MI_Bb_4 = MI_As_4, |
| 274 | MI_B_4, | 273 | MI_B_4, |
| 275 | #endif | 274 | # endif |
| 276 | 275 | ||
| 277 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 | 276 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 |
| 278 | MI_C_5, | 277 | MI_C_5, |
| 279 | MI_Cs_5, | 278 | MI_Cs_5, |
| 280 | MI_Db_5 = MI_Cs_5, | 279 | MI_Db_5 = MI_Cs_5, |
| @@ -292,21 +291,21 @@ enum quantum_keycodes { | |||
| 292 | MI_As_5, | 291 | MI_As_5, |
| 293 | MI_Bb_5 = MI_As_5, | 292 | MI_Bb_5 = MI_As_5, |
| 294 | MI_B_5, | 293 | MI_B_5, |
| 295 | #endif | 294 | # endif |
| 296 | 295 | ||
| 297 | #if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 | 296 | # if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 |
| 298 | MIDI_TONE_MAX = MI_B_5, | 297 | MIDI_TONE_MAX = MI_B_5, |
| 299 | #elif MIDI_TONE_KEYCODE_OCTAVES > 4 | 298 | # elif MIDI_TONE_KEYCODE_OCTAVES > 4 |
| 300 | MIDI_TONE_MAX = MI_B_4, | 299 | MIDI_TONE_MAX = MI_B_4, |
| 301 | #elif MIDI_TONE_KEYCODE_OCTAVES > 3 | 300 | # elif MIDI_TONE_KEYCODE_OCTAVES > 3 |
| 302 | MIDI_TONE_MAX = MI_B_3, | 301 | MIDI_TONE_MAX = MI_B_3, |
| 303 | #elif MIDI_TONE_KEYCODE_OCTAVES > 2 | 302 | # elif MIDI_TONE_KEYCODE_OCTAVES > 2 |
| 304 | MIDI_TONE_MAX = MI_B_2, | 303 | MIDI_TONE_MAX = MI_B_2, |
| 305 | #elif MIDI_TONE_KEYCODE_OCTAVES > 1 | 304 | # elif MIDI_TONE_KEYCODE_OCTAVES > 1 |
| 306 | MIDI_TONE_MAX = MI_B_1, | 305 | MIDI_TONE_MAX = MI_B_1, |
| 307 | #elif MIDI_TONE_KEYCODE_OCTAVES > 0 | 306 | # elif MIDI_TONE_KEYCODE_OCTAVES > 0 |
| 308 | MIDI_TONE_MAX = MI_B, | 307 | MIDI_TONE_MAX = MI_B, |
| 309 | #endif | 308 | # endif |
| 310 | 309 | ||
| 311 | MIDI_OCTAVE_MIN, | 310 | MIDI_OCTAVE_MIN, |
| 312 | MI_OCT_N2 = MIDI_OCTAVE_MIN, | 311 | MI_OCT_N2 = MIDI_OCTAVE_MIN, |
| @@ -320,8 +319,8 @@ enum quantum_keycodes { | |||
| 320 | MI_OCT_6, | 319 | MI_OCT_6, |
| 321 | MI_OCT_7, | 320 | MI_OCT_7, |
| 322 | MIDI_OCTAVE_MAX = MI_OCT_7, | 321 | MIDI_OCTAVE_MAX = MI_OCT_7, |
| 323 | MI_OCTD, // octave down | 322 | MI_OCTD, // octave down |
| 324 | MI_OCTU, // octave up | 323 | MI_OCTU, // octave up |
| 325 | 324 | ||
| 326 | MIDI_TRANSPOSE_MIN, | 325 | MIDI_TRANSPOSE_MIN, |
| 327 | MI_TRNS_N6 = MIDI_TRANSPOSE_MIN, | 326 | MI_TRNS_N6 = MIDI_TRANSPOSE_MIN, |
| @@ -338,8 +337,8 @@ enum quantum_keycodes { | |||
| 338 | MI_TRNS_5, | 337 | MI_TRNS_5, |
| 339 | MI_TRNS_6, | 338 | MI_TRNS_6, |
| 340 | MIDI_TRANSPOSE_MAX = MI_TRNS_6, | 339 | MIDI_TRANSPOSE_MAX = MI_TRNS_6, |
| 341 | MI_TRNSD, // transpose down | 340 | MI_TRNSD, // transpose down |
| 342 | MI_TRNSU, // transpose up | 341 | MI_TRNSU, // transpose up |
| 343 | 342 | ||
| 344 | MIDI_VELOCITY_MIN, | 343 | MIDI_VELOCITY_MIN, |
| 345 | MI_VEL_1 = MIDI_VELOCITY_MIN, | 344 | MI_VEL_1 = MIDI_VELOCITY_MIN, |
| @@ -353,8 +352,8 @@ enum quantum_keycodes { | |||
| 353 | MI_VEL_9, | 352 | MI_VEL_9, |
| 354 | MI_VEL_10, | 353 | MI_VEL_10, |
| 355 | MIDI_VELOCITY_MAX = MI_VEL_10, | 354 | MIDI_VELOCITY_MAX = MI_VEL_10, |
| 356 | MI_VELD, // velocity down | 355 | MI_VELD, // velocity down |
| 357 | MI_VELU, // velocity up | 356 | MI_VELU, // velocity up |
| 358 | 357 | ||
| 359 | MIDI_CHANNEL_MIN, | 358 | MIDI_CHANNEL_MIN, |
| 360 | MI_CH1 = MIDI_CHANNEL_MIN, | 359 | MI_CH1 = MIDI_CHANNEL_MIN, |
| @@ -374,24 +373,24 @@ enum quantum_keycodes { | |||
| 374 | MI_CH15, | 373 | MI_CH15, |
| 375 | MI_CH16, | 374 | MI_CH16, |
| 376 | MIDI_CHANNEL_MAX = MI_CH16, | 375 | MIDI_CHANNEL_MAX = MI_CH16, |
| 377 | MI_CHD, // previous channel | 376 | MI_CHD, // previous channel |
| 378 | MI_CHU, // next channel | 377 | MI_CHU, // next channel |
| 379 | 378 | ||
| 380 | MI_ALLOFF, // all notes off | 379 | MI_ALLOFF, // all notes off |
| 381 | 380 | ||
| 382 | MI_SUS, // sustain | 381 | MI_SUS, // sustain |
| 383 | MI_PORT, // portamento | 382 | MI_PORT, // portamento |
| 384 | MI_SOST, // sostenuto | 383 | MI_SOST, // sostenuto |
| 385 | MI_SOFT, // soft pedal | 384 | MI_SOFT, // soft pedal |
| 386 | MI_LEG, // legato | 385 | MI_LEG, // legato |
| 387 | 386 | ||
| 388 | MI_MOD, // modulation | 387 | MI_MOD, // modulation |
| 389 | MI_MODSD, // decrease modulation speed | 388 | MI_MODSD, // decrease modulation speed |
| 390 | MI_MODSU, // increase modulation speed | 389 | MI_MODSU, // increase modulation speed |
| 391 | 390 | ||
| 392 | MI_BENDD, // Bend down | 391 | MI_BENDD, // Bend down |
| 393 | MI_BENDU, // Bend up | 392 | MI_BENDU, // Bend up |
| 394 | #endif // MIDI_ADVANCED | 393 | #endif // MIDI_ADVANCED |
| 395 | 394 | ||
| 396 | // Backlight functionality | 395 | // Backlight functionality |
| 397 | BL_ON, | 396 | BL_ON, |
| @@ -424,7 +423,7 @@ enum quantum_keycodes { | |||
| 424 | RGB_MODE_GRADIENT, | 423 | RGB_MODE_GRADIENT, |
| 425 | RGB_MODE_RGBTEST, | 424 | RGB_MODE_RGBTEST, |
| 426 | 425 | ||
| 427 | //Momentum matching toggle | 426 | // Momentum matching toggle |
| 428 | VLK_TOG, | 427 | VLK_TOG, |
| 429 | 428 | ||
| 430 | // Left shift, open paren | 429 | // Left shift, open paren |
| @@ -492,7 +491,7 @@ enum quantum_keycodes { | |||
| 492 | CMB_ON, | 491 | CMB_ON, |
| 493 | CMB_OFF, | 492 | CMB_OFF, |
| 494 | CMB_TOG, | 493 | CMB_TOG, |
| 495 | 494 | ||
| 496 | MAGIC_SWAP_LCTL_LGUI, | 495 | MAGIC_SWAP_LCTL_LGUI, |
| 497 | MAGIC_SWAP_RCTL_RGUI, | 496 | MAGIC_SWAP_RCTL_RGUI, |
| 498 | MAGIC_UNSWAP_LCTL_LGUI, | 497 | MAGIC_UNSWAP_LCTL_LGUI, |
| @@ -521,86 +520,86 @@ enum quantum_keycodes { | |||
| 521 | #define RWIN(kc) RGUI(kc) | 520 | #define RWIN(kc) RGUI(kc) |
| 522 | 521 | ||
| 523 | #define HYPR(kc) (QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | (kc)) | 522 | #define HYPR(kc) (QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | (kc)) |
| 524 | #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) | 523 | #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) |
| 525 | #define LCAG(kc) (QK_LCTL | QK_LALT | QK_LGUI | (kc)) | 524 | #define LCAG(kc) (QK_LCTL | QK_LALT | QK_LGUI | (kc)) |
| 526 | #define SGUI(kc) (QK_LGUI | QK_LSFT | (kc)) | 525 | #define SGUI(kc) (QK_LGUI | QK_LSFT | (kc)) |
| 527 | #define SCMD(kc) SGUI(kc) | 526 | #define SCMD(kc) SGUI(kc) |
| 528 | #define SWIN(kc) SGUI(kc) | 527 | #define SWIN(kc) SGUI(kc) |
| 529 | #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) | 528 | #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) |
| 530 | 529 | ||
| 531 | #define MOD_HYPR 0xF | 530 | #define MOD_HYPR 0xF |
| 532 | #define MOD_MEH 0x7 | 531 | #define MOD_MEH 0x7 |
| 533 | 532 | ||
| 534 | // Aliases for shifted symbols | 533 | // Aliases for shifted symbols |
| 535 | // Each key has a 4-letter code, and some have longer aliases too. | 534 | // Each key has a 4-letter code, and some have longer aliases too. |
| 536 | // While the long aliases are descriptive, the 4-letter codes | 535 | // While the long aliases are descriptive, the 4-letter codes |
| 537 | // make for nicer grid layouts (everything lines up), and are | 536 | // make for nicer grid layouts (everything lines up), and are |
| 538 | // the preferred style for Quantum. | 537 | // the preferred style for Quantum. |
| 539 | #define KC_TILD LSFT(KC_GRV) // ~ | 538 | #define KC_TILD LSFT(KC_GRV) // ~ |
| 540 | #define KC_TILDE KC_TILD | 539 | #define KC_TILDE KC_TILD |
| 541 | 540 | ||
| 542 | #define KC_EXLM LSFT(KC_1) // ! | 541 | #define KC_EXLM LSFT(KC_1) // ! |
| 543 | #define KC_EXCLAIM KC_EXLM | 542 | #define KC_EXCLAIM KC_EXLM |
| 544 | 543 | ||
| 545 | #define KC_AT LSFT(KC_2) // @ | 544 | #define KC_AT LSFT(KC_2) // @ |
| 546 | 545 | ||
| 547 | #define KC_HASH LSFT(KC_3) // # | 546 | #define KC_HASH LSFT(KC_3) // # |
| 548 | 547 | ||
| 549 | #define KC_DLR LSFT(KC_4) // $ | 548 | #define KC_DLR LSFT(KC_4) // $ |
| 550 | #define KC_DOLLAR KC_DLR | 549 | #define KC_DOLLAR KC_DLR |
| 551 | 550 | ||
| 552 | #define KC_PERC LSFT(KC_5) // % | 551 | #define KC_PERC LSFT(KC_5) // % |
| 553 | #define KC_PERCENT KC_PERC | 552 | #define KC_PERCENT KC_PERC |
| 554 | 553 | ||
| 555 | #define KC_CIRC LSFT(KC_6) // ^ | 554 | #define KC_CIRC LSFT(KC_6) // ^ |
| 556 | #define KC_CIRCUMFLEX KC_CIRC | 555 | #define KC_CIRCUMFLEX KC_CIRC |
| 557 | 556 | ||
| 558 | #define KC_AMPR LSFT(KC_7) // & | 557 | #define KC_AMPR LSFT(KC_7) // & |
| 559 | #define KC_AMPERSAND KC_AMPR | 558 | #define KC_AMPERSAND KC_AMPR |
| 560 | 559 | ||
| 561 | #define KC_ASTR LSFT(KC_8) // * | 560 | #define KC_ASTR LSFT(KC_8) // * |
| 562 | #define KC_ASTERISK KC_ASTR | 561 | #define KC_ASTERISK KC_ASTR |
| 563 | 562 | ||
| 564 | #define KC_LPRN LSFT(KC_9) // ( | 563 | #define KC_LPRN LSFT(KC_9) // ( |
| 565 | #define KC_LEFT_PAREN KC_LPRN | 564 | #define KC_LEFT_PAREN KC_LPRN |
| 566 | 565 | ||
| 567 | #define KC_RPRN LSFT(KC_0) // ) | 566 | #define KC_RPRN LSFT(KC_0) // ) |
| 568 | #define KC_RIGHT_PAREN KC_RPRN | 567 | #define KC_RIGHT_PAREN KC_RPRN |
| 569 | 568 | ||
| 570 | #define KC_UNDS LSFT(KC_MINS) // _ | 569 | #define KC_UNDS LSFT(KC_MINS) // _ |
| 571 | #define KC_UNDERSCORE KC_UNDS | 570 | #define KC_UNDERSCORE KC_UNDS |
| 572 | 571 | ||
| 573 | #define KC_PLUS LSFT(KC_EQL) // + | 572 | #define KC_PLUS LSFT(KC_EQL) // + |
| 574 | 573 | ||
| 575 | #define KC_LCBR LSFT(KC_LBRC) // { | 574 | #define KC_LCBR LSFT(KC_LBRC) // { |
| 576 | #define KC_LEFT_CURLY_BRACE KC_LCBR | 575 | #define KC_LEFT_CURLY_BRACE KC_LCBR |
| 577 | 576 | ||
| 578 | #define KC_RCBR LSFT(KC_RBRC) // } | 577 | #define KC_RCBR LSFT(KC_RBRC) // } |
| 579 | #define KC_RIGHT_CURLY_BRACE KC_RCBR | 578 | #define KC_RIGHT_CURLY_BRACE KC_RCBR |
| 580 | 579 | ||
| 581 | #define KC_LABK LSFT(KC_COMM) // < | 580 | #define KC_LABK LSFT(KC_COMM) // < |
| 582 | #define KC_LEFT_ANGLE_BRACKET KC_LABK | 581 | #define KC_LEFT_ANGLE_BRACKET KC_LABK |
| 583 | 582 | ||
| 584 | #define KC_RABK LSFT(KC_DOT) // > | 583 | #define KC_RABK LSFT(KC_DOT) // > |
| 585 | #define KC_RIGHT_ANGLE_BRACKET KC_RABK | 584 | #define KC_RIGHT_ANGLE_BRACKET KC_RABK |
| 586 | 585 | ||
| 587 | #define KC_COLN LSFT(KC_SCLN) // : | 586 | #define KC_COLN LSFT(KC_SCLN) // : |
| 588 | #define KC_COLON KC_COLN | 587 | #define KC_COLON KC_COLN |
| 589 | 588 | ||
| 590 | #define KC_PIPE LSFT(KC_BSLS) // | | 589 | #define KC_PIPE LSFT(KC_BSLS) // | |
| 591 | 590 | ||
| 592 | #define KC_LT LSFT(KC_COMM) // < | 591 | #define KC_LT LSFT(KC_COMM) // < |
| 593 | 592 | ||
| 594 | #define KC_GT LSFT(KC_DOT) // > | 593 | #define KC_GT LSFT(KC_DOT) // > |
| 595 | 594 | ||
| 596 | #define KC_QUES LSFT(KC_SLSH) // ? | 595 | #define KC_QUES LSFT(KC_SLSH) // ? |
| 597 | #define KC_QUESTION KC_QUES | 596 | #define KC_QUESTION KC_QUES |
| 598 | 597 | ||
| 599 | #define KC_DQT LSFT(KC_QUOT) // " | 598 | #define KC_DQT LSFT(KC_QUOT) // " |
| 600 | #define KC_DOUBLE_QUOTE KC_DQT | 599 | #define KC_DOUBLE_QUOTE KC_DQT |
| 601 | #define KC_DQUO KC_DQT | 600 | #define KC_DQUO KC_DQT |
| 602 | 601 | ||
| 603 | #define KC_DELT KC_DELETE // Del key (four letter code) | 602 | #define KC_DELT KC_DELETE // Del key (four letter code) |
| 604 | 603 | ||
| 605 | // Alias for function layers than expand past FN31 | 604 | // Alias for function layers than expand past FN31 |
| 606 | #define FUNC(kc) (QK_FUNCTION | (kc)) | 605 | #define FUNC(kc) (QK_FUNCTION | (kc)) |
| @@ -642,7 +641,7 @@ enum quantum_keycodes { | |||
| 642 | #define RGB_M_T RGB_MODE_RGBTEST | 641 | #define RGB_M_T RGB_MODE_RGBTEST |
| 643 | 642 | ||
| 644 | // L-ayer, T-ap - 256 keycode max, 16 layer max | 643 | // L-ayer, T-ap - 256 keycode max, 16 layer max |
| 645 | #define LT(layer, kc) (QK_LAYER_TAP | (((layer) & 0xF) << 8) | ((kc) & 0xFF)) | 644 | #define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF)) |
| 646 | 645 | ||
| 647 | #define AG_SWAP MAGIC_SWAP_ALT_GUI | 646 | #define AG_SWAP MAGIC_SWAP_ALT_GUI |
| 648 | #define AG_NORM MAGIC_UNSWAP_ALT_GUI | 647 | #define AG_NORM MAGIC_UNSWAP_ALT_GUI |
| @@ -660,43 +659,43 @@ enum quantum_keycodes { | |||
| 660 | // In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own | 659 | // In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own |
| 661 | // keycode modeled after the old version, kept below for this. | 660 | // keycode modeled after the old version, kept below for this. |
| 662 | /* #define TO(layer, when) (QK_TO | (when << 0x4) | (layer & 0xFF)) */ | 661 | /* #define TO(layer, when) (QK_TO | (when << 0x4) | (layer & 0xFF)) */ |
| 663 | #define TO(layer) (QK_TO | (ON_PRESS << 0x4) | ((layer) & 0xFF)) | 662 | #define TO(layer) (QK_TO | (ON_PRESS << 0x4) | ((layer)&0xFF)) |
| 664 | 663 | ||
| 665 | // Momentary switch layer - 256 layer max | 664 | // Momentary switch layer - 256 layer max |
| 666 | #define MO(layer) (QK_MOMENTARY | ((layer) & 0xFF)) | 665 | #define MO(layer) (QK_MOMENTARY | ((layer)&0xFF)) |
| 667 | 666 | ||
| 668 | // Set default layer - 256 layer max | 667 | // Set default layer - 256 layer max |
| 669 | #define DF(layer) (QK_DEF_LAYER | ((layer) & 0xFF)) | 668 | #define DF(layer) (QK_DEF_LAYER | ((layer)&0xFF)) |
| 670 | 669 | ||
| 671 | // Toggle to layer - 256 layer max | 670 | // Toggle to layer - 256 layer max |
| 672 | #define TG(layer) (QK_TOGGLE_LAYER | ((layer) & 0xFF)) | 671 | #define TG(layer) (QK_TOGGLE_LAYER | ((layer)&0xFF)) |
| 673 | 672 | ||
| 674 | // One-shot layer - 256 layer max | 673 | // One-shot layer - 256 layer max |
| 675 | #define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer) & 0xFF)) | 674 | #define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer)&0xFF)) |
| 676 | 675 | ||
| 677 | // L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only | 676 | // L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only |
| 678 | #define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 4) | ((mod) & 0xF)) | 677 | #define LM(layer, mod) (QK_LAYER_MOD | (((layer)&0xF) << 4) | ((mod)&0xF)) |
| 679 | 678 | ||
| 680 | // One-shot mod | 679 | // One-shot mod |
| 681 | #define OSM(mod) (QK_ONE_SHOT_MOD | ((mod) & 0xFF)) | 680 | #define OSM(mod) (QK_ONE_SHOT_MOD | ((mod)&0xFF)) |
| 682 | 681 | ||
| 683 | // Layer tap-toggle | 682 | // Layer tap-toggle |
| 684 | #define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer) & 0xFF)) | 683 | #define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0xFF)) |
| 685 | 684 | ||
| 686 | // M-od, T-ap - 256 keycode max | 685 | // M-od, T-ap - 256 keycode max |
| 687 | #define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) | 686 | #define MT(mod, kc) (QK_MOD_TAP | (((mod)&0x1F) << 8) | ((kc)&0xFF)) |
| 688 | 687 | ||
| 689 | #define LCTL_T(kc) MT(MOD_LCTL, kc) | 688 | #define LCTL_T(kc) MT(MOD_LCTL, kc) |
| 690 | #define RCTL_T(kc) MT(MOD_RCTL, kc) | 689 | #define RCTL_T(kc) MT(MOD_RCTL, kc) |
| 691 | #define CTL_T(kc) LCTL_T(kc) | 690 | #define CTL_T(kc) LCTL_T(kc) |
| 692 | 691 | ||
| 693 | #define LSFT_T(kc) MT(MOD_LSFT, kc) | 692 | #define LSFT_T(kc) MT(MOD_LSFT, kc) |
| 694 | #define RSFT_T(kc) MT(MOD_RSFT, kc) | 693 | #define RSFT_T(kc) MT(MOD_RSFT, kc) |
| 695 | #define SFT_T(kc) LSFT_T(kc) | 694 | #define SFT_T(kc) LSFT_T(kc) |
| 696 | 695 | ||
| 697 | #define LALT_T(kc) MT(MOD_LALT, kc) | 696 | #define LALT_T(kc) MT(MOD_LALT, kc) |
| 698 | #define RALT_T(kc) MT(MOD_RALT, kc) | 697 | #define RALT_T(kc) MT(MOD_RALT, kc) |
| 699 | #define ALT_T(kc) LALT_T(kc) | 698 | #define ALT_T(kc) LALT_T(kc) |
| 700 | #define ALGR_T(kc) RALT_T(kc) | 699 | #define ALGR_T(kc) RALT_T(kc) |
| 701 | 700 | ||
| 702 | #define LGUI_T(kc) MT(MOD_LGUI, kc) | 701 | #define LGUI_T(kc) MT(MOD_LGUI, kc) |
| @@ -705,36 +704,36 @@ enum quantum_keycodes { | |||
| 705 | #define LWIN_T(kc) LGUI_T(kc) | 704 | #define LWIN_T(kc) LGUI_T(kc) |
| 706 | #define RCMD_T(kc) RGUI_T(kc) | 705 | #define RCMD_T(kc) RGUI_T(kc) |
| 707 | #define RWIN_T(kc) RGUI_T(kc) | 706 | #define RWIN_T(kc) RGUI_T(kc) |
| 708 | #define GUI_T(kc) LGUI_T(kc) | 707 | #define GUI_T(kc) LGUI_T(kc) |
| 709 | #define CMD_T(kc) LCMD_T(kc) | 708 | #define CMD_T(kc) LCMD_T(kc) |
| 710 | #define WIN_T(kc) LWIN_T(kc) | 709 | #define WIN_T(kc) LWIN_T(kc) |
| 711 | 710 | ||
| 712 | #define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal | 711 | #define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal |
| 713 | #define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt | 712 | #define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt |
| 714 | #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI | 713 | #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI |
| 715 | #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI | 714 | #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI |
| 716 | #define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ | 715 | #define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ |
| 717 | #define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI | 716 | #define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI |
| 718 | #define SCMD_T(kc) SGUI_T(kc) | 717 | #define SCMD_T(kc) SGUI_T(kc) |
| 719 | #define SWIN_T(kc) SGUI_T(kc) | 718 | #define SWIN_T(kc) SGUI_T(kc) |
| 720 | #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt | 719 | #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt |
| 721 | #define ALL_T(kc) HYPR_T(kc) | 720 | #define ALL_T(kc) HYPR_T(kc) |
| 722 | 721 | ||
| 723 | // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap | 722 | // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap |
| 724 | #define KC_HYPR HYPR(KC_NO) | 723 | #define KC_HYPR HYPR(KC_NO) |
| 725 | #define KC_MEH MEH(KC_NO) | 724 | #define KC_MEH MEH(KC_NO) |
| 726 | 725 | ||
| 727 | #ifdef UNICODE_ENABLE | 726 | #ifdef UNICODE_ENABLE |
| 728 | // Allows Unicode input up to 0x7FFF | 727 | // Allows Unicode input up to 0x7FFF |
| 729 | #define UC(c) (QK_UNICODE | (c)) | 728 | # define UC(c) (QK_UNICODE | (c)) |
| 730 | #endif | 729 | #endif |
| 731 | #ifdef UNICODEMAP_ENABLE | 730 | #ifdef UNICODEMAP_ENABLE |
| 732 | // Allows Unicode input up to 0x10FFFF, requires unicode_map | 731 | // Allows Unicode input up to 0x10FFFF, requires unicode_map |
| 733 | #define X(i) (QK_UNICODEMAP | (i)) | 732 | # define X(i) (QK_UNICODEMAP | (i)) |
| 734 | #define XP(i, j) (QK_UNICODEMAP_PAIR | ((i) & 0x7F) | (((j) & 0x7F) << 7)) // 127 max i and j | 733 | # define XP(i, j) (QK_UNICODEMAP_PAIR | ((i)&0x7F) | (((j)&0x7F) << 7)) // 127 max i and j |
| 735 | #endif | 734 | #endif |
| 736 | 735 | ||
| 737 | #define UC_MOD UNICODE_MODE_FORWARD | 736 | #define UC_MOD UNICODE_MODE_FORWARD |
| 738 | #define UC_RMOD UNICODE_MODE_REVERSE | 737 | #define UC_RMOD UNICODE_MODE_REVERSE |
| 739 | 738 | ||
| 740 | #define UC_M_OS UNICODE_MODE_OSX | 739 | #define UC_M_OS UNICODE_MODE_OSX |
| @@ -744,13 +743,13 @@ enum quantum_keycodes { | |||
| 744 | #define UC_M_WC UNICODE_MODE_WINC | 743 | #define UC_M_WC UNICODE_MODE_WINC |
| 745 | 744 | ||
| 746 | #ifdef SWAP_HANDS_ENABLE | 745 | #ifdef SWAP_HANDS_ENABLE |
| 747 | #define SH_T(kc) (QK_SWAP_HANDS | (kc)) | 746 | # define SH_T(kc) (QK_SWAP_HANDS | (kc)) |
| 748 | #define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) | 747 | # define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) |
| 749 | #define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE) | 748 | # define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE) |
| 750 | #define SH_MON (QK_SWAP_HANDS | OP_SH_ON_OFF) | 749 | # define SH_MON (QK_SWAP_HANDS | OP_SH_ON_OFF) |
| 751 | #define SH_MOFF (QK_SWAP_HANDS | OP_SH_OFF_ON) | 750 | # define SH_MOFF (QK_SWAP_HANDS | OP_SH_OFF_ON) |
| 752 | #define SH_ON (QK_SWAP_HANDS | OP_SH_ON) | 751 | # define SH_ON (QK_SWAP_HANDS | OP_SH_ON) |
| 753 | #define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF) | 752 | # define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF) |
| 754 | #endif | 753 | #endif |
| 755 | 754 | ||
| 756 | #endif // QUANTUM_KEYCODES_H | 755 | #endif // QUANTUM_KEYCODES_H |
