forked from mirrors/qmk_firmware
Align magic keycodes (#19877)
This commit is contained in:
parent
93f2ed3abf
commit
403b0addea
7 changed files with 514 additions and 214 deletions
251
data/constants/keycodes/keycodes_0.0.2_magic.hjson
Normal file
251
data/constants/keycodes/keycodes_0.0.2_magic.hjson
Normal file
|
@ -0,0 +1,251 @@
|
|||
{
|
||||
"keycodes": {
|
||||
"!reset!":0,
|
||||
|
||||
"0x7000": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_CONTROL_CAPS_LOCK",
|
||||
"aliases": [
|
||||
"CL_SWAP"
|
||||
]
|
||||
},
|
||||
"0x7001": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK",
|
||||
"aliases": [
|
||||
"CL_NORM"
|
||||
]
|
||||
},
|
||||
"0x7002": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK",
|
||||
"aliases": [
|
||||
"CL_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7003": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF",
|
||||
"aliases": [
|
||||
"CL_CAPS"
|
||||
]
|
||||
},
|
||||
"0x7004": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON",
|
||||
"aliases": [
|
||||
"CL_CTRL"
|
||||
]
|
||||
},
|
||||
"0x7005": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_LALT_LGUI",
|
||||
"aliases": [
|
||||
"AG_LSWP"
|
||||
]
|
||||
},
|
||||
"0x7006": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_LALT_LGUI",
|
||||
"aliases": [
|
||||
"AG_LNRM"
|
||||
]
|
||||
},
|
||||
"0x7007": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_RALT_RGUI",
|
||||
"aliases": [
|
||||
"AG_RSWP"
|
||||
]
|
||||
},
|
||||
"0x7008": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_RALT_RGUI",
|
||||
"aliases": [
|
||||
"AG_RNRM"
|
||||
]
|
||||
},
|
||||
"0x7009": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_GUI_ON",
|
||||
"aliases": [
|
||||
"GU_ON"
|
||||
]
|
||||
},
|
||||
"0x700A": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_GUI_OFF",
|
||||
"aliases": [
|
||||
"GU_OFF"
|
||||
]
|
||||
},
|
||||
"0x700B": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_GUI",
|
||||
"aliases": [
|
||||
"GU_TOGG"
|
||||
]
|
||||
},
|
||||
"0x700C": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_GRAVE_ESC",
|
||||
"aliases": [
|
||||
"GE_SWAP"
|
||||
]
|
||||
},
|
||||
"0x700D": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_GRAVE_ESC",
|
||||
"aliases": [
|
||||
"GE_NORM"
|
||||
]
|
||||
},
|
||||
"0x700E": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_BACKSLASH_BACKSPACE",
|
||||
"aliases": [
|
||||
"BS_SWAP"
|
||||
]
|
||||
},
|
||||
"0x700F": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE",
|
||||
"aliases": [
|
||||
"BS_NORM"
|
||||
]
|
||||
},
|
||||
"0x7010": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE",
|
||||
"aliases": [
|
||||
"BS_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7011": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_NKRO_ON",
|
||||
"aliases": [
|
||||
"NK_ON"
|
||||
]
|
||||
},
|
||||
"0x7012": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_NKRO_OFF",
|
||||
"aliases": [
|
||||
"NK_OFF"
|
||||
]
|
||||
},
|
||||
"0x7013": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_NKRO",
|
||||
"aliases": [
|
||||
"NK_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7014": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_ALT_GUI",
|
||||
"aliases": [
|
||||
"AG_SWAP"
|
||||
]
|
||||
},
|
||||
"0x7015": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_ALT_GUI",
|
||||
"aliases": [
|
||||
"AG_NORM"
|
||||
]
|
||||
},
|
||||
"0x7016": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_ALT_GUI",
|
||||
"aliases": [
|
||||
"AG_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7017": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_LCTL_LGUI",
|
||||
"aliases": [
|
||||
"CG_LSWP"
|
||||
]
|
||||
},
|
||||
"0x7018": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_LCTL_LGUI",
|
||||
"aliases": [
|
||||
"CG_LNRM"
|
||||
]
|
||||
},
|
||||
"0x7019": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_RCTL_RGUI",
|
||||
"aliases": [
|
||||
"CG_RSWP"
|
||||
]
|
||||
},
|
||||
"0x701A": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_RCTL_RGUI",
|
||||
"aliases": [
|
||||
"CG_RNRM"
|
||||
]
|
||||
},
|
||||
"0x701B": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_CTL_GUI",
|
||||
"aliases": [
|
||||
"CG_SWAP"
|
||||
]
|
||||
},
|
||||
"0x701C": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_CTL_GUI",
|
||||
"aliases": [
|
||||
"CG_NORM"
|
||||
]
|
||||
},
|
||||
"0x701D": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_CTL_GUI",
|
||||
"aliases": [
|
||||
"CG_TOGG"
|
||||
]
|
||||
},
|
||||
"0x701E": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_EE_HANDS_LEFT",
|
||||
"aliases": [
|
||||
"EH_LEFT"
|
||||
]
|
||||
},
|
||||
"0x701F": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_EE_HANDS_RIGHT",
|
||||
"aliases": [
|
||||
"EH_RGHT"
|
||||
]
|
||||
},
|
||||
"0x7020": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK",
|
||||
"aliases": [
|
||||
"EC_SWAP"
|
||||
]
|
||||
},
|
||||
"0x7021": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK",
|
||||
"aliases": [
|
||||
"EC_NORM"
|
||||
]
|
||||
},
|
||||
"0x7022": {
|
||||
"group": "magic",
|
||||
"key": "QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK",
|
||||
"aliases": [
|
||||
"EC_TOGG"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -402,43 +402,43 @@ See also: [Leader Key](feature_leader_key.md)
|
|||
|
||||
See also: [Magic Keycodes](keycodes_magic.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|--------------------------------------------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_TOGGLE_CONTROL_CAPSLOCK` |`CL_TOGG`|Toggle Caps Lock and Left Control swap |
|
||||
|`MAGIC_SWAP_ESCAPE_CAPSLOCK` |`EC_SWAP`|Swap Caps Lock and Escape |
|
||||
|`MAGIC_UNSWAP_ESCAPE_CAPSLOCK` |`EC_NORM`|Unswap Caps Lock and Escape |
|
||||
|`MAGIC_TOGGLE_ESCAPE_CAPSLOCK` |`EC_TOGG`|Toggle Caps Lock and Escape swap |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|
||||
|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys |
|
||||
|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys |
|
||||
|`MAGIC_TOGGLE_GUI` |`GUI_TOG`|Toggles the status of the GUI keys |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|
||||
|`MAGIC_TOGGLE_BACKSLASH_BACKSPACE`|`BS_TOGG`|Toggle `\` and Backspace swap state |
|
||||
|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover |
|
||||
|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover |
|
||||
|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|
||||
|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|
||||
|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------------------|---------|--------------------------------------------------------------------------|
|
||||
|`QK_MAGIC_SWAP_CONTROL_CAPS_LOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|
||||
|`QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|
||||
|`QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK` |`CL_TOGG`|Toggle Caps Lock and Left Control swap |
|
||||
|`QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON` |`CL_CTRL`|Treat Caps Lock as Control |
|
||||
|`QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF` |`CL_CAPS`|Stop treating Caps Lock as Control |
|
||||
|`QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK` |`EC_SWAP`|Swap Caps Lock and Escape |
|
||||
|`QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK` |`EC_NORM`|Unswap Caps Lock and Escape |
|
||||
|`QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK` |`EC_TOGG`|Toggle Caps Lock and Escape swap |
|
||||
|`QK_MAGIC_SWAP_LCTL_LGUI` |`CG_LSWP`|Swap Left Control and GUI |
|
||||
|`QK_MAGIC_UNSWAP_LCTL_LGUI` |`CG_LNRM`|Unswap Left Control and GUI |
|
||||
|`QK_MAGIC_SWAP_RCTL_RGUI` |`CG_RSWP`|Swap Right Control and GUI |
|
||||
|`QK_MAGIC_UNSWAP_RCTL_RGUI` |`CG_RNRM`|Unswap Right Control and GUI |
|
||||
|`QK_MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|
||||
|`QK_MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|
||||
|`QK_MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|
||||
|`QK_MAGIC_SWAP_LALT_LGUI` |`AG_LSWP`|Swap Left Alt and GUI |
|
||||
|`QK_MAGIC_UNSWAP_LALT_LGUI` |`AG_LNRM`|Unswap Left Alt and GUI |
|
||||
|`QK_MAGIC_SWAP_RALT_RGUI` |`AG_RSWP`|Swap Right Alt and GUI |
|
||||
|`QK_MAGIC_UNSWAP_RALT_RGUI` |`AG_RNRM`|Unswap Right Alt and GUI |
|
||||
|`QK_MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`QK_MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`QK_MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`QK_MAGIC_GUI_OFF` |`GU_OFF` |Disable the GUI keys |
|
||||
|`QK_MAGIC_GUI_ON` |`GU_ON` |Enable the GUI keys |
|
||||
|`QK_MAGIC_TOGGLE_GUI` |`GU_TOGG`|Toggles the status of the GUI keys |
|
||||
|`QK_MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>`</code> and Escape |
|
||||
|`QK_MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>`</code> and Escape |
|
||||
|`QK_MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|
||||
|`QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|
||||
|`QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE`|`BS_TOGG`|Toggle `\` and Backspace swap state |
|
||||
|`QK_MAGIC_NKRO_ON` |`NK_ON` |Enable N-key rollover |
|
||||
|`QK_MAGIC_NKRO_OFF` |`NK_OFF` |Disable N-key rollover |
|
||||
|`QK_MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|
||||
|`QK_MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|
||||
|`QK_MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
|
||||
|
||||
## MIDI :id=midi
|
||||
|
||||
|
|
|
@ -2,39 +2,40 @@
|
|||
|
||||
**Magic Keycodes** are prefixed with `MAGIC_`, and allow you to access the functionality of the deprecated Bootmagic feature *after* your keyboard has initialized. To use the keycodes, assign them to your keymap as you would any other keycode.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|--------------------------------------------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_TOGGLE_CONTROL_CAPSLOCK` |`CL_TOGG`|Toggle Caps Lock and Left Control swap |
|
||||
|`MAGIC_SWAP_ESCAPE_CAPSLOCK` |`EC_SWAP`|Swap Caps Lock and Escape |
|
||||
|`MAGIC_UNSWAP_ESCAPE_CAPSLOCK` |`EC_NORM`|Unswap Caps Lock and Escape |
|
||||
|`MAGIC_TOGGLE_ESCAPE_CAPSLOCK` |`EC_TOGG`|Toggle Caps Lock and Escape swap |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|
||||
|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys |
|
||||
|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys |
|
||||
|`MAGIC_TOGGLE_GUI` |`GUI_TOG`|Toggles the status of the GUI keys |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover |
|
||||
|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover |
|
||||
|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|
||||
|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|
||||
|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------------------|---------|--------------------------------------------------------------------------|
|
||||
|`QK_MAGIC_SWAP_CONTROL_CAPS_LOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|
||||
|`QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|
||||
|`QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK` |`CL_TOGG`|Toggle Caps Lock and Left Control swap |
|
||||
|`QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON` |`CL_CTRL`|Treat Caps Lock as Control |
|
||||
|`QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF` |`CL_CAPS`|Stop treating Caps Lock as Control |
|
||||
|`QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK` |`EC_SWAP`|Swap Caps Lock and Escape |
|
||||
|`QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK` |`EC_NORM`|Unswap Caps Lock and Escape |
|
||||
|`QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK` |`EC_TOGG`|Toggle Caps Lock and Escape swap |
|
||||
|`QK_MAGIC_SWAP_LCTL_LGUI` |`CG_LSWP`|Swap Left Control and GUI |
|
||||
|`QK_MAGIC_UNSWAP_LCTL_LGUI` |`CG_LNRM`|Unswap Left Control and GUI |
|
||||
|`QK_MAGIC_SWAP_RCTL_RGUI` |`CG_RSWP`|Swap Right Control and GUI |
|
||||
|`QK_MAGIC_UNSWAP_RCTL_RGUI` |`CG_RNRM`|Unswap Right Control and GUI |
|
||||
|`QK_MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|
||||
|`QK_MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|
||||
|`QK_MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|
||||
|`QK_MAGIC_SWAP_LALT_LGUI` |`AG_LSWP`|Swap Left Alt and GUI |
|
||||
|`QK_MAGIC_UNSWAP_LALT_LGUI` |`AG_LNRM`|Unswap Left Alt and GUI |
|
||||
|`QK_MAGIC_SWAP_RALT_RGUI` |`AG_RSWP`|Swap Right Alt and GUI |
|
||||
|`QK_MAGIC_UNSWAP_RALT_RGUI` |`AG_RNRM`|Unswap Right Alt and GUI |
|
||||
|`QK_MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`QK_MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`QK_MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`QK_MAGIC_GUI_OFF` |`GU_OFF` |Disable the GUI keys |
|
||||
|`QK_MAGIC_GUI_ON` |`GU_ON` |Enable the GUI keys |
|
||||
|`QK_MAGIC_TOGGLE_GUI` |`GU_TOGG`|Toggles the status of the GUI keys |
|
||||
|`QK_MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>`</code> and Escape |
|
||||
|`QK_MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>`</code> and Escape |
|
||||
|`QK_MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|
||||
|`QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|
||||
|`QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE`|`BS_TOGG`|Toggle `\` and Backspace swap state |
|
||||
|`QK_MAGIC_NKRO_ON` |`NK_ON` |Enable N-key rollover |
|
||||
|`QK_MAGIC_NKRO_OFF` |`NK_OFF` |Disable N-key rollover |
|
||||
|`QK_MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|
||||
|`QK_MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|
||||
|`QK_MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
|
||||
|
|
|
@ -317,41 +317,41 @@ enum qk_keycode_defines {
|
|||
QK_SWAP_HANDS_OFF = 0x56F4,
|
||||
QK_SWAP_HANDS_ON = 0x56F5,
|
||||
QK_SWAP_HANDS_ONE_SHOT = 0x56F6,
|
||||
MAGIC_SWAP_CONTROL_CAPSLOCK = 0x7000,
|
||||
MAGIC_UNSWAP_CONTROL_CAPSLOCK = 0x7001,
|
||||
MAGIC_TOGGLE_CONTROL_CAPSLOCK = 0x7002,
|
||||
MAGIC_UNCAPSLOCK_TO_CONTROL = 0x7003,
|
||||
MAGIC_CAPSLOCK_TO_CONTROL = 0x7004,
|
||||
MAGIC_SWAP_LALT_LGUI = 0x7005,
|
||||
MAGIC_UNSWAP_LALT_LGUI = 0x7006,
|
||||
MAGIC_SWAP_RALT_RGUI = 0x7007,
|
||||
MAGIC_UNSWAP_RALT_RGUI = 0x7008,
|
||||
MAGIC_UNNO_GUI = 0x7009,
|
||||
MAGIC_NO_GUI = 0x700A,
|
||||
MAGIC_TOGGLE_GUI = 0x700B,
|
||||
MAGIC_SWAP_GRAVE_ESC = 0x700C,
|
||||
MAGIC_UNSWAP_GRAVE_ESC = 0x700D,
|
||||
MAGIC_SWAP_BACKSLASH_BACKSPACE = 0x700E,
|
||||
MAGIC_UNSWAP_BACKSLASH_BACKSPACE = 0x700F,
|
||||
MAGIC_TOGGLE_BACKSLASH_BACKSPACE = 0x7010,
|
||||
MAGIC_HOST_NKRO = 0x7011,
|
||||
MAGIC_UNHOST_NKRO = 0x7012,
|
||||
MAGIC_TOGGLE_NKRO = 0x7013,
|
||||
MAGIC_SWAP_ALT_GUI = 0x7014,
|
||||
MAGIC_UNSWAP_ALT_GUI = 0x7015,
|
||||
MAGIC_TOGGLE_ALT_GUI = 0x7016,
|
||||
MAGIC_SWAP_LCTL_LGUI = 0x7017,
|
||||
MAGIC_UNSWAP_LCTL_LGUI = 0x7018,
|
||||
MAGIC_SWAP_RCTL_RGUI = 0x7019,
|
||||
MAGIC_UNSWAP_RCTL_RGUI = 0x701A,
|
||||
MAGIC_SWAP_CTL_GUI = 0x701B,
|
||||
MAGIC_UNSWAP_CTL_GUI = 0x701C,
|
||||
MAGIC_TOGGLE_CTL_GUI = 0x701D,
|
||||
MAGIC_EE_HANDS_LEFT = 0x701E,
|
||||
MAGIC_EE_HANDS_RIGHT = 0x701F,
|
||||
MAGIC_SWAP_ESCAPE_CAPSLOCK = 0x7020,
|
||||
MAGIC_UNSWAP_ESCAPE_CAPSLOCK = 0x7021,
|
||||
MAGIC_TOGGLE_ESCAPE_CAPSLOCK = 0x7022,
|
||||
QK_MAGIC_SWAP_CONTROL_CAPS_LOCK = 0x7000,
|
||||
QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK = 0x7001,
|
||||
QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK = 0x7002,
|
||||
QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF = 0x7003,
|
||||
QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON = 0x7004,
|
||||
QK_MAGIC_SWAP_LALT_LGUI = 0x7005,
|
||||
QK_MAGIC_UNSWAP_LALT_LGUI = 0x7006,
|
||||
QK_MAGIC_SWAP_RALT_RGUI = 0x7007,
|
||||
QK_MAGIC_UNSWAP_RALT_RGUI = 0x7008,
|
||||
QK_MAGIC_GUI_ON = 0x7009,
|
||||
QK_MAGIC_GUI_OFF = 0x700A,
|
||||
QK_MAGIC_TOGGLE_GUI = 0x700B,
|
||||
QK_MAGIC_SWAP_GRAVE_ESC = 0x700C,
|
||||
QK_MAGIC_UNSWAP_GRAVE_ESC = 0x700D,
|
||||
QK_MAGIC_SWAP_BACKSLASH_BACKSPACE = 0x700E,
|
||||
QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE = 0x700F,
|
||||
QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE = 0x7010,
|
||||
QK_MAGIC_NKRO_ON = 0x7011,
|
||||
QK_MAGIC_NKRO_OFF = 0x7012,
|
||||
QK_MAGIC_TOGGLE_NKRO = 0x7013,
|
||||
QK_MAGIC_SWAP_ALT_GUI = 0x7014,
|
||||
QK_MAGIC_UNSWAP_ALT_GUI = 0x7015,
|
||||
QK_MAGIC_TOGGLE_ALT_GUI = 0x7016,
|
||||
QK_MAGIC_SWAP_LCTL_LGUI = 0x7017,
|
||||
QK_MAGIC_UNSWAP_LCTL_LGUI = 0x7018,
|
||||
QK_MAGIC_SWAP_RCTL_RGUI = 0x7019,
|
||||
QK_MAGIC_UNSWAP_RCTL_RGUI = 0x701A,
|
||||
QK_MAGIC_SWAP_CTL_GUI = 0x701B,
|
||||
QK_MAGIC_UNSWAP_CTL_GUI = 0x701C,
|
||||
QK_MAGIC_TOGGLE_CTL_GUI = 0x701D,
|
||||
QK_MAGIC_EE_HANDS_LEFT = 0x701E,
|
||||
QK_MAGIC_EE_HANDS_RIGHT = 0x701F,
|
||||
QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK = 0x7020,
|
||||
QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK = 0x7021,
|
||||
QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK = 0x7022,
|
||||
QK_MIDI_ON = 0x7100,
|
||||
QK_MIDI_OFF = 0x7101,
|
||||
QK_MIDI_TOGGLE = 0x7102,
|
||||
|
@ -880,41 +880,41 @@ enum qk_keycode_defines {
|
|||
SH_OFF = QK_SWAP_HANDS_OFF,
|
||||
SH_ON = QK_SWAP_HANDS_ON,
|
||||
SH_OS = QK_SWAP_HANDS_ONE_SHOT,
|
||||
CL_SWAP = MAGIC_SWAP_CONTROL_CAPSLOCK,
|
||||
CL_NORM = MAGIC_UNSWAP_CONTROL_CAPSLOCK,
|
||||
CL_TOGG = MAGIC_TOGGLE_CONTROL_CAPSLOCK,
|
||||
CL_CAPS = MAGIC_UNCAPSLOCK_TO_CONTROL,
|
||||
CL_CTRL = MAGIC_CAPSLOCK_TO_CONTROL,
|
||||
LAG_SWP = MAGIC_SWAP_LALT_LGUI,
|
||||
LAG_NRM = MAGIC_UNSWAP_LALT_LGUI,
|
||||
RAG_SWP = MAGIC_SWAP_RALT_RGUI,
|
||||
RAG_NRM = MAGIC_UNSWAP_RALT_RGUI,
|
||||
GUI_ON = MAGIC_UNNO_GUI,
|
||||
GUI_OFF = MAGIC_NO_GUI,
|
||||
GUI_TOG = MAGIC_TOGGLE_GUI,
|
||||
GE_SWAP = MAGIC_SWAP_GRAVE_ESC,
|
||||
GE_NORM = MAGIC_UNSWAP_GRAVE_ESC,
|
||||
BS_SWAP = MAGIC_SWAP_BACKSLASH_BACKSPACE,
|
||||
BS_NORM = MAGIC_UNSWAP_BACKSLASH_BACKSPACE,
|
||||
BS_TOGG = MAGIC_TOGGLE_BACKSLASH_BACKSPACE,
|
||||
NK_ON = MAGIC_HOST_NKRO,
|
||||
NK_OFF = MAGIC_UNHOST_NKRO,
|
||||
NK_TOGG = MAGIC_TOGGLE_NKRO,
|
||||
AG_SWAP = MAGIC_SWAP_ALT_GUI,
|
||||
AG_NORM = MAGIC_UNSWAP_ALT_GUI,
|
||||
AG_TOGG = MAGIC_TOGGLE_ALT_GUI,
|
||||
LCG_SWP = MAGIC_SWAP_LCTL_LGUI,
|
||||
LCG_NRM = MAGIC_UNSWAP_LCTL_LGUI,
|
||||
RCG_SWP = MAGIC_SWAP_RCTL_RGUI,
|
||||
RCG_NRM = MAGIC_UNSWAP_RCTL_RGUI,
|
||||
CG_SWAP = MAGIC_SWAP_CTL_GUI,
|
||||
CG_NORM = MAGIC_UNSWAP_CTL_GUI,
|
||||
CG_TOGG = MAGIC_TOGGLE_CTL_GUI,
|
||||
EH_LEFT = MAGIC_EE_HANDS_LEFT,
|
||||
EH_RGHT = MAGIC_EE_HANDS_RIGHT,
|
||||
EC_SWAP = MAGIC_SWAP_ESCAPE_CAPSLOCK,
|
||||
EC_NORM = MAGIC_UNSWAP_ESCAPE_CAPSLOCK,
|
||||
EC_TOGG = MAGIC_TOGGLE_ESCAPE_CAPSLOCK,
|
||||
CL_SWAP = QK_MAGIC_SWAP_CONTROL_CAPS_LOCK,
|
||||
CL_NORM = QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK,
|
||||
CL_TOGG = QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK,
|
||||
CL_CAPS = QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF,
|
||||
CL_CTRL = QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON,
|
||||
AG_LSWP = QK_MAGIC_SWAP_LALT_LGUI,
|
||||
AG_LNRM = QK_MAGIC_UNSWAP_LALT_LGUI,
|
||||
AG_RSWP = QK_MAGIC_SWAP_RALT_RGUI,
|
||||
AG_RNRM = QK_MAGIC_UNSWAP_RALT_RGUI,
|
||||
GU_ON = QK_MAGIC_GUI_ON,
|
||||
GU_OFF = QK_MAGIC_GUI_OFF,
|
||||
GU_TOGG = QK_MAGIC_TOGGLE_GUI,
|
||||
GE_SWAP = QK_MAGIC_SWAP_GRAVE_ESC,
|
||||
GE_NORM = QK_MAGIC_UNSWAP_GRAVE_ESC,
|
||||
BS_SWAP = QK_MAGIC_SWAP_BACKSLASH_BACKSPACE,
|
||||
BS_NORM = QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE,
|
||||
BS_TOGG = QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE,
|
||||
NK_ON = QK_MAGIC_NKRO_ON,
|
||||
NK_OFF = QK_MAGIC_NKRO_OFF,
|
||||
NK_TOGG = QK_MAGIC_TOGGLE_NKRO,
|
||||
AG_SWAP = QK_MAGIC_SWAP_ALT_GUI,
|
||||
AG_NORM = QK_MAGIC_UNSWAP_ALT_GUI,
|
||||
AG_TOGG = QK_MAGIC_TOGGLE_ALT_GUI,
|
||||
CG_LSWP = QK_MAGIC_SWAP_LCTL_LGUI,
|
||||
CG_LNRM = QK_MAGIC_UNSWAP_LCTL_LGUI,
|
||||
CG_RSWP = QK_MAGIC_SWAP_RCTL_RGUI,
|
||||
CG_RNRM = QK_MAGIC_UNSWAP_RCTL_RGUI,
|
||||
CG_SWAP = QK_MAGIC_SWAP_CTL_GUI,
|
||||
CG_NORM = QK_MAGIC_UNSWAP_CTL_GUI,
|
||||
CG_TOGG = QK_MAGIC_TOGGLE_CTL_GUI,
|
||||
EH_LEFT = QK_MAGIC_EE_HANDS_LEFT,
|
||||
EH_RGHT = QK_MAGIC_EE_HANDS_RIGHT,
|
||||
EC_SWAP = QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK,
|
||||
EC_NORM = QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK,
|
||||
EC_TOGG = QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK,
|
||||
MI_ON = QK_MIDI_ON,
|
||||
MI_OFF = QK_MIDI_OFF,
|
||||
MI_TOGG = QK_MIDI_TOGGLE,
|
||||
|
@ -1340,7 +1340,7 @@ enum qk_keycode_defines {
|
|||
#define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2)
|
||||
#define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI)
|
||||
#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT)
|
||||
#define IS_MAGIC_KEYCODE(code) ((code) >= MAGIC_SWAP_CONTROL_CAPSLOCK && (code) <= MAGIC_TOGGLE_ESCAPE_CAPSLOCK)
|
||||
#define IS_MAGIC_KEYCODE(code) ((code) >= QK_MAGIC_SWAP_CONTROL_CAPS_LOCK && (code) <= QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK)
|
||||
#define IS_MIDI_KEYCODE(code) ((code) >= QK_MIDI_ON && (code) <= QK_MIDI_PITCH_BEND_UP)
|
||||
#define IS_SEQUENCER_KEYCODE(code) ((code) >= QK_SEQUENCER_ON && (code) <= QK_SEQUENCER_STEPS_CLEAR)
|
||||
#define IS_JOYSTICK_KEYCODE(code) ((code) >= QK_JOYSTICK_BUTTON_0 && (code) <= QK_JOYSTICK_BUTTON_31)
|
||||
|
|
|
@ -44,99 +44,99 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
|||
/* keymap config */
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
switch (keycode) {
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK:
|
||||
case QK_MAGIC_SWAP_CONTROL_CAPS_LOCK:
|
||||
keymap_config.swap_control_capslock = true;
|
||||
break;
|
||||
case MAGIC_SWAP_ESCAPE_CAPSLOCK:
|
||||
case QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK:
|
||||
keymap_config.swap_escape_capslock = true;
|
||||
break;
|
||||
case MAGIC_CAPSLOCK_TO_CONTROL:
|
||||
case QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON:
|
||||
keymap_config.capslock_to_control = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LALT_LGUI:
|
||||
case QK_MAGIC_SWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RALT_RGUI:
|
||||
case QK_MAGIC_SWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LCTL_LGUI:
|
||||
case QK_MAGIC_SWAP_LCTL_LGUI:
|
||||
keymap_config.swap_lctl_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RCTL_RGUI:
|
||||
case QK_MAGIC_SWAP_RCTL_RGUI:
|
||||
keymap_config.swap_rctl_rgui = true;
|
||||
break;
|
||||
case MAGIC_NO_GUI:
|
||||
case QK_MAGIC_GUI_OFF:
|
||||
keymap_config.no_gui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_GRAVE_ESC:
|
||||
case QK_MAGIC_SWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = true;
|
||||
break;
|
||||
case MAGIC_SWAP_BACKSLASH_BACKSPACE:
|
||||
case QK_MAGIC_SWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = true;
|
||||
break;
|
||||
case MAGIC_HOST_NKRO:
|
||||
case QK_MAGIC_NKRO_ON:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = true;
|
||||
break;
|
||||
case MAGIC_SWAP_ALT_GUI:
|
||||
case QK_MAGIC_SWAP_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(ag_swap_song);
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_SWAP_CTL_GUI:
|
||||
case QK_MAGIC_SWAP_CTL_GUI:
|
||||
keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = true;
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(cg_swap_song);
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
|
||||
case QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK:
|
||||
keymap_config.swap_control_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
|
||||
case QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK:
|
||||
keymap_config.swap_escape_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNCAPSLOCK_TO_CONTROL:
|
||||
case QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF:
|
||||
keymap_config.capslock_to_control = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LALT_LGUI:
|
||||
case QK_MAGIC_UNSWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RALT_RGUI:
|
||||
case QK_MAGIC_UNSWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LCTL_LGUI:
|
||||
case QK_MAGIC_UNSWAP_LCTL_LGUI:
|
||||
keymap_config.swap_lctl_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RCTL_RGUI:
|
||||
case QK_MAGIC_UNSWAP_RCTL_RGUI:
|
||||
keymap_config.swap_rctl_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNNO_GUI:
|
||||
case QK_MAGIC_GUI_ON:
|
||||
keymap_config.no_gui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_GRAVE_ESC:
|
||||
case QK_MAGIC_UNSWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
|
||||
case QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = false;
|
||||
break;
|
||||
case MAGIC_UNHOST_NKRO:
|
||||
case QK_MAGIC_NKRO_OFF:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_ALT_GUI:
|
||||
case QK_MAGIC_UNSWAP_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(ag_norm_song);
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_UNSWAP_CTL_GUI:
|
||||
case QK_MAGIC_UNSWAP_CTL_GUI:
|
||||
keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false;
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(cg_norm_song);
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_TOGGLE_ALT_GUI:
|
||||
case QK_MAGIC_TOGGLE_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
|
||||
keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui;
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -147,7 +147,7 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_TOGGLE_CTL_GUI:
|
||||
case QK_MAGIC_TOGGLE_CTL_GUI:
|
||||
keymap_config.swap_lctl_lgui = !keymap_config.swap_lctl_lgui;
|
||||
keymap_config.swap_rctl_rgui = keymap_config.swap_lctl_lgui;
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@ -158,26 +158,26 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
|
||||
case QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
|
||||
break;
|
||||
case MAGIC_TOGGLE_NKRO:
|
||||
case QK_MAGIC_TOGGLE_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = !keymap_config.nkro;
|
||||
break;
|
||||
case MAGIC_EE_HANDS_LEFT:
|
||||
case QK_MAGIC_EE_HANDS_LEFT:
|
||||
eeconfig_update_handedness(true);
|
||||
break;
|
||||
case MAGIC_EE_HANDS_RIGHT:
|
||||
case QK_MAGIC_EE_HANDS_RIGHT:
|
||||
eeconfig_update_handedness(false);
|
||||
break;
|
||||
case MAGIC_TOGGLE_GUI:
|
||||
case QK_MAGIC_TOGGLE_GUI:
|
||||
keymap_config.no_gui = !keymap_config.no_gui;
|
||||
break;
|
||||
case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
|
||||
case QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK:
|
||||
keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
|
||||
break;
|
||||
case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
|
||||
case QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK:
|
||||
keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,3 +5,51 @@
|
|||
// Deprecated Quantum keycodes
|
||||
#define SH_TG QK_SWAP_HANDS_TOGGLE
|
||||
#define SQ_TOG QK_SEQUENCER_TOGGLE
|
||||
|
||||
#define MAGIC_SWAP_CONTROL_CAPSLOCK QK_MAGIC_SWAP_CONTROL_CAPS_LOCK
|
||||
#define MAGIC_UNSWAP_CONTROL_CAPSLOCK QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK
|
||||
#define MAGIC_TOGGLE_CONTROL_CAPSLOCK QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK
|
||||
#define MAGIC_UNCAPSLOCK_TO_CONTROL QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF
|
||||
#define MAGIC_CAPSLOCK_TO_CONTROL QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON
|
||||
#define MAGIC_SWAP_LALT_LGUI QK_MAGIC_SWAP_LALT_LGUI
|
||||
#define MAGIC_UNSWAP_LALT_LGUI QK_MAGIC_UNSWAP_LALT_LGUI
|
||||
#define MAGIC_SWAP_RALT_RGUI QK_MAGIC_SWAP_RALT_RGUI
|
||||
#define MAGIC_UNSWAP_RALT_RGUI QK_MAGIC_UNSWAP_RALT_RGUI
|
||||
#define MAGIC_UNNO_GUI QK_MAGIC_GUI_ON
|
||||
#define MAGIC_NO_GUI QK_MAGIC_GUI_OFF
|
||||
#define MAGIC_TOGGLE_GUI QK_MAGIC_TOGGLE_GUI
|
||||
#define MAGIC_SWAP_GRAVE_ESC QK_MAGIC_SWAP_GRAVE_ESC
|
||||
#define MAGIC_UNSWAP_GRAVE_ESC QK_MAGIC_UNSWAP_GRAVE_ESC
|
||||
#define MAGIC_SWAP_BACKSLASH_BACKSPACE QK_MAGIC_SWAP_BACKSLASH_BACKSPACE
|
||||
#define MAGIC_UNSWAP_BACKSLASH_BACKSPACE QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE
|
||||
#define MAGIC_TOGGLE_BACKSLASH_BACKSPACE QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE
|
||||
#define MAGIC_HOST_NKRO QK_MAGIC_NKRO_ON
|
||||
#define MAGIC_UNHOST_NKRO QK_MAGIC_NKRO_OFF
|
||||
#define MAGIC_TOGGLE_NKRO QK_MAGIC_TOGGLE_NKRO
|
||||
#define MAGIC_SWAP_ALT_GUI QK_MAGIC_SWAP_ALT_GUI
|
||||
#define MAGIC_UNSWAP_ALT_GUI QK_MAGIC_UNSWAP_ALT_GUI
|
||||
#define MAGIC_TOGGLE_ALT_GUI QK_MAGIC_TOGGLE_ALT_GUI
|
||||
#define MAGIC_SWAP_LCTL_LGUI QK_MAGIC_SWAP_LCTL_LGUI
|
||||
#define MAGIC_UNSWAP_LCTL_LGUI QK_MAGIC_UNSWAP_LCTL_LGUI
|
||||
#define MAGIC_SWAP_RCTL_RGUI QK_MAGIC_SWAP_RCTL_RGUI
|
||||
#define MAGIC_UNSWAP_RCTL_RGUI QK_MAGIC_UNSWAP_RCTL_RGUI
|
||||
#define MAGIC_SWAP_CTL_GUI QK_MAGIC_SWAP_CTL_GUI
|
||||
#define MAGIC_UNSWAP_CTL_GUI QK_MAGIC_UNSWAP_CTL_GUI
|
||||
#define MAGIC_TOGGLE_CTL_GUI QK_MAGIC_TOGGLE_CTL_GUI
|
||||
#define MAGIC_EE_HANDS_LEFT QK_MAGIC_EE_HANDS_LEFT
|
||||
#define MAGIC_EE_HANDS_RIGHT QK_MAGIC_EE_HANDS_RIGHT
|
||||
#define MAGIC_SWAP_ESCAPE_CAPSLOCK QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK
|
||||
#define MAGIC_UNSWAP_ESCAPE_CAPSLOCK QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK
|
||||
#define MAGIC_TOGGLE_ESCAPE_CAPSLOCK QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK
|
||||
|
||||
#define LCG_SWP QK_MAGIC_SWAP_LCTL_LGUI
|
||||
#define LCG_NRM QK_MAGIC_UNSWAP_LCTL_LGUI
|
||||
#define RCG_SWP QK_MAGIC_SWAP_RCTL_RGUI
|
||||
#define RCG_NRM QK_MAGIC_UNSWAP_RCTL_RGUI
|
||||
#define LAG_SWP QK_MAGIC_SWAP_LALT_LGUI
|
||||
#define LAG_NRM QK_MAGIC_UNSWAP_LALT_LGUI
|
||||
#define RAG_SWP QK_MAGIC_SWAP_RALT_RGUI
|
||||
#define RAG_NRM QK_MAGIC_UNSWAP_RALT_RGUI
|
||||
#define GUI_ON QK_MAGIC_GUI_ON
|
||||
#define GUI_OFF QK_MAGIC_GUI_OFF
|
||||
#define GUI_TOG QK_MAGIC_TOGGLE_GUI
|
||||
|
|
|
@ -259,41 +259,41 @@ std::map<uint16_t, std::string> KEYCODE_ID_TABLE = {
|
|||
{QK_SWAP_HANDS_OFF, "QK_SWAP_HANDS_OFF"},
|
||||
{QK_SWAP_HANDS_ON, "QK_SWAP_HANDS_ON"},
|
||||
{QK_SWAP_HANDS_ONE_SHOT, "QK_SWAP_HANDS_ONE_SHOT"},
|
||||
{MAGIC_SWAP_CONTROL_CAPSLOCK, "MAGIC_SWAP_CONTROL_CAPSLOCK"},
|
||||
{MAGIC_UNSWAP_CONTROL_CAPSLOCK, "MAGIC_UNSWAP_CONTROL_CAPSLOCK"},
|
||||
{MAGIC_TOGGLE_CONTROL_CAPSLOCK, "MAGIC_TOGGLE_CONTROL_CAPSLOCK"},
|
||||
{MAGIC_UNCAPSLOCK_TO_CONTROL, "MAGIC_UNCAPSLOCK_TO_CONTROL"},
|
||||
{MAGIC_CAPSLOCK_TO_CONTROL, "MAGIC_CAPSLOCK_TO_CONTROL"},
|
||||
{MAGIC_SWAP_LALT_LGUI, "MAGIC_SWAP_LALT_LGUI"},
|
||||
{MAGIC_UNSWAP_LALT_LGUI, "MAGIC_UNSWAP_LALT_LGUI"},
|
||||
{MAGIC_SWAP_RALT_RGUI, "MAGIC_SWAP_RALT_RGUI"},
|
||||
{MAGIC_UNSWAP_RALT_RGUI, "MAGIC_UNSWAP_RALT_RGUI"},
|
||||
{MAGIC_UNNO_GUI, "MAGIC_UNNO_GUI"},
|
||||
{MAGIC_NO_GUI, "MAGIC_NO_GUI"},
|
||||
{MAGIC_TOGGLE_GUI, "MAGIC_TOGGLE_GUI"},
|
||||
{MAGIC_SWAP_GRAVE_ESC, "MAGIC_SWAP_GRAVE_ESC"},
|
||||
{MAGIC_UNSWAP_GRAVE_ESC, "MAGIC_UNSWAP_GRAVE_ESC"},
|
||||
{MAGIC_SWAP_BACKSLASH_BACKSPACE, "MAGIC_SWAP_BACKSLASH_BACKSPACE"},
|
||||
{MAGIC_UNSWAP_BACKSLASH_BACKSPACE, "MAGIC_UNSWAP_BACKSLASH_BACKSPACE"},
|
||||
{MAGIC_TOGGLE_BACKSLASH_BACKSPACE, "MAGIC_TOGGLE_BACKSLASH_BACKSPACE"},
|
||||
{MAGIC_HOST_NKRO, "MAGIC_HOST_NKRO"},
|
||||
{MAGIC_UNHOST_NKRO, "MAGIC_UNHOST_NKRO"},
|
||||
{MAGIC_TOGGLE_NKRO, "MAGIC_TOGGLE_NKRO"},
|
||||
{MAGIC_SWAP_ALT_GUI, "MAGIC_SWAP_ALT_GUI"},
|
||||
{MAGIC_UNSWAP_ALT_GUI, "MAGIC_UNSWAP_ALT_GUI"},
|
||||
{MAGIC_TOGGLE_ALT_GUI, "MAGIC_TOGGLE_ALT_GUI"},
|
||||
{MAGIC_SWAP_LCTL_LGUI, "MAGIC_SWAP_LCTL_LGUI"},
|
||||
{MAGIC_UNSWAP_LCTL_LGUI, "MAGIC_UNSWAP_LCTL_LGUI"},
|
||||
{MAGIC_SWAP_RCTL_RGUI, "MAGIC_SWAP_RCTL_RGUI"},
|
||||
{MAGIC_UNSWAP_RCTL_RGUI, "MAGIC_UNSWAP_RCTL_RGUI"},
|
||||
{MAGIC_SWAP_CTL_GUI, "MAGIC_SWAP_CTL_GUI"},
|
||||
{MAGIC_UNSWAP_CTL_GUI, "MAGIC_UNSWAP_CTL_GUI"},
|
||||
{MAGIC_TOGGLE_CTL_GUI, "MAGIC_TOGGLE_CTL_GUI"},
|
||||
{MAGIC_EE_HANDS_LEFT, "MAGIC_EE_HANDS_LEFT"},
|
||||
{MAGIC_EE_HANDS_RIGHT, "MAGIC_EE_HANDS_RIGHT"},
|
||||
{MAGIC_SWAP_ESCAPE_CAPSLOCK, "MAGIC_SWAP_ESCAPE_CAPSLOCK"},
|
||||
{MAGIC_UNSWAP_ESCAPE_CAPSLOCK, "MAGIC_UNSWAP_ESCAPE_CAPSLOCK"},
|
||||
{MAGIC_TOGGLE_ESCAPE_CAPSLOCK, "MAGIC_TOGGLE_ESCAPE_CAPSLOCK"},
|
||||
{QK_MAGIC_SWAP_CONTROL_CAPS_LOCK, "QK_MAGIC_SWAP_CONTROL_CAPS_LOCK"},
|
||||
{QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK, "QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK"},
|
||||
{QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK, "QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK"},
|
||||
{QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF, "QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF"},
|
||||
{QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON, "QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON"},
|
||||
{QK_MAGIC_SWAP_LALT_LGUI, "QK_MAGIC_SWAP_LALT_LGUI"},
|
||||
{QK_MAGIC_UNSWAP_LALT_LGUI, "QK_MAGIC_UNSWAP_LALT_LGUI"},
|
||||
{QK_MAGIC_SWAP_RALT_RGUI, "QK_MAGIC_SWAP_RALT_RGUI"},
|
||||
{QK_MAGIC_UNSWAP_RALT_RGUI, "QK_MAGIC_UNSWAP_RALT_RGUI"},
|
||||
{QK_MAGIC_GUI_ON, "QK_MAGIC_GUI_ON"},
|
||||
{QK_MAGIC_GUI_OFF, "QK_MAGIC_GUI_OFF"},
|
||||
{QK_MAGIC_TOGGLE_GUI, "QK_MAGIC_TOGGLE_GUI"},
|
||||
{QK_MAGIC_SWAP_GRAVE_ESC, "QK_MAGIC_SWAP_GRAVE_ESC"},
|
||||
{QK_MAGIC_UNSWAP_GRAVE_ESC, "QK_MAGIC_UNSWAP_GRAVE_ESC"},
|
||||
{QK_MAGIC_SWAP_BACKSLASH_BACKSPACE, "QK_MAGIC_SWAP_BACKSLASH_BACKSPACE"},
|
||||
{QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE, "QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE"},
|
||||
{QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE, "QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE"},
|
||||
{QK_MAGIC_NKRO_ON, "QK_MAGIC_NKRO_ON"},
|
||||
{QK_MAGIC_NKRO_OFF, "QK_MAGIC_NKRO_OFF"},
|
||||
{QK_MAGIC_TOGGLE_NKRO, "QK_MAGIC_TOGGLE_NKRO"},
|
||||
{QK_MAGIC_SWAP_ALT_GUI, "QK_MAGIC_SWAP_ALT_GUI"},
|
||||
{QK_MAGIC_UNSWAP_ALT_GUI, "QK_MAGIC_UNSWAP_ALT_GUI"},
|
||||
{QK_MAGIC_TOGGLE_ALT_GUI, "QK_MAGIC_TOGGLE_ALT_GUI"},
|
||||
{QK_MAGIC_SWAP_LCTL_LGUI, "QK_MAGIC_SWAP_LCTL_LGUI"},
|
||||
{QK_MAGIC_UNSWAP_LCTL_LGUI, "QK_MAGIC_UNSWAP_LCTL_LGUI"},
|
||||
{QK_MAGIC_SWAP_RCTL_RGUI, "QK_MAGIC_SWAP_RCTL_RGUI"},
|
||||
{QK_MAGIC_UNSWAP_RCTL_RGUI, "QK_MAGIC_UNSWAP_RCTL_RGUI"},
|
||||
{QK_MAGIC_SWAP_CTL_GUI, "QK_MAGIC_SWAP_CTL_GUI"},
|
||||
{QK_MAGIC_UNSWAP_CTL_GUI, "QK_MAGIC_UNSWAP_CTL_GUI"},
|
||||
{QK_MAGIC_TOGGLE_CTL_GUI, "QK_MAGIC_TOGGLE_CTL_GUI"},
|
||||
{QK_MAGIC_EE_HANDS_LEFT, "QK_MAGIC_EE_HANDS_LEFT"},
|
||||
{QK_MAGIC_EE_HANDS_RIGHT, "QK_MAGIC_EE_HANDS_RIGHT"},
|
||||
{QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK, "QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK"},
|
||||
{QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK, "QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK"},
|
||||
{QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK, "QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK"},
|
||||
{QK_MIDI_ON, "QK_MIDI_ON"},
|
||||
{QK_MIDI_OFF, "QK_MIDI_OFF"},
|
||||
{QK_MIDI_TOGGLE, "QK_MIDI_TOGGLE"},
|
||||
|
|
Loading…
Reference in a new issue