aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum_keycodes.h
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-05-29 14:38:50 -0700
committerGitHub <noreply@github.com>2021-05-29 14:38:50 -0700
commit1646c0f26cfa21a7023d404008e4d0aa4917193d (patch)
tree337ab0498a929285a234518fee34a4d9dcf51656 /quantum/quantum_keycodes.h
parentf55e39e8a2246f6f96fd5d4a84a866e2615cde7b (diff)
downloadqmk_firmware-1646c0f26cfa21a7023d404008e4d0aa4917193d.tar.gz
qmk_firmware-1646c0f26cfa21a7023d404008e4d0aa4917193d.zip
2021 May 29 Breaking Changes Update (#13034)
* Add Per Key functionality for AutoShift (#11536) * LED Matrix: Reactive effect buffers & advanced indicators (#12588) * [Keyboard] kint36: switch to sym_eager_pk debouncing (#12626) * [Keyboard] kint2pp: reduce input latency by ≈10ms (#12625) * LED Matrix: Split (#12633) * [CI] Format code according to conventions (#12650) * feat: infinite timeout for leader key (#6580) * feat: implement leader_no_timeout logic * docs(leader_key): infinite leader timeout docs * Format code according to conventions (#12680) * Update ADC driver for STM32F1xx, STM32F3xx, STM32F4xx (#12403) * Fix default ADC_RESOLUTION for ADCv3 (and ADCv4) Recent ChibiOS update removed ADC_CFGR1_RES_10BIT from the ADCv3 headers (that macro should not have been there, because ADCv3 has CFGR instead of CFGR1). Fix the default value for ADC_RESOLUTION to use ADC_CFGR_RES_10BITS if it is defined (that name is used for ADCv3 and ADCv4). * Update ADC docs to match the actually used resolution ADC driver for ChibiOS actually uses the 10-bit resolution by default (probably to match AVR); fix the documentation accordingly. Also add both ADC_CFGR_RES_10BITS and ADC_CFGR1_RES_10BIT constants (these names differ according to the ADC implementation in the particular MCU). * Fix pinToMux() for B12 and B13 on STM32F3xx Testing on STM32F303CCT6 revealed that the ADC mux values for B12 and B13 pins were wrong. * Add support for all possible analog pins on STM32F1xx Added ADC mux values for pins A0...A7, B0, B1, C0...C5 on STM32F1xx (they are the same at least for STM32F103x8 and larger F103 devices, and also F102, F105, F107 families). Actually tested on STM32F103C8T6 (therefore pins C0...C5 were not tested). Pins F6...F10, which are present on STM32F103x[C-G] in 144-pin packages, cannot be supported at the moment, because those pins are connected only to ADC3, but the ChibiOS ADC driver for STM32F1xx supports only ADC1. * Add support for all possible analog pins on STM32F4xx Added ADC mux values for pins A0...A7, B0, B1, C0...C5 and optionally F3...F10 (if STM32_ADC_USE_ADC3 is enabled). These mux values are apparently the same for all F4xx devices, except some smaller devices may not have ADC3. Actually tested on STM32F401CCU6, STM32F401CEU6, STM32F411CEU6 (using various WeAct “Blackpill” boards); only pins A0...A7, B0, B1 were tested. Pins F3...F10 are inside `#if STM32_ADC_USE_ADC3` because some devices which don't have ADC3 also don't have the GPIOF port, therefore the code which refers to Fx pins does not compile. * Fix STM32F3xx ADC mux table in documentation The ADC driver documentation had some errors in the mux table for STM32F3xx. Fix this table to match the datasheet and the actual code (mux settings for B12 and B13 were also tested on a real STM32F303CCT6 chip). * Add STM32F1xx ADC pins to the documentation * Add STM32F4xx ADC pins to the documentation * Add initial support for tinyuf2 bootloader (when hosted on F411 blackpill) (#12600) * Add support for jumping to tinyuf2 bootloader. Adds blackpill UF2 example. * Update flashing.md * Update chconf.h * Update config.h * Update halconf.h * Update mcuconf.h * eeprom driver: Refactor where eeprom driver initialisation (and EEPROM emulation initialisation) occurs to make it non-target-specific. (#12671) * Add support for MCU = STM32F446 (#12619) * Add support for MCU = STM32F446 * Update platforms/chibios/GENERIC_STM32_F446XE/configs/config.h * Restore mcuconf.h to the one used by RT-STM32F446RE-NUCLEO64 * stm32f446: update mcuconf.h and board.h for 16MHz operation, with USB enabled, and other peripherals disabled. * Format code according to conventions (#12682) * Format code according to conventions (#12687) * Add STM32L433 and L443 support (#12063) * initial L433 commit * change to XC * fix L433 * disable all peripherals * update system and peripheral clocks * 433 change * use its own board files * revert its own board files * l433 specific change * fix stm32l432xx define * remove duplicate #define * fix bootloader jump * move to L443xx and add i2c2, spi2, usart3 to mcuconf.h * move to L443 * move to L443 * fix sdmmc in mcuconf.h * include STM32L443 * add L443 * Include L443 in compatible microcontrollers * Include L443 in compatible microcontrollers * Update config bootloader jump description * Update ChibiOS define reasoning * Update quantum/mcu_selection.mk * fix git conflict * Updated Function96 with V2 files and removed chconf.h and halconf.h (#12613) * Fix bad PR merge for #6580. (#12721) * Change RGB/LED Matrix to use a simple define for USB suspend (#12697) * [CI] Format code according to conventions (#12731) * Fixing transport's led/rgb matrix suspend state logic (#12770) * [CI] Format code according to conventions (#12772) * Fix comment parsing (#12750) * Added OLED fade out support (#12086) * fix some references to bin/qmk that slipped in (#12832) * Resolve a number of warnings in `qmk generate-api` (#12833) * New command: qmk console (#12828) * stash poc * stash * tidy up implementation * Tidy up slightly for review * Tidy up slightly for review * Bodge environment to make tests pass * Refactor away from asyncio due to windows issues * Filter devices * align vid/pid printing * Add hidapi to the installers * start preparing for multiple hid_listeners * udev rules for hid_listen * refactor to move closer to end state * very basic implementation of the threaded model * refactor how vid/pid/index are supplied and parsed * windows improvements * read the report directly when usage page isn't available * add per-device colors, the choice to show names or numbers, and refactor * add timestamps * Add support for showing bootloaders * tweak the color for bootloaders * Align bootloader disconnect with connect color * add support for showing all bootloaders * fix the pyusb check * tweaks * fix exception * hide a stack trace behind -v * add --no-bootloaders option * add documentation for qmk console * Apply suggestions from code review * pyformat * clean up and flesh out KNOWN_BOOTLOADERS * Remove pointless SERIAL_LINK_ENABLE rules (#12846) * Make Swap Hands use PROGMEM (#12284) This converts the array that the Swap Hands feature uses to use PROGMEM, and to read from that array, as such. Since this array never changes at runtime, there is no reason to keep it in memory. Especially for AVR boards, as memory is a precious resource. * Fix another bin/qmk reference (#12856) * [Keymap] Turn OLED off on suspend in soundmonster keymap (#10419) * Fixup build errors on `develop` branch. (#12723) * LED Matrix: Effects! (#12651) * Fix syntax error when compiling for ARM (#12866) * Remove KEYMAP and LAYOUT_kc (#12160) * alias KEYMAP to LAYOUT * remove KEYMAP and LAYOUT_kc * Add setup, clone, and env to the list of commands we allow even with broken modules (#12868) * Rename `point_t` -> `led_point_t` (#12864) * [Keyboard] updated a vendor name / fixed minor keymap issues (#12881) * Add missing LED Matrix suspend code to suspend.c (#12878) * LED Matrix: Documentation (#12685) * Deprecate `send_unicode_hex_string()` (#12602) * Fix spelling mistake regarding LED Matrix in split_common. (#12888) * [Keymap] Fix QWERTY/DVORAK status output for kzar keymap (#12895) * Use milc.subcommand.config instead of qmk.cli.config (#12915) * Use milc.subcommand.config instead * pyformat * remove the config test * Add function to allow repeated blinking of one layer (#12237) * Implement function rgblight_blink_layer_repeat to allow repeated blinking of one layer at a time * Update doc * Rework rgblight blinking according to requested change * optimize storage * Fixup housekeeping from being invoked twice per loop. (#12933) * matrix: wait for row signal to go HIGH for every row (#12945) I noticed this discrepancy (last row of the matrix treated differently than the others) when optimizing the input latency of my keyboard controller, see also https://michael.stapelberg.ch/posts/2021-05-08-keyboard-input-latency-qmk-kinesis/ Before this commit, when tuning the delays I noticed ghost key presses when pressing the F2 key, which is on the last row of the keyboard matrix: the dead_grave key, which is on the first row of the keyboard matrix, would be incorrectly detected as pressed. After this commit, all keyboard matrix rows are interpreted correctly. I suspect that my setup is more susceptible to this nuance than others because I use GPIO_INPUT_PIN_DELAY=0 and hence don’t have another delay that might mask the problem. * ensure we do not conflict with existing keymap aliases (#12976) * Add support for up to 4 IS31FL3733 drivers (#12342) * Convert Encoder callbacks to be boolean functions (#12805) * [Keyboard] Fix Terrazzo build failure (#12977) * Do not hard set config in CPTC files (#11864) * [Keyboard] Corne - Remove legacy revision support (#12226) * [Keymap] Update to Drashna keymap and user code (based on develop) (#12936) * Add Full-duplex serial driver for ARM boards (#9842) * Document LED_MATRIX_FRAMEBUFFER_EFFECTS (#12987) * Backlight: add defines for default level and breathing state (#12560) * Add dire message about LUFA mass storage bootloader (#13014) * [Keyboard] Remove redundant legacy and common headers for crkbd (#13023) Was causing compiler errors on some systems. * Fix keyboards/keymaps for boolean encoder callback changes (#12985) * `backlight.c`: include `eeprom.h` (#13024) * Add changelog for 2021-05-29 Breaking Changes merge (#12939) * Add ChangeLog for 2021-05-29 Breaking Changes Merge: initial version * Add recent develop changes * Sort recent develop changes * Remove sections for ChibiOS changes per tzarc No ChibiOS changes this round. * Add and sort recent develop changes * add notes about keyboard moves/deletions * import changelog for PR 12172 Documents the change to BOOTMAGIC_ENABLE. * update section headings * re-sort changelog * add additional note regarding Bootmagic changes * remove changelog timestamp * update dates in main Breaking Changes docs * fix broken section anchors in previous changelogs * add link to backlight/eeprom patch to changelog * highlight some more changes * link PRs from section headers * Restore standard readme * run: qmk cformat --core-only
Diffstat (limited to 'quantum/quantum_keycodes.h')
-rw-r--r--quantum/quantum_keycodes.h925
1 files changed, 443 insertions, 482 deletions
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index e49f8dcda..316c20fce 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -16,19 +16,7 @@
16 16
17#pragma once 17#pragma once
18 18
19#if defined(SEQUENCER_ENABLE) 19#include "sequencer.h"
20# include "sequencer.h"
21#endif
22
23#ifndef MIDI_ENABLE_STRICT
24# define MIDI_ENABLE_STRICT 0
25#endif
26
27#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
28# ifndef MIDI_TONE_KEYCODE_OCTAVES
29# define MIDI_TONE_KEYCODE_OCTAVES 3
30# endif
31#endif
32 20
33// Fillers to make layering more clear 21// Fillers to make layering more clear
34#define _______ KC_TRNS 22#define _______ KC_TRNS
@@ -67,6 +55,8 @@ enum quantum_keycodes {
67 QK_ONE_SHOT_LAYER_MAX = 0x54FF, 55 QK_ONE_SHOT_LAYER_MAX = 0x54FF,
68 QK_ONE_SHOT_MOD = 0x5500, 56 QK_ONE_SHOT_MOD = 0x5500,
69 QK_ONE_SHOT_MOD_MAX = 0x55FF, 57 QK_ONE_SHOT_MOD_MAX = 0x55FF,
58 QK_SWAP_HANDS = 0x5600,
59 QK_SWAP_HANDS_MAX = 0x56FF,
70 QK_TAP_DANCE = 0x5700, 60 QK_TAP_DANCE = 0x5700,
71 QK_TAP_DANCE_MAX = 0x57FF, 61 QK_TAP_DANCE_MAX = 0x57FF,
72 QK_LAYER_TAP_TOGGLE = 0x5800, 62 QK_LAYER_TAP_TOGGLE = 0x5800,
@@ -77,507 +67,458 @@ enum quantum_keycodes {
77 QK_STENO_BOLT = 0x5A30, 67 QK_STENO_BOLT = 0x5A30,
78 QK_STENO_GEMINI = 0x5A31, 68 QK_STENO_GEMINI = 0x5A31,
79 QK_STENO_MAX = 0x5A3F, 69 QK_STENO_MAX = 0x5A3F,
80 QK_SWAP_HANDS = 0x5B00, 70 // 0x5C00 - 0x5FFF are reserved, see below
81 QK_SWAP_HANDS_MAX = 0x5BFF, 71 QK_MOD_TAP = 0x6000,
82 QK_MOD_TAP = 0x6000, 72 QK_MOD_TAP_MAX = 0x7FFF,
83 QK_MOD_TAP_MAX = 0x7FFF, 73 QK_UNICODE = 0x8000,
84 QK_UNICODE = 0x8000, 74 QK_UNICODE_MAX = 0xFFFF,
85 QK_UNICODE_MAX = 0xFFFF, 75 QK_UNICODEMAP = 0x8000,
86 QK_UNICODEMAP = 0x8000, 76 QK_UNICODEMAP_MAX = 0xBFFF,
87 QK_UNICODEMAP_MAX = 0xBFFF, 77 QK_UNICODEMAP_PAIR = 0xC000,
88 QK_UNICODEMAP_PAIR = 0xC000, 78 QK_UNICODEMAP_PAIR_MAX = 0xFFFF,
89 QK_UNICODEMAP_PAIR_MAX = 0xFFFF,
90 79
91 // Loose keycodes - to be used directly 80 // Loose keycodes - to be used directly
92 RESET = 0x5C00, 81 RESET = 0x5C00,
93 DEBUG, 82 DEBUG, // 5C01
94 MAGIC_SWAP_CONTROL_CAPSLOCK, 83
95 MAGIC_CAPSLOCK_TO_CONTROL, 84 // Magic
96 MAGIC_SWAP_LALT_LGUI, 85 MAGIC_SWAP_CONTROL_CAPSLOCK, // 5C02
97 MAGIC_SWAP_RALT_RGUI, 86 MAGIC_CAPSLOCK_TO_CONTROL, // 5C03
98 MAGIC_NO_GUI, 87 MAGIC_SWAP_LALT_LGUI, // 5C04
99 MAGIC_SWAP_GRAVE_ESC, 88 MAGIC_SWAP_RALT_RGUI, // 5C05
100 MAGIC_SWAP_BACKSLASH_BACKSPACE, 89 MAGIC_NO_GUI, // 5C06
101 MAGIC_HOST_NKRO, 90 MAGIC_SWAP_GRAVE_ESC, // 5C07
102 MAGIC_SWAP_ALT_GUI, 91 MAGIC_SWAP_BACKSLASH_BACKSPACE, // 5C08
103 MAGIC_UNSWAP_CONTROL_CAPSLOCK, 92 MAGIC_HOST_NKRO, // 5C09
104 MAGIC_UNCAPSLOCK_TO_CONTROL, 93 MAGIC_SWAP_ALT_GUI, // 5C0A
105 MAGIC_UNSWAP_LALT_LGUI, 94 MAGIC_UNSWAP_CONTROL_CAPSLOCK, // 5C0B
106 MAGIC_UNSWAP_RALT_RGUI, 95 MAGIC_UNCAPSLOCK_TO_CONTROL, // 5C0C
107 MAGIC_UNNO_GUI, 96 MAGIC_UNSWAP_LALT_LGUI, // 5C0D
108 MAGIC_UNSWAP_GRAVE_ESC, 97 MAGIC_UNSWAP_RALT_RGUI, // 5C0E
109 MAGIC_UNSWAP_BACKSLASH_BACKSPACE, 98 MAGIC_UNNO_GUI, // 5C0F
110 MAGIC_UNHOST_NKRO, 99 MAGIC_UNSWAP_GRAVE_ESC, // 5C10
111 MAGIC_UNSWAP_ALT_GUI, 100 MAGIC_UNSWAP_BACKSLASH_BACKSPACE, // 5C11
112 MAGIC_TOGGLE_NKRO, 101 MAGIC_UNHOST_NKRO, // 5C12
113 MAGIC_TOGGLE_ALT_GUI, 102 MAGIC_UNSWAP_ALT_GUI, // 5C13
114 GRAVE_ESC, 103 MAGIC_TOGGLE_NKRO, // 5C14
115 104 MAGIC_TOGGLE_ALT_GUI, // 5C15
116// Leader key 105
117#ifdef LEADER_ENABLE 106 // Grave Escape
118 KC_LEAD, 107 GRAVE_ESC, // 5C16
119#endif 108
120 109 // Auto Shift
121// Auto Shift setup 110 KC_ASUP, // 5C17
122#ifndef AUTO_SHIFT_NO_SETUP 111 KC_ASDN, // 5C18
123 KC_ASUP, 112 KC_ASRP, // 5C19
124 KC_ASDN, 113 KC_ASTG, // 5C1A
125 KC_ASRP, 114 KC_ASON, // 5C1B
126#endif 115 KC_ASOFF, // 5C1C
127 KC_ASTG, 116
128 KC_ASON, 117 // Audio
129 KC_ASOFF, 118 AU_ON, // 5C1D
130 119 AU_OFF, // 5C1E
131 // Audio on/off/toggle 120 AU_TOG, // 5C1F
132 AU_ON, 121
133 AU_OFF, 122 // Audio Clicky
134 AU_TOG, 123 CLICKY_TOGGLE, // 5C20
135 124 CLICKY_ENABLE, // 5C21
136 // Faux clicky as part of main audio feature 125 CLICKY_DISABLE, // 5C22
137 CLICKY_TOGGLE, 126 CLICKY_UP, // 5C23
138 CLICKY_ENABLE, 127 CLICKY_DOWN, // 5C24
139 CLICKY_DISABLE, 128 CLICKY_RESET, // 5C25
140 CLICKY_UP, 129
141 CLICKY_DOWN, 130 // Music mode
142 CLICKY_RESET, 131 MU_ON, // 5C26
143 132 MU_OFF, // 5C27
144 // Music mode on/off/toggle 133 MU_TOG, // 5C28
145 MU_ON, 134 MU_MOD, // 5C29
146 MU_OFF, 135 MUV_IN, // 5C2A
147 MU_TOG, 136 MUV_DE, // 5C2B
148 137
149 // Music mode cycle 138 // MIDI
150 MU_MOD, 139 MI_ON, // 5C2C
151 140 MI_OFF, // 5C2D
152 // Music voice iterate 141 MI_TOG, // 5C2E
153 MUV_IN, 142
154 MUV_DE, 143 MI_C, // 5C2F
155 144 MI_Cs, // 5C30
156// Midi
157#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
158 MI_ON,
159 MI_OFF,
160 MI_TOG,
161#endif
162
163#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
164 MIDI_TONE_MIN,
165
166# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0
167 MI_C = MIDI_TONE_MIN,
168 MI_Cs,
169 MI_Db = MI_Cs, 145 MI_Db = MI_Cs,
170 MI_D, 146 MI_D, // 5C31
171 MI_Ds, 147 MI_Ds, // 5C32
172 MI_Eb = MI_Ds, 148 MI_Eb = MI_Ds,
173 MI_E, 149 MI_E, // 5C33
174 MI_F, 150 MI_F, // 5C34
175 MI_Fs, 151 MI_Fs, // 5C35
176 MI_Gb = MI_Fs, 152 MI_Gb = MI_Fs,
177 MI_G, 153 MI_G, // 5C36
178 MI_Gs, 154 MI_Gs, // 5C37
179 MI_Ab = MI_Gs, 155 MI_Ab = MI_Gs,
180 MI_A, 156 MI_A, // 5C38
181 MI_As, 157 MI_As, // 5C39
182 MI_Bb = MI_As, 158 MI_Bb = MI_As,
183 MI_B, 159 MI_B, // 5C3A
184# endif
185 160
186# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1 161 MI_C_1, // 5C3B
187 MI_C_1, 162 MI_Cs_1, // 5C3C
188 MI_Cs_1,
189 MI_Db_1 = MI_Cs_1, 163 MI_Db_1 = MI_Cs_1,
190 MI_D_1, 164 MI_D_1, // 5C3D
191 MI_Ds_1, 165 MI_Ds_1, // 5C3E
192 MI_Eb_1 = MI_Ds_1, 166 MI_Eb_1 = MI_Ds_1,
193 MI_E_1, 167 MI_E_1, // 5C3F
194 MI_F_1, 168 MI_F_1, // 5C40
195 MI_Fs_1, 169 MI_Fs_1, // 5C41
196 MI_Gb_1 = MI_Fs_1, 170 MI_Gb_1 = MI_Fs_1,
197 MI_G_1, 171 MI_G_1, // 5C42
198 MI_Gs_1, 172 MI_Gs_1, // 5C43
199 MI_Ab_1 = MI_Gs_1, 173 MI_Ab_1 = MI_Gs_1,
200 MI_A_1, 174 MI_A_1, // 5C44
201 MI_As_1, 175 MI_As_1, // 5C45
202 MI_Bb_1 = MI_As_1, 176 MI_Bb_1 = MI_As_1,
203 MI_B_1, 177 MI_B_1, // 5C46
204# endif
205 178
206# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2 179 MI_C_2, // 5C47
207 MI_C_2, 180 MI_Cs_2, // 5C48
208 MI_Cs_2,
209 MI_Db_2 = MI_Cs_2, 181 MI_Db_2 = MI_Cs_2,
210 MI_D_2, 182 MI_D_2, // 5C49
211 MI_Ds_2, 183 MI_Ds_2, // 5C4A
212 MI_Eb_2 = MI_Ds_2, 184 MI_Eb_2 = MI_Ds_2,
213 MI_E_2, 185 MI_E_2, // 5C4B
214 MI_F_2, 186 MI_F_2, // 5C4C
215 MI_Fs_2, 187 MI_Fs_2, // 5C4D
216 MI_Gb_2 = MI_Fs_2, 188 MI_Gb_2 = MI_Fs_2,
217 MI_G_2, 189 MI_G_2, // 5C4E
218 MI_Gs_2, 190 MI_Gs_2, // 5C4F
219 MI_Ab_2 = MI_Gs_2, 191 MI_Ab_2 = MI_Gs_2,
220 MI_A_2, 192 MI_A_2, // 5C50
221 MI_As_2, 193 MI_As_2, // 5C51
222 MI_Bb_2 = MI_As_2, 194 MI_Bb_2 = MI_As_2,
223 MI_B_2, 195 MI_B_2, // 5C52
224# endif
225 196
226# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3 197 MI_C_3, // 5C53
227 MI_C_3, 198 MI_Cs_3, // 5C54
228 MI_Cs_3,
229 MI_Db_3 = MI_Cs_3, 199 MI_Db_3 = MI_Cs_3,
230 MI_D_3, 200 MI_D_3, // 5C55
231 MI_Ds_3, 201 MI_Ds_3, // 5C56
232 MI_Eb_3 = MI_Ds_3, 202 MI_Eb_3 = MI_Ds_3,
233 MI_E_3, 203 MI_E_3, // 5C57
234 MI_F_3, 204 MI_F_3, // 5C58
235 MI_Fs_3, 205 MI_Fs_3, // 5C59
236 MI_Gb_3 = MI_Fs_3, 206 MI_Gb_3 = MI_Fs_3,
237 MI_G_3, 207 MI_G_3, // 5C5A
238 MI_Gs_3, 208 MI_Gs_3, // 5C5B
239 MI_Ab_3 = MI_Gs_3, 209 MI_Ab_3 = MI_Gs_3,
240 MI_A_3, 210 MI_A_3, // 5C5C
241 MI_As_3, 211 MI_As_3, // 5C5D
242 MI_Bb_3 = MI_As_3, 212 MI_Bb_3 = MI_As_3,
243 MI_B_3, 213 MI_B_3, // 5C5E
244# endif
245 214
246# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4 215 MI_C_4, // 5C5F
247 MI_C_4, 216 MI_Cs_4, // 5C60
248 MI_Cs_4,
249 MI_Db_4 = MI_Cs_4, 217 MI_Db_4 = MI_Cs_4,
250 MI_D_4, 218 MI_D_4, // 5C61
251 MI_Ds_4, 219 MI_Ds_4, // 5C62
252 MI_Eb_4 = MI_Ds_4, 220 MI_Eb_4 = MI_Ds_4,
253 MI_E_4, 221 MI_E_4, // 5C63
254 MI_F_4, 222 MI_F_4, // 5C64
255 MI_Fs_4, 223 MI_Fs_4, // 5C65
256 MI_Gb_4 = MI_Fs_4, 224 MI_Gb_4 = MI_Fs_4,
257 MI_G_4, 225 MI_G_4, // 5C66
258 MI_Gs_4, 226 MI_Gs_4, // 5C67
259 MI_Ab_4 = MI_Gs_4, 227 MI_Ab_4 = MI_Gs_4,
260 MI_A_4, 228 MI_A_4, // 5C68
261 MI_As_4, 229 MI_As_4, // 5C69
262 MI_Bb_4 = MI_As_4, 230 MI_Bb_4 = MI_As_4,
263 MI_B_4, 231 MI_B_4, // 5C6A
264# endif
265 232
266# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 233 MI_C_5, // 5C6B
267 MI_C_5, 234 MI_Cs_5, // 5C6C
268 MI_Cs_5,
269 MI_Db_5 = MI_Cs_5, 235 MI_Db_5 = MI_Cs_5,
270 MI_D_5, 236 MI_D_5, // 5C6D
271 MI_Ds_5, 237 MI_Ds_5, // 5C6E
272 MI_Eb_5 = MI_Ds_5, 238 MI_Eb_5 = MI_Ds_5,
273 MI_E_5, 239 MI_E_5, // 5C6F
274 MI_F_5, 240 MI_F_5, // 5C70
275 MI_Fs_5, 241 MI_Fs_5, // 5C71
276 MI_Gb_5 = MI_Fs_5, 242 MI_Gb_5 = MI_Fs_5,
277 MI_G_5, 243 MI_G_5, // 5C72
278 MI_Gs_5, 244 MI_Gs_5, // 5C73
279 MI_Ab_5 = MI_Gs_5, 245 MI_Ab_5 = MI_Gs_5,
280 MI_A_5, 246 MI_A_5, // 5C74
281 MI_As_5, 247 MI_As_5, // 5C75
282 MI_Bb_5 = MI_As_5, 248 MI_Bb_5 = MI_As_5,
283 MI_B_5, 249 MI_B_5, // 5C76
284# endif 250
285 251 MI_OCT_N2, // 5C77
286# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 252 MI_OCT_N1, // 5C78
287 MIDI_TONE_MAX = MI_B_5, 253 MI_OCT_0, // 5C79
288# elif MIDI_TONE_KEYCODE_OCTAVES > 4 254 MI_OCT_1, // 5C7A
289 MIDI_TONE_MAX = MI_B_4, 255 MI_OCT_2, // 5C7B
290# elif MIDI_TONE_KEYCODE_OCTAVES > 3 256 MI_OCT_3, // 5C7C
291 MIDI_TONE_MAX = MI_B_3, 257 MI_OCT_4, // 5C7D
292# elif MIDI_TONE_KEYCODE_OCTAVES > 2 258 MI_OCT_5, // 5C7E
293 MIDI_TONE_MAX = MI_B_2, 259 MI_OCT_6, // 5C7F
294# elif MIDI_TONE_KEYCODE_OCTAVES > 1 260 MI_OCT_7, // 5C80
295 MIDI_TONE_MAX = MI_B_1, 261 MI_OCTD, // 5C81
296# elif MIDI_TONE_KEYCODE_OCTAVES > 0 262 MI_OCTU, // 5C82
297 MIDI_TONE_MAX = MI_B, 263
298# endif 264 MI_TRNS_N6, // 5C83
299 265 MI_TRNS_N5, // 5C84
300 MIDI_OCTAVE_MIN, 266 MI_TRNS_N4, // 5C85
301 MI_OCT_N2 = MIDI_OCTAVE_MIN, 267 MI_TRNS_N3, // 5C86
302 MI_OCT_N1, 268 MI_TRNS_N2, // 5C87
303 MI_OCT_0, 269 MI_TRNS_N1, // 5C88
304 MI_OCT_1, 270 MI_TRNS_0, // 5C89
305 MI_OCT_2, 271 MI_TRNS_1, // 5C8A
306 MI_OCT_3, 272 MI_TRNS_2, // 5C8B
307 MI_OCT_4, 273 MI_TRNS_3, // 5C8C
308 MI_OCT_5, 274 MI_TRNS_4, // 5C8D
309 MI_OCT_6, 275 MI_TRNS_5, // 5C8E
310 MI_OCT_7, 276 MI_TRNS_6, // 5C8F
311 MIDI_OCTAVE_MAX = MI_OCT_7, 277 MI_TRNSD, // 5C90
312 MI_OCTD, // octave down 278 MI_TRNSU, // 5C91
313 MI_OCTU, // octave up 279
314 280 MI_VEL_0, // 5C92
315 MIDI_TRANSPOSE_MIN, 281#ifdef VIA_ENABLE
316 MI_TRNS_N6 = MIDI_TRANSPOSE_MIN, 282 MI_VEL_1 = MI_VEL_0,
317 MI_TRNS_N5, 283#else
318 MI_TRNS_N4, 284 MI_VEL_1, // 5C93
319 MI_TRNS_N3,
320 MI_TRNS_N2,
321 MI_TRNS_N1,
322 MI_TRNS_0,
323 MI_TRNS_1,
324 MI_TRNS_2,
325 MI_TRNS_3,
326 MI_TRNS_4,
327 MI_TRNS_5,
328 MI_TRNS_6,
329 MIDI_TRANSPOSE_MAX = MI_TRNS_6,
330 MI_TRNSD, // transpose down
331 MI_TRNSU, // transpose up
332
333 MIDI_VELOCITY_MIN,
334 MI_VEL_0 = MIDI_VELOCITY_MIN,
335# ifdef VIA_ENABLE
336 MI_VEL_1 = MIDI_VELOCITY_MIN,
337# else
338 MI_VEL_1,
339# endif
340 MI_VEL_2,
341 MI_VEL_3,
342 MI_VEL_4,
343 MI_VEL_5,
344 MI_VEL_6,
345 MI_VEL_7,
346 MI_VEL_8,
347 MI_VEL_9,
348 MI_VEL_10,
349 MIDI_VELOCITY_MAX = MI_VEL_10,
350 MI_VELD, // velocity down
351 MI_VELU, // velocity up
352
353 MIDI_CHANNEL_MIN,
354 MI_CH1 = MIDI_CHANNEL_MIN,
355 MI_CH2,
356 MI_CH3,
357 MI_CH4,
358 MI_CH5,
359 MI_CH6,
360 MI_CH7,
361 MI_CH8,
362 MI_CH9,
363 MI_CH10,
364 MI_CH11,
365 MI_CH12,
366 MI_CH13,
367 MI_CH14,
368 MI_CH15,
369 MI_CH16,
370 MIDI_CHANNEL_MAX = MI_CH16,
371 MI_CHD, // previous channel
372 MI_CHU, // next channel
373
374 MI_ALLOFF, // all notes off
375
376 MI_SUS, // sustain
377 MI_PORT, // portamento
378 MI_SOST, // sostenuto
379 MI_SOFT, // soft pedal
380 MI_LEG, // legato
381
382 MI_MOD, // modulation
383 MI_MODSD, // decrease modulation speed
384 MI_MODSU, // increase modulation speed
385
386 MI_BENDD, // Bend down
387 MI_BENDU, // Bend up
388#endif // MIDI_ADVANCED
389
390 // Backlight functionality
391 BL_ON,
392 BL_OFF,
393 BL_DEC,
394 BL_INC,
395 BL_TOGG,
396 BL_STEP,
397 BL_BRTG,
398
399 // RGB functionality
400 RGB_TOG,
401 RGB_MODE_FORWARD,
402 RGB_MODE_REVERSE,
403 RGB_HUI,
404 RGB_HUD,
405 RGB_SAI,
406 RGB_SAD,
407 RGB_VAI,
408 RGB_VAD,
409 RGB_SPI,
410 RGB_SPD,
411 RGB_MODE_PLAIN,
412 RGB_MODE_BREATHE,
413 RGB_MODE_RAINBOW,
414 RGB_MODE_SWIRL,
415 RGB_MODE_SNAKE,
416 RGB_MODE_KNIGHT,
417 RGB_MODE_XMAS,
418 RGB_MODE_GRADIENT,
419 RGB_MODE_RGBTEST,
420
421 // Momentum matching toggle
422 VLK_TOG,
423
424 // Left shift, open paren
425 KC_LSPO,
426
427 // Right shift, close paren
428 KC_RSPC,
429
430 // Shift, Enter
431 KC_SFTENT,
432
433 // Printing
434 PRINT_ON,
435 PRINT_OFF,
436
437 // output selection
438 OUT_AUTO,
439 OUT_USB,
440#ifdef BLUETOOTH_ENABLE
441 OUT_BT,
442#endif
443
444#ifdef KEY_LOCK_ENABLE
445 KC_LOCK,
446#endif 285#endif
447 286 MI_VEL_2, // 5C94
448#ifdef TERMINAL_ENABLE 287 MI_VEL_3, // 5C95
449 TERM_ON, 288 MI_VEL_4, // 5C96
450 TERM_OFF, 289 MI_VEL_5, // 5C97
451#endif 290 MI_VEL_6, // 5C98
452 291 MI_VEL_7, // 5C99
453 EEPROM_RESET, 292 MI_VEL_8, // 5C9A
454 293 MI_VEL_9, // 5C9B
455 UNICODE_MODE_FORWARD, 294 MI_VEL_10, // 5C9C
456 UNICODE_MODE_REVERSE, 295 MI_VELD, // 5C9D
457 UNICODE_MODE_MAC, 296 MI_VELU, // 5C9E
458 UNICODE_MODE_LNX, 297
459 UNICODE_MODE_WIN, 298 MI_CH1, // 5C9F
460 UNICODE_MODE_BSD, 299 MI_CH2, // 5CA0
461 UNICODE_MODE_WINC, 300 MI_CH3, // 5CA1
462 301 MI_CH4, // 5CA2
463 HPT_ON, 302 MI_CH5, // 5CA3
464 HPT_OFF, 303 MI_CH6, // 5CA4
465 HPT_TOG, 304 MI_CH7, // 5CA5
466 HPT_RST, 305 MI_CH8, // 5CA6
467 HPT_FBK, 306 MI_CH9, // 5CA7
468 HPT_BUZ, 307 MI_CH10, // 5CA8
469 HPT_MODI, 308 MI_CH11, // 5CA9
470 HPT_MODD, 309 MI_CH12, // 5CAA
471 HPT_CONT, 310 MI_CH13, // 5CAB
472 HPT_CONI, 311 MI_CH14, // 5CAC
473 HPT_COND, 312 MI_CH15, // 5CAD
474 HPT_DWLI, 313 MI_CH16, // 5CAE
475 HPT_DWLD, 314 MI_CHD, // 5CAF
476 315 MI_CHU, // 5CB0
477 // Left control, open paren 316
478 KC_LCPO, 317 MI_ALLOFF, // 5CB1
479 318
480 // Right control, close paren 319 MI_SUS, // 5CB2
481 KC_RCPC, 320 MI_PORT, // 5CB3
482 321 MI_SOST, // 5CB4
483 // Left control, open paren 322 MI_SOFT, // 5CB5
484 KC_LAPO, 323 MI_LEG, // 5CB6
485 324
486 // Right control, close paren 325 MI_MOD, // 5CB7
487 KC_RAPC, 326 MI_MODSD, // 5CB8
488 327 MI_MODSU, // 5CB9
489 CMB_ON, 328
490 CMB_OFF, 329 MI_BENDD, // 5CBA
491 CMB_TOG, 330 MI_BENDU, // 5CBB
492 331
493 MAGIC_SWAP_LCTL_LGUI, 332 // Backlight
494 MAGIC_SWAP_RCTL_RGUI, 333 BL_ON, // 5CBC
495 MAGIC_UNSWAP_LCTL_LGUI, 334 BL_OFF, // 5CBD
496 MAGIC_UNSWAP_RCTL_RGUI, 335 BL_DEC, // 5CBE
497 MAGIC_SWAP_CTL_GUI, 336 BL_INC, // 5CBF
498 MAGIC_UNSWAP_CTL_GUI, 337 BL_TOGG, // 5CC0
499 MAGIC_TOGGLE_CTL_GUI, 338 BL_STEP, // 5CC1
500 MAGIC_EE_HANDS_LEFT, 339 BL_BRTG, // 5CC2
501 MAGIC_EE_HANDS_RIGHT, 340
341 // RGB underglow/matrix
342 RGB_TOG, // 5CC3
343 RGB_MODE_FORWARD, // 5CC4
344 RGB_MODE_REVERSE, // 5CC5
345 RGB_HUI, // 5CC6
346 RGB_HUD, // 5CC7
347 RGB_SAI, // 5CC8
348 RGB_SAD, // 5CC9
349 RGB_VAI, // 5CCA
350 RGB_VAD, // 5CCB
351 RGB_SPI, // 5CCC
352 RGB_SPD, // 5CCD
353 RGB_MODE_PLAIN, // 5CCE
354 RGB_MODE_BREATHE, // 5CCF
355 RGB_MODE_RAINBOW, // 5CD0
356 RGB_MODE_SWIRL, // 5CD1
357 RGB_MODE_SNAKE, // 5CD2
358 RGB_MODE_KNIGHT, // 5CD3
359 RGB_MODE_XMAS, // 5CD4
360 RGB_MODE_GRADIENT, // 5CD5
361 RGB_MODE_RGBTEST, // 5CD6
362
363 // Velocikey
364 VLK_TOG, // 5CD7
365
366 // Space Cadet
367 KC_LSPO, // 5CD8
368 KC_RSPC, // 5CD9
369 KC_SFTENT, // 5CDA
370
371 // Thermal Printer
372 PRINT_ON, // 5CDB
373 PRINT_OFF, // 5CDC
374
375 // Bluetooth: output selection
376 OUT_AUTO, // 5CDD
377 OUT_USB, // 5CDE
378
379 // Clear EEPROM
380 EEPROM_RESET, // 5CDF
381
382 // Unicode
383 UNICODE_MODE_FORWARD, // 5CE0
384 UNICODE_MODE_REVERSE, // 5CE1
385 UNICODE_MODE_MAC, // 5CE2
386 UNICODE_MODE_LNX, // 5CE3
387 UNICODE_MODE_WIN, // 5CE4
388 UNICODE_MODE_BSD, // 5CE5
389 UNICODE_MODE_WINC, // 5CE6
390
391 // Haptic
392 HPT_ON, // 5CE7
393 HPT_OFF, // 5CE8
394 HPT_TOG, // 5CE9
395 HPT_RST, // 5CEA
396 HPT_FBK, // 5CEB
397 HPT_BUZ, // 5CEC
398 HPT_MODI, // 5CED
399 HPT_MODD, // 5CEE
400 HPT_CONT, // 5CEF
401 HPT_CONI, // 5CF0
402 HPT_COND, // 5CF1
403 HPT_DWLI, // 5CF2
404 HPT_DWLD, // 5CF3
405
406 // Space Cadet (continued)
407 KC_LCPO, // 5CF4
408 KC_RCPC, // 5CF5
409 KC_LAPO, // 5CF6
410 KC_RAPC, // 5CF7
411
412 // Combos
413 CMB_ON, // 5CF8
414 CMB_OFF, // 5CF9
415 CMB_TOG, // 5CFA
416
417 // Magic (continued)
418 MAGIC_SWAP_LCTL_LGUI, // 5CFB
419 MAGIC_SWAP_RCTL_RGUI, // 5CFC
420 MAGIC_UNSWAP_LCTL_LGUI, // 5CFD
421 MAGIC_UNSWAP_RCTL_RGUI, // 5CFE
422 MAGIC_SWAP_CTL_GUI, // 5CFF
423 MAGIC_UNSWAP_CTL_GUI, // 5D00
424 MAGIC_TOGGLE_CTL_GUI, // 5D01
425 MAGIC_EE_HANDS_LEFT, // 5D02
426 MAGIC_EE_HANDS_RIGHT, // 5D03
502 427
503 // Dynamic Macros 428 // Dynamic Macros
504 DYN_REC_START1, 429 DYN_REC_START1, // 5D04
505 DYN_REC_START2, 430 DYN_REC_START2, // 5D05
506 DYN_REC_STOP, 431 DYN_REC_STOP, // 5D06
507 DYN_MACRO_PLAY1, 432 DYN_MACRO_PLAY1, // 5D07
508 DYN_MACRO_PLAY2, 433 DYN_MACRO_PLAY2, // 5D08
509 434
510 JS_BUTTON0, 435 // Joystick
511 JS_BUTTON_MIN = JS_BUTTON0, 436 JS_BUTTON0, // 5D09
512 JS_BUTTON1, 437 JS_BUTTON1, // 5D0A
513 JS_BUTTON2, 438 JS_BUTTON2, // 5D0B
514 JS_BUTTON3, 439 JS_BUTTON3, // 5D0C
515 JS_BUTTON4, 440 JS_BUTTON4, // 5D0D
516 JS_BUTTON5, 441 JS_BUTTON5, // 5D0E
517 JS_BUTTON6, 442 JS_BUTTON6, // 5D0F
518 JS_BUTTON7, 443 JS_BUTTON7, // 5D10
519 JS_BUTTON8, 444 JS_BUTTON8, // 5D11
520 JS_BUTTON9, 445 JS_BUTTON9, // 5D12
521 JS_BUTTON10, 446 JS_BUTTON10, // 5D13
522 JS_BUTTON11, 447 JS_BUTTON11, // 5D14
523 JS_BUTTON12, 448 JS_BUTTON12, // 5D15
524 JS_BUTTON13, 449 JS_BUTTON13, // 5D16
525 JS_BUTTON14, 450 JS_BUTTON14, // 5D17
526 JS_BUTTON15, 451 JS_BUTTON15, // 5D18
527 JS_BUTTON16, 452 JS_BUTTON16, // 5D19
528 JS_BUTTON17, 453 JS_BUTTON17, // 5D1A
529 JS_BUTTON18, 454 JS_BUTTON18, // 5D1B
530 JS_BUTTON19, 455 JS_BUTTON19, // 5D1C
531 JS_BUTTON20, 456 JS_BUTTON20, // 5D1D
532 JS_BUTTON21, 457 JS_BUTTON21, // 5D1E
533 JS_BUTTON22, 458 JS_BUTTON22, // 5D1F
534 JS_BUTTON23, 459 JS_BUTTON23, // 5D20
535 JS_BUTTON24, 460 JS_BUTTON24, // 5D21
536 JS_BUTTON25, 461 JS_BUTTON25, // 5D22
537 JS_BUTTON26, 462 JS_BUTTON26, // 5D23
538 JS_BUTTON27, 463 JS_BUTTON27, // 5D24
539 JS_BUTTON28, 464 JS_BUTTON28, // 5D25
540 JS_BUTTON29, 465 JS_BUTTON29, // 5D26
541 JS_BUTTON30, 466 JS_BUTTON30, // 5D27
542 JS_BUTTON31, 467 JS_BUTTON31, // 5D28
543 JS_BUTTON_MAX = JS_BUTTON31, 468
544 469 // Leader Key
545#if defined(SEQUENCER_ENABLE) 470 KC_LEAD, // 5D29
546 SQ_ON, 471
547 SQ_OFF, 472 // Bluetooth: output selection (continued)
548 SQ_TOG, 473 OUT_BT, // 5D2A
549 474
550 SQ_TMPD, // Decrease tempo 475 // Lock Key
551 SQ_TMPU, // Increase tempo 476 KC_LOCK, // 5D2B
477
478 // Terminal
479 TERM_ON, // 5D2C
480 TERM_OFF, // 5D2D
481
482 // Sequencer
483 SQ_ON, // 5D2E
484 SQ_OFF, // 5D2F
485 SQ_TOG, // 5D30
486
487 SQ_TMPD, // 5D31
488 SQ_TMPU, // 5D32
489
490 SQ_RESD, // 5D33
491 SQ_RESU, // 5D34
492
493 SQ_SALL, // 5D35
494 SQ_SCLR, // 5D36
495
496 SEQUENCER_STEP_MIN, // 5D37
497 SEQUENCER_STEP_MAX = SEQUENCER_STEP_MIN + SEQUENCER_STEPS,
552 498
553 SEQUENCER_RESOLUTION_MIN, 499 SEQUENCER_RESOLUTION_MIN,
554 SEQUENCER_RESOLUTION_MAX = SEQUENCER_RESOLUTION_MIN + SEQUENCER_RESOLUTIONS, 500 SEQUENCER_RESOLUTION_MAX = SEQUENCER_RESOLUTION_MIN + SEQUENCER_RESOLUTIONS,
555 SQ_RESD, // Decrease resolution
556 SQ_RESU, // Increase resolution
557
558 SQ_SALL, // All steps on
559 SQ_SCLR, // All steps off
560 SEQUENCER_STEP_MIN,
561 SEQUENCER_STEP_MAX = SEQUENCER_STEP_MIN + SEQUENCER_STEPS,
562 501
563 SEQUENCER_TRACK_MIN, 502 SEQUENCER_TRACK_MIN,
564 SEQUENCER_TRACK_MAX = SEQUENCER_TRACK_MIN + SEQUENCER_TRACKS, 503 SEQUENCER_TRACK_MAX = SEQUENCER_TRACK_MIN + SEQUENCER_TRACKS,
565 504
566/** 505#define SQ_S(n) (n < SEQUENCER_STEPS ? SEQUENCER_STEP_MIN + n : KC_NO)
567 * Helpers to assign a keycode to a step, a resolution, or a track. 506#define SQ_R(n) (n < SEQUENCER_RESOLUTIONS ? SEQUENCER_RESOLUTION_MIN + n : KC_NO)
568 * Falls back to NOOP if n is out of range. 507#define SQ_T(n) (n < SEQUENCER_TRACKS ? SEQUENCER_TRACK_MIN + n : KC_NO)
569 */
570# define SQ_S(n) (n < SEQUENCER_STEPS ? SEQUENCER_STEP_MIN + n : XXXXXXX)
571# define SQ_R(n) (n < SEQUENCER_RESOLUTIONS ? SEQUENCER_RESOLUTION_MIN + n : XXXXXXX)
572# define SQ_T(n) (n < SEQUENCER_TRACKS ? SEQUENCER_TRACK_MIN + n : XXXXXXX)
573 508
574#endif 509 // One Shot
510 ONESHOT_ENABLE,
511 ONESHOT_DISABLE,
512 ONESHOT_TOGGLE,
513
514 // RGB underglow/matrix (continued)
515 RGB_MODE_TWINKLE,
575 516
576 // always leave at the end 517 // Start of custom keycode range for keyboards and keymaps - always leave at the end
577 SAFE_RANGE 518 SAFE_RANGE
578}; 519};
579 520
580// Ability to use mods in layouts 521// Keycode modifiers & aliases
581#define LCTL(kc) (QK_LCTL | (kc)) 522#define LCTL(kc) (QK_LCTL | (kc))
582#define LSFT(kc) (QK_LSFT | (kc)) 523#define LSFT(kc) (QK_LSFT | (kc))
583#define LALT(kc) (QK_LALT | (kc)) 524#define LALT(kc) (QK_LALT | (kc))
@@ -609,11 +550,7 @@ enum quantum_keycodes {
609#define MOD_HYPR 0xF 550#define MOD_HYPR 0xF
610#define MOD_MEH 0x7 551#define MOD_MEH 0x7
611 552
612// Aliases for shifted symbols 553// US ANSI shifted keycode aliases
613// Each key has a 4-letter code, and some have longer aliases too.
614// While the long aliases are descriptive, the 4-letter codes
615// make for nicer grid layouts (everything lines up), and are
616// the preferred style for Quantum.
617#define KC_TILD LSFT(KC_GRV) // ~ 554#define KC_TILD LSFT(KC_GRV) // ~
618#define KC_TILDE KC_TILD 555#define KC_TILDE KC_TILD
619 556
@@ -680,18 +617,15 @@ enum quantum_keycodes {
680 617
681#define KC_DELT KC_DELETE // Del key (four letter code) 618#define KC_DELT KC_DELETE // Del key (four letter code)
682 619
683// Alias for function layers than expand past FN31 620// Modified keycode aliases
684#define FUNC(kc) (QK_FUNCTION | (kc))
685
686// Aliases
687#define C(kc) LCTL(kc) 621#define C(kc) LCTL(kc)
688#define S(kc) LSFT(kc) 622#define S(kc) LSFT(kc)
689#define A(kc) LALT(kc) 623#define A(kc) LALT(kc)
690#define G(kc) LGUI(kc) 624#define G(kc) LGUI(kc)
691 625
692#define F(kc) FUNC(kc) 626// Deprecated - do not use
627#define F(kc) (QK_FUNCTION | (kc))
693#define M(kc) (QK_MACRO | (kc)) 628#define M(kc) (QK_MACRO | (kc))
694
695#define MACROTAP(kc) (QK_MACRO | (FUNC_TAP << 8) | (kc)) 629#define MACROTAP(kc) (QK_MACRO | (FUNC_TAP << 8) | (kc))
696#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) 630#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
697 631
@@ -699,19 +633,21 @@ enum quantum_keycodes {
699 633
700#define EEP_RST EEPROM_RESET 634#define EEP_RST EEPROM_RESET
701 635
636// Audio Clicky aliases
702#define CK_TOGG CLICKY_TOGGLE 637#define CK_TOGG CLICKY_TOGGLE
703#define CK_RST CLICKY_RESET 638#define CK_RST CLICKY_RESET
704#define CK_UP CLICKY_UP 639#define CK_UP CLICKY_UP
705#define CK_DOWN CLICKY_DOWN 640#define CK_DOWN CLICKY_DOWN
706#define CK_ON CLICKY_ENABLE 641#define CK_ON CLICKY_ENABLE
707#define CK_OFF CLICKY_DISABLE 642#define CK_OFF CLICKY_DISABLE
643// Fauxclicky (deprecated) redirects to Audio Clicky
708#define FC_ON CLICKY_ENABLE 644#define FC_ON CLICKY_ENABLE
709#define FC_OFF CLICKY_DISABLE 645#define FC_OFF CLICKY_DISABLE
710#define FC_TOGG CLICKY_TOGGLE 646#define FC_TOGG CLICKY_TOGGLE
711 647
648// RGB aliases
712#define RGB_MOD RGB_MODE_FORWARD 649#define RGB_MOD RGB_MODE_FORWARD
713#define RGB_RMOD RGB_MODE_REVERSE 650#define RGB_RMOD RGB_MODE_REVERSE
714
715#define RGB_M_P RGB_MODE_PLAIN 651#define RGB_M_P RGB_MODE_PLAIN
716#define RGB_M_B RGB_MODE_BREATHE 652#define RGB_M_B RGB_MODE_BREATHE
717#define RGB_M_R RGB_MODE_RAINBOW 653#define RGB_M_R RGB_MODE_RAINBOW
@@ -721,10 +657,9 @@ enum quantum_keycodes {
721#define RGB_M_X RGB_MODE_XMAS 657#define RGB_M_X RGB_MODE_XMAS
722#define RGB_M_G RGB_MODE_GRADIENT 658#define RGB_M_G RGB_MODE_GRADIENT
723#define RGB_M_T RGB_MODE_RGBTEST 659#define RGB_M_T RGB_MODE_RGBTEST
660#define RGB_M_TW RGB_MODE_TWINKLE
724 661
725// L-ayer, T-ap - 256 keycode max, 16 layer max 662// Magic aliases
726#define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF))
727
728#define CL_SWAP MAGIC_SWAP_CONTROL_CAPSLOCK 663#define CL_SWAP MAGIC_SWAP_CONTROL_CAPSLOCK
729#define CL_NORM MAGIC_UNSWAP_CONTROL_CAPSLOCK 664#define CL_NORM MAGIC_UNSWAP_CONTROL_CAPSLOCK
730#define CL_CTRL MAGIC_CAPSLOCK_TO_CONTROL 665#define CL_CTRL MAGIC_CAPSLOCK_TO_CONTROL
@@ -793,6 +728,9 @@ enum quantum_keycodes {
793// Layer tap-toggle 728// Layer tap-toggle
794#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0xFF)) 729#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0xFF))
795 730
731// L-ayer, T-ap - 256 keycode max, 16 layer max
732#define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF))
733
796// M-od, T-ap - 256 keycode max 734// M-od, T-ap - 256 keycode max
797#define MT(mod, kc) (QK_MOD_TAP | (((mod)&0x1F) << 8) | ((kc)&0xFF)) 735#define MT(mod, kc) (QK_MOD_TAP | (((mod)&0x1F) << 8) | ((kc)&0xFF))
798 736
@@ -822,12 +760,12 @@ enum quantum_keycodes {
822#define CMD_T(kc) LCMD_T(kc) 760#define CMD_T(kc) LCMD_T(kc)
823#define WIN_T(kc) LWIN_T(kc) 761#define WIN_T(kc) LWIN_T(kc)
824 762
825#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal 763#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal
826#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 764#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
827#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI 765#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI
828#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI 766#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI
829#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/ 767#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/
830#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI 768#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI
831#define SCMD_T(kc) SGUI_T(kc) 769#define SCMD_T(kc) SGUI_T(kc)
832#define SWIN_T(kc) SGUI_T(kc) 770#define SWIN_T(kc) SGUI_T(kc)
833#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt 771#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt
@@ -842,6 +780,7 @@ enum quantum_keycodes {
842#define KC_HYPR HYPR(KC_NO) 780#define KC_HYPR HYPR(KC_NO)
843#define KC_MEH MEH(KC_NO) 781#define KC_MEH MEH(KC_NO)
844 782
783// Unicode aliases
845// UNICODE_ENABLE - Allows Unicode input up to 0x7FFF 784// UNICODE_ENABLE - Allows Unicode input up to 0x7FFF
846#define UC(c) (QK_UNICODE | (c)) 785#define UC(c) (QK_UNICODE | (c))
847// UNICODEMAP_ENABLE - Allows Unicode input up to 0x10FFFF, requires unicode_map 786// UNICODEMAP_ENABLE - Allows Unicode input up to 0x10FFFF, requires unicode_map
@@ -853,12 +792,13 @@ enum quantum_keycodes {
853 792
854#define UC_M_MA UNICODE_MODE_MAC 793#define UC_M_MA UNICODE_MODE_MAC
855#define UNICODE_MODE_OSX UNICODE_MODE_MAC // Deprecated alias 794#define UNICODE_MODE_OSX UNICODE_MODE_MAC // Deprecated alias
856#define UC_M_OS UNICODE_MODE_MAC // Deprecated alias 795#define UC_M_OS UNICODE_MODE_MAC // Deprecated alias
857#define UC_M_LN UNICODE_MODE_LNX 796#define UC_M_LN UNICODE_MODE_LNX
858#define UC_M_WI UNICODE_MODE_WIN 797#define UC_M_WI UNICODE_MODE_WIN
859#define UC_M_BS UNICODE_MODE_BSD 798#define UC_M_BS UNICODE_MODE_BSD
860#define UC_M_WC UNICODE_MODE_WINC 799#define UC_M_WC UNICODE_MODE_WINC
861 800
801// Swap Hands
862#define SH_T(kc) (QK_SWAP_HANDS | (kc)) 802#define SH_T(kc) (QK_SWAP_HANDS | (kc))
863#define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) 803#define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE)
864#define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE) 804#define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE)
@@ -868,9 +808,30 @@ enum quantum_keycodes {
868#define SH_ON (QK_SWAP_HANDS | OP_SH_ON) 808#define SH_ON (QK_SWAP_HANDS | OP_SH_ON)
869#define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF) 809#define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF)
870 810
811// MIDI aliases
812#define MIDI_TONE_MIN MI_C
813#define MIDI_TONE_MAX MI_B_5
814#define MIDI_OCTAVE_MIN MI_OCT_N2
815#define MIDI_OCTAVE_MAX MI_OCT_7
816#define MIDI_TRANSPOSE_MIN MI_TRNS_N6
817#define MIDI_TRANSPOSE_MAX MI_TRNS_6
818#define MIDI_VELOCITY_MIN MI_VEL_0
819#define MIDI_VELOCITY_MAX MI_VEL_10
820#define MIDI_CHANNEL_MIN MI_CH1
821#define MIDI_CHANNEL_MAX MI_CH16
822
871// Dynamic Macros aliases 823// Dynamic Macros aliases
872#define DM_REC1 DYN_REC_START1 824#define DM_REC1 DYN_REC_START1
873#define DM_REC2 DYN_REC_START2 825#define DM_REC2 DYN_REC_START2
874#define DM_RSTP DYN_REC_STOP 826#define DM_RSTP DYN_REC_STOP
875#define DM_PLY1 DYN_MACRO_PLAY1 827#define DM_PLY1 DYN_MACRO_PLAY1
876#define DM_PLY2 DYN_MACRO_PLAY2 828#define DM_PLY2 DYN_MACRO_PLAY2
829
830// Joystick aliases
831#define JS_BUTTON_MIN JS_BUTTON0
832#define JS_BUTTON_MAX JS_BUTTON31
833
834// One Shot aliases
835#define OS_TOGG ONESHOT_TOGGLE
836#define OS_ON ONESHOT_ENABLE
837#define OS_OFF ONESHOT_DISABLE