mirror of
https://github.com/qmk/qmk_firmware
synced 2024-12-22 08:26:21 +00:00
Initial DD keycode migration (#18643)
* Initial DD keycode migration * Sort magic keycodes
This commit is contained in:
parent
a070c4c501
commit
a69ab05dd6
96
data/constants/keycodes/keycodes_0.0.1.hjson
Normal file
96
data/constants/keycodes/keycodes_0.0.1.hjson
Normal file
@ -0,0 +1,96 @@
|
||||
{
|
||||
"ranges": {
|
||||
"0x0000/0x00FF": {
|
||||
"define": "QK_BASIC"
|
||||
},
|
||||
"0x0100/0x1EFF": {
|
||||
"define": "QK_MODS"
|
||||
},
|
||||
"0x2000/0x1FFF": {
|
||||
"define": "QK_MOD_TAP"
|
||||
},
|
||||
"0x4000/0x0FFF": {
|
||||
"define": "QK_LAYER_TAP"
|
||||
},
|
||||
"0x5000/0x01FF": {
|
||||
"define": "QK_LAYER_MOD"
|
||||
},
|
||||
"0x5200/0x001F": {
|
||||
"define": "QK_TO"
|
||||
},
|
||||
"0x5220/0x001F": {
|
||||
"define": "QK_MOMENTARY"
|
||||
},
|
||||
"0x5240/0x001F": {
|
||||
"define": "QK_DEF_LAYER"
|
||||
},
|
||||
"0x5260/0x001F": {
|
||||
"define": "QK_TOGGLE_LAYER"
|
||||
},
|
||||
"0x5280/0x001F": {
|
||||
"define": "QK_ONE_SHOT_LAYER"
|
||||
},
|
||||
"0x52A0/0x001F": {
|
||||
"define": "QK_ONE_SHOT_MOD"
|
||||
},
|
||||
"0x52C0/0x001F": {
|
||||
"define": "QK_LAYER_TAP_TOGGLE"
|
||||
},
|
||||
// 0x52E0/0x001F - UNUSED
|
||||
// 0x5300/0x02FF - UNUSED
|
||||
"0x5600/0x00FF": {
|
||||
"define": "QK_SWAP_HANDS"
|
||||
},
|
||||
"0x5700/0x00FF": {
|
||||
"define": "QK_TAP_DANCE"
|
||||
},
|
||||
// 0x5800/0x17FF - UNUSED
|
||||
"0x7000/0x00FF": {
|
||||
"define": "QK_MAGIC"
|
||||
},
|
||||
"0x7100/0x00FF": {
|
||||
"define": "QK_MIDI"
|
||||
},
|
||||
"0x7200/0x01FF": {
|
||||
"define": "QK_SEQUENCER"
|
||||
},
|
||||
"0x7400/0x003F": {
|
||||
"define": "QK_JOYSTICK"
|
||||
},
|
||||
"0x7440/0x003F": {
|
||||
"define": "QK_PROGRAMMABLE_BUTTON"
|
||||
},
|
||||
"0x7480/0x003F": {
|
||||
"define": "QK_AUDIO"
|
||||
},
|
||||
"0x74C0/0x003F": {
|
||||
"define": "QK_STENO"
|
||||
},
|
||||
// 0x7500/0x01FF - UNUSED
|
||||
"0x7700/0x007F": {
|
||||
"define": "QK_MACRO"
|
||||
},
|
||||
// 0x7780/0x007F - UNUSED
|
||||
"0x7800/0x00FF": {
|
||||
"define": "QK_LIGHTING"
|
||||
},
|
||||
// 0x7900/0x02FF - UNUSED
|
||||
"0x7C00/0x01FF": {
|
||||
"define": "QK_QUANTUM"
|
||||
},
|
||||
"0x7E00/0x00FF": {
|
||||
"define": "QK_KB"
|
||||
},
|
||||
"0x7F00/0x00FF": {
|
||||
"define": "QK_USER"
|
||||
},
|
||||
"0x8000/0x7FFF": {
|
||||
"define": "QK_UNICODE"
|
||||
}
|
||||
},
|
||||
"keycodes": {
|
||||
"0x7E00": {
|
||||
"key": "SAFE_RANGE"
|
||||
}
|
||||
}
|
||||
}
|
84
data/constants/keycodes/keycodes_0.0.1_audio.hjson
Normal file
84
data/constants/keycodes/keycodes_0.0.1_audio.hjson
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7480": {
|
||||
"group": "audio",
|
||||
"key": "AU_ON"
|
||||
},
|
||||
"0x7481": {
|
||||
"group": "audio",
|
||||
"key": "AU_OFF"
|
||||
},
|
||||
"0x7482": {
|
||||
"group": "audio",
|
||||
"key": "AU_TOG"
|
||||
},
|
||||
|
||||
"0x748A": {
|
||||
"group": "audio",
|
||||
"key": "CLICKY_TOGGLE",
|
||||
"aliases": [
|
||||
"CK_TOGG"
|
||||
]
|
||||
},
|
||||
"0x748B": {
|
||||
"group": "audio",
|
||||
"key": "CLICKY_ENABLE",
|
||||
"aliases": [
|
||||
"CK_ON"
|
||||
]
|
||||
},
|
||||
"0x748C": {
|
||||
"group": "audio",
|
||||
"key": "CLICKY_DISABLE",
|
||||
"aliases": [
|
||||
"CK_OFF"
|
||||
]
|
||||
},
|
||||
"0x748D": {
|
||||
"group": "audio",
|
||||
"key": "CLICKY_UP",
|
||||
"aliases": [
|
||||
"CK_UP"
|
||||
]
|
||||
},
|
||||
"0x748E": {
|
||||
"group": "audio",
|
||||
"key": "CLICKY_DOWN",
|
||||
"aliases": [
|
||||
"CK_DOWN"
|
||||
]
|
||||
},
|
||||
"0x748F": {
|
||||
"group": "audio",
|
||||
"key": "CLICKY_RESET",
|
||||
"aliases": [
|
||||
"CK_RST"
|
||||
]
|
||||
},
|
||||
|
||||
"0x7490": {
|
||||
"group": "audio",
|
||||
"key": "MU_ON"
|
||||
},
|
||||
"0x7491": {
|
||||
"group": "audio",
|
||||
"key": "MU_OFF"
|
||||
},
|
||||
"0x7492": {
|
||||
"group": "audio",
|
||||
"key": "MU_TOG"
|
||||
},
|
||||
"0x7493": {
|
||||
"group": "audio",
|
||||
"key": "MU_MOD"
|
||||
},
|
||||
"0x7494": {
|
||||
"group": "audio",
|
||||
"key": "MUV_IN"
|
||||
},
|
||||
"0x7495": {
|
||||
"group": "audio",
|
||||
"key": "MUV_DE"
|
||||
}
|
||||
}
|
||||
}
|
1515
data/constants/keycodes/keycodes_0.0.1_basic.hjson
Normal file
1515
data/constants/keycodes/keycodes_0.0.1_basic.hjson
Normal file
File diff suppressed because it is too large
Load Diff
228
data/constants/keycodes/keycodes_0.0.1_joystick.hjson
Normal file
228
data/constants/keycodes/keycodes_0.0.1_joystick.hjson
Normal file
@ -0,0 +1,228 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7400": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_0",
|
||||
"aliases": [
|
||||
"JS_0"
|
||||
]
|
||||
},
|
||||
"0x7401": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_1",
|
||||
"aliases": [
|
||||
"JS_1"
|
||||
]
|
||||
},
|
||||
"0x7402": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_2",
|
||||
"aliases": [
|
||||
"JS_2"
|
||||
]
|
||||
},
|
||||
"0x7403": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_3",
|
||||
"aliases": [
|
||||
"JS_3"
|
||||
]
|
||||
},
|
||||
"0x7404": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_4",
|
||||
"aliases": [
|
||||
"JS_4"
|
||||
]
|
||||
},
|
||||
"0x7405": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_5",
|
||||
"aliases": [
|
||||
"JS_5"
|
||||
]
|
||||
},
|
||||
"0x7406": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_6",
|
||||
"aliases": [
|
||||
"JS_6"
|
||||
]
|
||||
},
|
||||
"0x7407": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_7",
|
||||
"aliases": [
|
||||
"JS_7"
|
||||
]
|
||||
},
|
||||
"0x7408": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_8",
|
||||
"aliases": [
|
||||
"JS_8"
|
||||
]
|
||||
},
|
||||
"0x7409": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_9",
|
||||
"aliases": [
|
||||
"JS_9"
|
||||
]
|
||||
},
|
||||
"0x740A": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_10",
|
||||
"aliases": [
|
||||
"JS_10"
|
||||
]
|
||||
},
|
||||
"0x740B": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_11",
|
||||
"aliases": [
|
||||
"JS_11"
|
||||
]
|
||||
},
|
||||
"0x740C": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_12",
|
||||
"aliases": [
|
||||
"JS_12"
|
||||
]
|
||||
},
|
||||
"0x740D": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_13",
|
||||
"aliases": [
|
||||
"JS_13"
|
||||
]
|
||||
},
|
||||
"0x740E": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_14",
|
||||
"aliases": [
|
||||
"JS_14"
|
||||
]
|
||||
},
|
||||
"0x740F": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_15",
|
||||
"aliases": [
|
||||
"JS_15"
|
||||
]
|
||||
},
|
||||
"0x7410": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_16",
|
||||
"aliases": [
|
||||
"JS_16"
|
||||
]
|
||||
},
|
||||
"0x7411": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_17",
|
||||
"aliases": [
|
||||
"JS_17"
|
||||
]
|
||||
},
|
||||
"0x7412": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_18",
|
||||
"aliases": [
|
||||
"JS_18"
|
||||
]
|
||||
},
|
||||
"0x7413": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_19",
|
||||
"aliases": [
|
||||
"JS_19"
|
||||
]
|
||||
},
|
||||
"0x7414": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_20",
|
||||
"aliases": [
|
||||
"JS_20"
|
||||
]
|
||||
},
|
||||
"0x7415": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_21",
|
||||
"aliases": [
|
||||
"JS_21"
|
||||
]
|
||||
},
|
||||
"0x7416": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_22",
|
||||
"aliases": [
|
||||
"JS_22"
|
||||
]
|
||||
},
|
||||
"0x7417": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_23",
|
||||
"aliases": [
|
||||
"JS_23"
|
||||
]
|
||||
},
|
||||
"0x7418": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_24",
|
||||
"aliases": [
|
||||
"JS_24"
|
||||
]
|
||||
},
|
||||
"0x7419": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_25",
|
||||
"aliases": [
|
||||
"JS_25"
|
||||
]
|
||||
},
|
||||
"0x741A": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_26",
|
||||
"aliases": [
|
||||
"JS_26"
|
||||
]
|
||||
},
|
||||
"0x741B": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_27",
|
||||
"aliases": [
|
||||
"JS_27"
|
||||
]
|
||||
},
|
||||
"0x741C": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_28",
|
||||
"aliases": [
|
||||
"JS_28"
|
||||
]
|
||||
},
|
||||
"0x741D": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_29",
|
||||
"aliases": [
|
||||
"JS_29"
|
||||
]
|
||||
},
|
||||
"0x741E": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_30",
|
||||
"aliases": [
|
||||
"JS_30"
|
||||
]
|
||||
},
|
||||
"0x741F": {
|
||||
"group": "joystick",
|
||||
"key": "QK_JOYSTICK_BUTTON_31",
|
||||
"aliases": [
|
||||
"JS_31"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
154
data/constants/keycodes/keycodes_0.0.1_lighting.hjson
Normal file
154
data/constants/keycodes/keycodes_0.0.1_lighting.hjson
Normal file
@ -0,0 +1,154 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7800": {
|
||||
"group": "backlight",
|
||||
"key": "BL_ON"
|
||||
},
|
||||
"0x7801": {
|
||||
"group": "backlight",
|
||||
"key": "BL_OFF"
|
||||
},
|
||||
"0x7802": {
|
||||
"group": "backlight",
|
||||
"key": "BL_DEC"
|
||||
},
|
||||
"0x7803": {
|
||||
"group": "backlight",
|
||||
"key": "BL_INC"
|
||||
},
|
||||
"0x7804": {
|
||||
"group": "backlight",
|
||||
"key": "BL_TOGG"
|
||||
},
|
||||
"0x7805": {
|
||||
"group": "backlight",
|
||||
"key": "BL_STEP"
|
||||
},
|
||||
"0x7806": {
|
||||
"group": "backlight",
|
||||
"key": "BL_BRTG"
|
||||
},
|
||||
|
||||
"0x7820": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_TOG"
|
||||
},
|
||||
"0x7821": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_FORWARD",
|
||||
"aliases": [
|
||||
"RGB_MOD"
|
||||
]
|
||||
},
|
||||
"0x7822": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_REVERSE",
|
||||
"aliases": [
|
||||
"RGB_RMOD"
|
||||
]
|
||||
},
|
||||
"0x7823": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_HUI"
|
||||
},
|
||||
"0x7824": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_HUD"
|
||||
},
|
||||
"0x7825": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_SAI"
|
||||
},
|
||||
"0x7826": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_SAD"
|
||||
},
|
||||
"0x7827": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_VAI"
|
||||
},
|
||||
"0x7828": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_VAD"
|
||||
},
|
||||
"0x7829": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_SPI"
|
||||
},
|
||||
"0x782A": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_SPD"
|
||||
},
|
||||
|
||||
"0x782B": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_PLAIN",
|
||||
"aliases": [
|
||||
"RGB_M_P"
|
||||
]
|
||||
},
|
||||
"0x782C": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_BREATHE",
|
||||
"aliases": [
|
||||
"RGB_M_B"
|
||||
]
|
||||
},
|
||||
"0x782D": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_RAINBOW",
|
||||
"aliases": [
|
||||
"RGB_M_R"
|
||||
]
|
||||
},
|
||||
"0x782E": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_SWIRL",
|
||||
"aliases": [
|
||||
"RGB_M_SW"
|
||||
]
|
||||
},
|
||||
"0x782F": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_SNAKE",
|
||||
"aliases": [
|
||||
"RGB_M_SN"
|
||||
]
|
||||
},
|
||||
"0x7830": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_KNIGHT",
|
||||
"aliases": [
|
||||
"RGB_M_K"
|
||||
]
|
||||
},
|
||||
"0x7831": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_XMAS",
|
||||
"aliases": [
|
||||
"RGB_M_X"
|
||||
]
|
||||
},
|
||||
"0x7832": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_GRADIENT",
|
||||
"aliases": [
|
||||
"RGB_M_G"
|
||||
]
|
||||
},
|
||||
"0x7833": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_RGBTEST",
|
||||
"aliases": [
|
||||
"RGB_M_T"
|
||||
]
|
||||
},
|
||||
"0x7834": {
|
||||
"group": "rgb",
|
||||
"key": "RGB_MODE_TWINKLE",
|
||||
"aliases": [
|
||||
"RGB_M_TW"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
133
data/constants/keycodes/keycodes_0.0.1_macro.hjson
Normal file
133
data/constants/keycodes/keycodes_0.0.1_macro.hjson
Normal file
@ -0,0 +1,133 @@
|
||||
{
|
||||
"keycodes": {
|
||||
|
||||
"0x7700": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_0"
|
||||
},
|
||||
"0x7701": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_1"
|
||||
},
|
||||
"0x7702": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_2"
|
||||
},
|
||||
"0x7703": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_3"
|
||||
},
|
||||
"0x7704": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_4"
|
||||
},
|
||||
"0x7705": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_5"
|
||||
},
|
||||
"0x7706": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_6"
|
||||
},
|
||||
"0x7707": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_7"
|
||||
},
|
||||
"0x7708": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_8"
|
||||
},
|
||||
"0x7709": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_9"
|
||||
},
|
||||
"0x770A": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_10"
|
||||
},
|
||||
"0x770B": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_11"
|
||||
},
|
||||
"0x770C": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_12"
|
||||
},
|
||||
"0x770D": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_13"
|
||||
},
|
||||
"0x770E": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_14"
|
||||
},
|
||||
"0x770F": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_15"
|
||||
},
|
||||
"0x7710": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_16"
|
||||
},
|
||||
"0x7711": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_17"
|
||||
},
|
||||
"0x7712": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_18"
|
||||
},
|
||||
"0x7713": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_19"
|
||||
},
|
||||
"0x7714": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_20"
|
||||
},
|
||||
"0x7715": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_21"
|
||||
},
|
||||
"0x7716": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_22"
|
||||
},
|
||||
"0x7717": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_23"
|
||||
},
|
||||
"0x7718": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_24"
|
||||
},
|
||||
"0x7719": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_25"
|
||||
},
|
||||
"0x771A": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_26"
|
||||
},
|
||||
"0x771B": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_27"
|
||||
},
|
||||
"0x771C": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_28"
|
||||
},
|
||||
"0x771D": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_29"
|
||||
},
|
||||
"0x771E": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_30"
|
||||
},
|
||||
"0x771F": {
|
||||
"group": "macro",
|
||||
"key": "MACRO_31"
|
||||
}
|
||||
}
|
||||
}
|
249
data/constants/keycodes/keycodes_0.0.1_magic.hjson
Normal file
249
data/constants/keycodes/keycodes_0.0.1_magic.hjson
Normal file
@ -0,0 +1,249 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7000": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_CONTROL_CAPSLOCK",
|
||||
"aliases": [
|
||||
"CL_SWAP"
|
||||
]
|
||||
},
|
||||
"0x7001": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_CONTROL_CAPSLOCK",
|
||||
"aliases": [
|
||||
"CL_NORM"
|
||||
]
|
||||
},
|
||||
"0x7002": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_CONTROL_CAPSLOCK",
|
||||
"aliases": [
|
||||
"CL_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7003": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNCAPSLOCK_TO_CONTROL",
|
||||
"aliases": [
|
||||
"CL_CAPS"
|
||||
]
|
||||
},
|
||||
"0x7004": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_CAPSLOCK_TO_CONTROL",
|
||||
"aliases": [
|
||||
"CL_CTRL"
|
||||
]
|
||||
},
|
||||
"0x7005": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_LALT_LGUI",
|
||||
"aliases": [
|
||||
"LAG_SWP"
|
||||
]
|
||||
},
|
||||
"0x7006": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_LALT_LGUI",
|
||||
"aliases": [
|
||||
"LAG_NRM"
|
||||
]
|
||||
},
|
||||
"0x7007": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_RALT_RGUI",
|
||||
"aliases": [
|
||||
"RAG_SWP"
|
||||
]
|
||||
},
|
||||
"0x7008": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_RALT_RGUI",
|
||||
"aliases": [
|
||||
"RAG_NRM"
|
||||
]
|
||||
},
|
||||
"0x7009": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNNO_GUI",
|
||||
"aliases": [
|
||||
"GUI_ON"
|
||||
]
|
||||
},
|
||||
"0x700A": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_NO_GUI",
|
||||
"aliases": [
|
||||
"GUI_OFF"
|
||||
]
|
||||
},
|
||||
"0x700B": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_GUI",
|
||||
"aliases": [
|
||||
"GUI_TOG"
|
||||
]
|
||||
},
|
||||
"0x700C": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_GRAVE_ESC",
|
||||
"aliases": [
|
||||
"GE_SWAP"
|
||||
]
|
||||
},
|
||||
"0x700D": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_GRAVE_ESC",
|
||||
"aliases": [
|
||||
"GE_NORM"
|
||||
]
|
||||
},
|
||||
"0x700E": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_BACKSLASH_BACKSPACE",
|
||||
"aliases": [
|
||||
"BS_SWAP"
|
||||
]
|
||||
},
|
||||
"0x700F": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_BACKSLASH_BACKSPACE",
|
||||
"aliases": [
|
||||
"BS_NORM"
|
||||
]
|
||||
},
|
||||
"0x7010": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_BACKSLASH_BACKSPACE",
|
||||
"aliases": [
|
||||
"BS_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7011": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_HOST_NKRO",
|
||||
"aliases": [
|
||||
"NK_ON"
|
||||
]
|
||||
},
|
||||
"0x7012": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNHOST_NKRO",
|
||||
"aliases": [
|
||||
"NK_OFF"
|
||||
]
|
||||
},
|
||||
"0x7013": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_NKRO",
|
||||
"aliases": [
|
||||
"NK_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7014": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_ALT_GUI",
|
||||
"aliases": [
|
||||
"AG_SWAP"
|
||||
]
|
||||
},
|
||||
"0x7015": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_ALT_GUI",
|
||||
"aliases": [
|
||||
"AG_NORM"
|
||||
]
|
||||
},
|
||||
"0x7016": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_ALT_GUI",
|
||||
"aliases": [
|
||||
"AG_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7017": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_LCTL_LGUI",
|
||||
"aliases": [
|
||||
"LCG_SWP"
|
||||
]
|
||||
},
|
||||
"0x7018": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_LCTL_LGUI",
|
||||
"aliases": [
|
||||
"LCG_NRM"
|
||||
]
|
||||
},
|
||||
"0x7019": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_RCTL_RGUI",
|
||||
"aliases": [
|
||||
"RCG_SWP"
|
||||
]
|
||||
},
|
||||
"0x701A": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_RCTL_RGUI",
|
||||
"aliases": [
|
||||
"RCG_NRM"
|
||||
]
|
||||
},
|
||||
"0x701B": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_CTL_GUI",
|
||||
"aliases": [
|
||||
"CG_SWAP"
|
||||
]
|
||||
},
|
||||
"0x701C": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_CTL_GUI",
|
||||
"aliases": [
|
||||
"CG_NORM"
|
||||
]
|
||||
},
|
||||
"0x701D": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_CTL_GUI",
|
||||
"aliases": [
|
||||
"CG_TOGG"
|
||||
]
|
||||
},
|
||||
"0x701E": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_EE_HANDS_LEFT",
|
||||
"aliases": [
|
||||
"EH_LEFT"
|
||||
]
|
||||
},
|
||||
"0x701F": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_EE_HANDS_RIGHT",
|
||||
"aliases": [
|
||||
"EH_RGHT"
|
||||
]
|
||||
},
|
||||
"0x7020": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_SWAP_ESCAPE_CAPSLOCK",
|
||||
"aliases": [
|
||||
"EC_SWAP"
|
||||
]
|
||||
},
|
||||
"0x7021": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_UNSWAP_ESCAPE_CAPSLOCK",
|
||||
"aliases": [
|
||||
"EC_NORM"
|
||||
]
|
||||
},
|
||||
"0x7022": {
|
||||
"group": "magic",
|
||||
"key": "MAGIC_TOGGLE_ESCAPE_CAPSLOCK",
|
||||
"aliases": [
|
||||
"EC_TOGG"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
670
data/constants/keycodes/keycodes_0.0.1_midi.hjson
Normal file
670
data/constants/keycodes/keycodes_0.0.1_midi.hjson
Normal file
File diff suppressed because it is too large
Load Diff
228
data/constants/keycodes/keycodes_0.0.1_programmable_button.hjson
Normal file
228
data/constants/keycodes/keycodes_0.0.1_programmable_button.hjson
Normal file
@ -0,0 +1,228 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7440": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_1",
|
||||
"aliases": [
|
||||
"PB_1"
|
||||
]
|
||||
},
|
||||
"0x7441": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_2",
|
||||
"aliases": [
|
||||
"PB_2"
|
||||
]
|
||||
},
|
||||
"0x7442": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_3",
|
||||
"aliases": [
|
||||
"PB_3"
|
||||
]
|
||||
},
|
||||
"0x7443": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_4",
|
||||
"aliases": [
|
||||
"PB_4"
|
||||
]
|
||||
},
|
||||
"0x7444": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_5",
|
||||
"aliases": [
|
||||
"PB_5"
|
||||
]
|
||||
},
|
||||
"0x7445": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_6",
|
||||
"aliases": [
|
||||
"PB_6"
|
||||
]
|
||||
},
|
||||
"0x7446": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_7",
|
||||
"aliases": [
|
||||
"PB_7"
|
||||
]
|
||||
},
|
||||
"0x7447": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_8",
|
||||
"aliases": [
|
||||
"PB_8"
|
||||
]
|
||||
},
|
||||
"0x7448": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_9",
|
||||
"aliases": [
|
||||
"PB_9"
|
||||
]
|
||||
},
|
||||
"0x7449": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_10",
|
||||
"aliases": [
|
||||
"PB_10"
|
||||
]
|
||||
},
|
||||
"0x744A": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_11",
|
||||
"aliases": [
|
||||
"PB_11"
|
||||
]
|
||||
},
|
||||
"0x744B": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_12",
|
||||
"aliases": [
|
||||
"PB_12"
|
||||
]
|
||||
},
|
||||
"0x744C": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_13",
|
||||
"aliases": [
|
||||
"PB_13"
|
||||
]
|
||||
},
|
||||
"0x744D": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_14",
|
||||
"aliases": [
|
||||
"PB_14"
|
||||
]
|
||||
},
|
||||
"0x744E": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_15",
|
||||
"aliases": [
|
||||
"PB_15"
|
||||
]
|
||||
},
|
||||
"0x744F": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_16",
|
||||
"aliases": [
|
||||
"PB_16"
|
||||
]
|
||||
},
|
||||
"0x7450": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_17",
|
||||
"aliases": [
|
||||
"PB_17"
|
||||
]
|
||||
},
|
||||
"0x7451": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_18",
|
||||
"aliases": [
|
||||
"PB_18"
|
||||
]
|
||||
},
|
||||
"0x7452": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_19",
|
||||
"aliases": [
|
||||
"PB_19"
|
||||
]
|
||||
},
|
||||
"0x7453": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_20",
|
||||
"aliases": [
|
||||
"PB_20"
|
||||
]
|
||||
},
|
||||
"0x7454": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_21",
|
||||
"aliases": [
|
||||
"PB_21"
|
||||
]
|
||||
},
|
||||
"0x7455": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_22",
|
||||
"aliases": [
|
||||
"PB_22"
|
||||
]
|
||||
},
|
||||
"0x7456": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_23",
|
||||
"aliases": [
|
||||
"PB_23"
|
||||
]
|
||||
},
|
||||
"0x7457": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_24",
|
||||
"aliases": [
|
||||
"PB_24"
|
||||
]
|
||||
},
|
||||
"0x7458": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_25",
|
||||
"aliases": [
|
||||
"PB_25"
|
||||
]
|
||||
},
|
||||
"0x7459": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_26",
|
||||
"aliases": [
|
||||
"PB_26"
|
||||
]
|
||||
},
|
||||
"0x745A": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_27",
|
||||
"aliases": [
|
||||
"PB_27"
|
||||
]
|
||||
},
|
||||
"0x745B": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_28",
|
||||
"aliases": [
|
||||
"PB_28"
|
||||
]
|
||||
},
|
||||
"0x745C": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_29",
|
||||
"aliases": [
|
||||
"PB_29"
|
||||
]
|
||||
},
|
||||
"0x745D": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_30",
|
||||
"aliases": [
|
||||
"PB_30"
|
||||
]
|
||||
},
|
||||
"0x745E": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_31",
|
||||
"aliases": [
|
||||
"PB_31"
|
||||
]
|
||||
},
|
||||
"0x745F": {
|
||||
"group": "programmable_button",
|
||||
"key": "QK_PROGRAMMABLE_BUTTON_32",
|
||||
"aliases": [
|
||||
"PB_32"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
464
data/constants/keycodes/keycodes_0.0.1_quantum.hjson
Normal file
464
data/constants/keycodes/keycodes_0.0.1_quantum.hjson
Normal file
File diff suppressed because it is too large
Load Diff
40
data/constants/keycodes/keycodes_0.0.1_sequencer.hjson
Normal file
40
data/constants/keycodes/keycodes_0.0.1_sequencer.hjson
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7200": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_ON"
|
||||
},
|
||||
"0x7201": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_OFF"
|
||||
},
|
||||
"0x7202": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_TOG"
|
||||
},
|
||||
"0x7203": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_TMPD"
|
||||
},
|
||||
"0x7204": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_TMPU"
|
||||
},
|
||||
"0x7205": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_RESD"
|
||||
},
|
||||
"0x7206": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_RESU"
|
||||
},
|
||||
"0x7207": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_SALL"
|
||||
},
|
||||
"0x7208": {
|
||||
"group": "sequencer",
|
||||
"key": "SQ_SCLR"
|
||||
}
|
||||
}
|
||||
}
|
20
data/constants/keycodes/keycodes_0.0.1_steno.hjson
Normal file
20
data/constants/keycodes/keycodes_0.0.1_steno.hjson
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x74F0": {
|
||||
"group": "steno",
|
||||
"key": "QK_STENO_BOLT"
|
||||
},
|
||||
"0x74F1": {
|
||||
"group": "steno",
|
||||
"key": "QK_STENO_GEMINI"
|
||||
},
|
||||
"0x74F2": {
|
||||
"group": "steno",
|
||||
"key": "QK_STENO_COMB"
|
||||
},
|
||||
"0x74FC": {
|
||||
"group": "steno",
|
||||
"key": "QK_STENO_COMB_MAX"
|
||||
}
|
||||
}
|
||||
}
|
32
data/constants/keycodes/keycodes_0.0.1_swap_hands.hjson
Normal file
32
data/constants/keycodes/keycodes_0.0.1_swap_hands.hjson
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x56F0": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_TG"
|
||||
},
|
||||
"0x56F1": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_TT"
|
||||
},
|
||||
"0x56F2": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_MON"
|
||||
},
|
||||
"0x56F3": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_MOFF"
|
||||
},
|
||||
"0x56F4": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_OFF"
|
||||
},
|
||||
"0x56F5": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_ON"
|
||||
},
|
||||
"0x56F6": {
|
||||
"group": "swap_hands",
|
||||
"key": "SH_OS"
|
||||
}
|
||||
}
|
||||
}
|
57
data/schemas/keycodes.jsonschema
Normal file
57
data/schemas/keycodes.jsonschema
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema#",
|
||||
"$id": "qmk.keycodes.v1",
|
||||
"title": "Keycode Information",
|
||||
"type": "object",
|
||||
"definitions": {
|
||||
"define": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 50,
|
||||
"pattern": "^[A-Zs_0-9]*$"
|
||||
},
|
||||
"hex_number_4d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F]{4}$"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"ranges": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"define"
|
||||
],
|
||||
"properties": {
|
||||
"define": {"$ref": "#/definitions/define"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycodes": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"$ref": "#/definitions/hex_number_4d"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {"$ref": "#/definitions/define"},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -56,6 +56,7 @@ subcommands = [
|
||||
'qmk.cli.generate.info_json',
|
||||
'qmk.cli.generate.keyboard_c',
|
||||
'qmk.cli.generate.keyboard_h',
|
||||
'qmk.cli.generate.keycodes',
|
||||
'qmk.cli.generate.rgb_breathe_table',
|
||||
'qmk.cli.generate.rules_mk',
|
||||
'qmk.cli.generate.version_h',
|
||||
|
@ -11,12 +11,23 @@ from qmk.info import info_json
|
||||
from qmk.json_encoders import InfoJSONEncoder
|
||||
from qmk.json_schema import json_load
|
||||
from qmk.keyboard import find_readme, list_keyboards
|
||||
from qmk.keycodes import load_spec, list_versions
|
||||
|
||||
DATA_PATH = Path('data')
|
||||
TEMPLATE_PATH = DATA_PATH / 'templates/api/'
|
||||
BUILD_API_PATH = Path('.build/api_data/')
|
||||
|
||||
|
||||
def _resolve_keycode_specs(output_folder):
|
||||
"""To make it easier for consumers, publish pre-merged spec files
|
||||
"""
|
||||
for version in list_versions():
|
||||
overall = load_spec(version)
|
||||
|
||||
output_file = output_folder / f'constants/keycodes_{version}.json'
|
||||
output_file.write_text(json.dumps(overall, indent=4), encoding='utf-8')
|
||||
|
||||
|
||||
def _filtered_keyboard_list():
|
||||
"""Perform basic filtering of list_keyboards
|
||||
"""
|
||||
@ -95,6 +106,9 @@ def generate_api(cli):
|
||||
'usb': usb_list,
|
||||
}
|
||||
|
||||
# Feature specific handling
|
||||
_resolve_keycode_specs(v1_dir)
|
||||
|
||||
# Write the global JSON files
|
||||
keyboard_all_json = json.dumps({'last_updated': current_datetime(), 'keyboards': kb_all}, cls=InfoJSONEncoder)
|
||||
usb_json = json.dumps({'last_updated': current_datetime(), 'usb': usb_list}, cls=InfoJSONEncoder)
|
||||
|
88
lib/python/qmk/cli/generate/keycodes.py
Normal file
88
lib/python/qmk/cli/generate/keycodes.py
Normal file
@ -0,0 +1,88 @@
|
||||
"""Used by the make system to generate keycodes.h from keycodes_{version}.json
|
||||
"""
|
||||
from milc import cli
|
||||
|
||||
from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE
|
||||
from qmk.commands import dump_lines
|
||||
from qmk.path import normpath
|
||||
from qmk.keycodes import load_spec
|
||||
|
||||
|
||||
def _generate_ranges(lines, keycodes):
|
||||
lines.append('')
|
||||
lines.append('enum qk_keycode_ranges {')
|
||||
lines.append('// Ranges')
|
||||
for key, value in keycodes["ranges"].items():
|
||||
lo, mask = map(lambda x: int(x, 16), key.split("/"))
|
||||
hi = lo + mask
|
||||
define = value.get("define")
|
||||
lines.append(f' {define.ljust(30)} = 0x{lo:04X},')
|
||||
lines.append(f' {(define + "_MAX").ljust(30)} = 0x{hi:04X},')
|
||||
lines.append('};')
|
||||
|
||||
|
||||
def _generate_defines(lines, keycodes):
|
||||
lines.append('')
|
||||
lines.append('enum qk_keycode_defines {')
|
||||
lines.append('// Keycodes')
|
||||
for key, value in keycodes["keycodes"].items():
|
||||
lines.append(f' {value.get("key")} = {key},')
|
||||
|
||||
lines.append('')
|
||||
lines.append('// Alias')
|
||||
for key, value in keycodes["keycodes"].items():
|
||||
temp = value.get("key")
|
||||
for alias in value.get("aliases", []):
|
||||
lines.append(f' {alias.ljust(10)} = {temp},')
|
||||
|
||||
lines.append('};')
|
||||
|
||||
|
||||
def _generate_helpers(lines, keycodes):
|
||||
lines.append('')
|
||||
lines.append('// Range Helpers')
|
||||
for value in keycodes["ranges"].values():
|
||||
define = value.get("define")
|
||||
lines.append(f'#define IS_{define}(code) ((code) >= {define} && (code) <= {define + "_MAX"})')
|
||||
|
||||
# extract min/max
|
||||
temp = {}
|
||||
for key, value in keycodes["keycodes"].items():
|
||||
group = value.get('group', None)
|
||||
if not group:
|
||||
continue
|
||||
if group not in temp:
|
||||
temp[group] = [0xFFFF, 0]
|
||||
key = int(key, 16)
|
||||
if key < temp[group][0]:
|
||||
temp[group][0] = key
|
||||
if key > temp[group][1]:
|
||||
temp[group][1] = key
|
||||
|
||||
lines.append('')
|
||||
lines.append('// Group Helpers')
|
||||
for group, codes in temp.items():
|
||||
lo = keycodes["keycodes"][f'0x{codes[0]:04X}']['key']
|
||||
hi = keycodes["keycodes"][f'0x{codes[1]:04X}']['key']
|
||||
lines.append(f'#define IS_{ group.upper() }_KEYCODE(code) ((code) >= {lo} && (code) <= {hi})')
|
||||
|
||||
|
||||
@cli.argument('-v', '--version', arg_only=True, required=True, help='Version of keycodes to generate.')
|
||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||
@cli.subcommand('Used by the make system to generate keycodes.h from keycodes_{version}.json', hidden=True)
|
||||
def generate_keycodes(cli):
|
||||
"""Generates the keycodes.h file.
|
||||
"""
|
||||
|
||||
# Build the keycodes.h file.
|
||||
keycodes_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '// clang-format off']
|
||||
|
||||
keycodes = load_spec(cli.args.version)
|
||||
|
||||
_generate_ranges(keycodes_h_lines, keycodes)
|
||||
_generate_defines(keycodes_h_lines, keycodes)
|
||||
_generate_helpers(keycodes_h_lines, keycodes)
|
||||
|
||||
# Show the results
|
||||
dump_lines(cli.args.output, keycodes_h_lines, cli.args.quiet)
|
57
lib/python/qmk/keycodes.py
Normal file
57
lib/python/qmk/keycodes.py
Normal file
@ -0,0 +1,57 @@
|
||||
from pathlib import Path
|
||||
|
||||
from qmk.json_schema import deep_update, json_load, validate
|
||||
|
||||
CONSTANTS_PATH = Path('data/constants/keycodes/')
|
||||
|
||||
|
||||
def _validate(spec):
|
||||
# first throw it to the jsonschema
|
||||
validate(spec, 'qmk.keycodes.v1')
|
||||
|
||||
# no duplicate keycodes
|
||||
keycodes = []
|
||||
for value in spec['keycodes'].values():
|
||||
keycodes.append(value['key'])
|
||||
keycodes.extend(value.get('aliases', []))
|
||||
duplicates = set([x for x in keycodes if keycodes.count(x) > 1])
|
||||
if duplicates:
|
||||
raise ValueError(f'Keycode spec contains duplicate keycodes! ({",".join(duplicates)})')
|
||||
|
||||
|
||||
def load_spec(version):
|
||||
"""Build keycode data from the requested spec file
|
||||
"""
|
||||
if version == 'latest':
|
||||
version = list_versions()[0]
|
||||
|
||||
file = CONSTANTS_PATH / f'keycodes_{version}.hjson'
|
||||
if not file.exists():
|
||||
raise ValueError(f'Requested keycode spec ({version}) is invalid!')
|
||||
|
||||
# Load base
|
||||
spec = json_load(file)
|
||||
|
||||
# Merge in fragments
|
||||
fragments = CONSTANTS_PATH.glob(f'keycodes_{version}_*.hjson')
|
||||
for file in fragments:
|
||||
deep_update(spec, json_load(file))
|
||||
|
||||
# Sort?
|
||||
spec['keycodes'] = dict(sorted(spec['keycodes'].items()))
|
||||
|
||||
# Validate?
|
||||
_validate(spec)
|
||||
|
||||
return spec
|
||||
|
||||
|
||||
def list_versions():
|
||||
"""Return available versions - sorted newest first
|
||||
"""
|
||||
ret = []
|
||||
for file in CONSTANTS_PATH.glob('keycodes_[0-9].[0-9].[0-9].hjson'):
|
||||
ret.append(file.stem.split('_')[1])
|
||||
|
||||
ret.sort(reverse=True)
|
||||
return ret
|
@ -179,6 +179,9 @@ enum mods_bit {
|
||||
MOD_RALT = 0x14,
|
||||
MOD_RGUI = 0x18,
|
||||
};
|
||||
#define MOD_HYPR (MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI)
|
||||
#define MOD_MEH (MOD_LCTL | MOD_LSFT | MOD_LALT)
|
||||
|
||||
enum mods_codes {
|
||||
MODS_ONESHOT = 0x00,
|
||||
MODS_TAP_TOGGLE = 0x01,
|
||||
|
File diff suppressed because it is too large
Load Diff
1115
quantum/keycodes.h
Normal file
1115
quantum/keycodes.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -109,7 +109,7 @@ action_t action_for_keycode(uint16_t keycode) {
|
||||
break;
|
||||
case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX:;
|
||||
// OSM(mod) - One-shot mod
|
||||
mod = mod_config(keycode & 0xFF);
|
||||
mod = mod_config(keycode & 0x1F);
|
||||
action.code = ACTION_MODS_ONESHOT(mod);
|
||||
break;
|
||||
#endif
|
||||
@ -118,8 +118,8 @@ action_t action_for_keycode(uint16_t keycode) {
|
||||
action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF);
|
||||
break;
|
||||
case QK_LAYER_MOD ... QK_LAYER_MOD_MAX:
|
||||
mod = mod_config(keycode & 0xF);
|
||||
action_layer = (keycode >> 4) & 0xF;
|
||||
mod = mod_config(keycode & 0x1F);
|
||||
action_layer = (keycode >> 5) & 0xF;
|
||||
action.code = ACTION_LAYER_MODS(action_layer, mod);
|
||||
break;
|
||||
#endif
|
||||
|
@ -19,11 +19,11 @@
|
||||
|
||||
bool process_joystick(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QK_JOYSTICK_BUTTON_MIN ... QK_JOYSTICK_BUTTON_MAX:
|
||||
case QK_JOYSTICK ... QK_JOYSTICK_MAX:
|
||||
if (record->event.pressed) {
|
||||
register_joystick_button(keycode - QK_JOYSTICK_BUTTON_MIN);
|
||||
register_joystick_button(keycode - QK_JOYSTICK);
|
||||
} else {
|
||||
unregister_joystick_button(keycode - QK_JOYSTICK_BUTTON_MIN);
|
||||
unregister_joystick_button(keycode - QK_JOYSTICK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -40,158 +40,152 @@ float cg_swap_song[][2] = CG_SWAP_SONG;
|
||||
bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
||||
// skip anything that isn't a keyup
|
||||
if (record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI:
|
||||
case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
|
||||
case MAGIC_TOGGLE_GUI:
|
||||
case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
|
||||
case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
|
||||
case MAGIC_SWAP_ESCAPE_CAPSLOCK ... MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
|
||||
/* keymap config */
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
switch (keycode) {
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK:
|
||||
keymap_config.swap_control_capslock = true;
|
||||
break;
|
||||
case MAGIC_SWAP_ESCAPE_CAPSLOCK:
|
||||
keymap_config.swap_escape_capslock = true;
|
||||
break;
|
||||
case MAGIC_CAPSLOCK_TO_CONTROL:
|
||||
keymap_config.capslock_to_control = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LCTL_LGUI:
|
||||
keymap_config.swap_lctl_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RCTL_RGUI:
|
||||
keymap_config.swap_rctl_rgui = true;
|
||||
break;
|
||||
case MAGIC_NO_GUI:
|
||||
keymap_config.no_gui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = true;
|
||||
break;
|
||||
case MAGIC_SWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = true;
|
||||
break;
|
||||
case MAGIC_HOST_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = true;
|
||||
break;
|
||||
case MAGIC_SWAP_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
|
||||
if (IS_MAGIC_KEYCODE(keycode)) {
|
||||
/* keymap config */
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
switch (keycode) {
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK:
|
||||
keymap_config.swap_control_capslock = true;
|
||||
break;
|
||||
case MAGIC_SWAP_ESCAPE_CAPSLOCK:
|
||||
keymap_config.swap_escape_capslock = true;
|
||||
break;
|
||||
case MAGIC_CAPSLOCK_TO_CONTROL:
|
||||
keymap_config.capslock_to_control = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LCTL_LGUI:
|
||||
keymap_config.swap_lctl_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RCTL_RGUI:
|
||||
keymap_config.swap_rctl_rgui = true;
|
||||
break;
|
||||
case MAGIC_NO_GUI:
|
||||
keymap_config.no_gui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = true;
|
||||
break;
|
||||
case MAGIC_SWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = true;
|
||||
break;
|
||||
case MAGIC_HOST_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = true;
|
||||
break;
|
||||
case 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:
|
||||
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:
|
||||
keymap_config.swap_control_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
|
||||
keymap_config.swap_escape_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNCAPSLOCK_TO_CONTROL:
|
||||
keymap_config.capslock_to_control = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LCTL_LGUI:
|
||||
keymap_config.swap_lctl_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RCTL_RGUI:
|
||||
keymap_config.swap_rctl_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNNO_GUI:
|
||||
keymap_config.no_gui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = false;
|
||||
break;
|
||||
case MAGIC_UNHOST_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = false;
|
||||
break;
|
||||
case 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:
|
||||
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:
|
||||
keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
|
||||
keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui;
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (keymap_config.swap_ralt_rgui) {
|
||||
PLAY_SONG(ag_swap_song);
|
||||
#endif
|
||||
break;
|
||||
case 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:
|
||||
keymap_config.swap_control_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
|
||||
keymap_config.swap_escape_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNCAPSLOCK_TO_CONTROL:
|
||||
keymap_config.capslock_to_control = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LCTL_LGUI:
|
||||
keymap_config.swap_lctl_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RCTL_RGUI:
|
||||
keymap_config.swap_rctl_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNNO_GUI:
|
||||
keymap_config.no_gui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = false;
|
||||
break;
|
||||
case MAGIC_UNHOST_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
|
||||
#ifdef AUDIO_ENABLE
|
||||
} else {
|
||||
PLAY_SONG(ag_norm_song);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_UNSWAP_CTL_GUI:
|
||||
keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false;
|
||||
break;
|
||||
case 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
|
||||
if (keymap_config.swap_rctl_rgui) {
|
||||
PLAY_SONG(cg_swap_song);
|
||||
} else {
|
||||
PLAY_SONG(cg_norm_song);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case 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
|
||||
if (keymap_config.swap_ralt_rgui) {
|
||||
PLAY_SONG(ag_swap_song);
|
||||
} else {
|
||||
PLAY_SONG(ag_norm_song);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case 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
|
||||
if (keymap_config.swap_rctl_rgui) {
|
||||
PLAY_SONG(cg_swap_song);
|
||||
} else {
|
||||
PLAY_SONG(cg_norm_song);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
|
||||
break;
|
||||
case MAGIC_TOGGLE_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = !keymap_config.nkro;
|
||||
break;
|
||||
case MAGIC_EE_HANDS_LEFT:
|
||||
eeconfig_update_handedness(true);
|
||||
break;
|
||||
case MAGIC_EE_HANDS_RIGHT:
|
||||
eeconfig_update_handedness(false);
|
||||
break;
|
||||
case MAGIC_TOGGLE_GUI:
|
||||
keymap_config.no_gui = !keymap_config.no_gui;
|
||||
break;
|
||||
case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
|
||||
keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
|
||||
break;
|
||||
case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
|
||||
keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
|
||||
break;
|
||||
case MAGIC_TOGGLE_NKRO:
|
||||
clear_keyboard(); // clear first buffer to prevent stuck keys
|
||||
keymap_config.nkro = !keymap_config.nkro;
|
||||
break;
|
||||
case MAGIC_EE_HANDS_LEFT:
|
||||
eeconfig_update_handedness(true);
|
||||
break;
|
||||
case MAGIC_EE_HANDS_RIGHT:
|
||||
eeconfig_update_handedness(false);
|
||||
break;
|
||||
case MAGIC_TOGGLE_GUI:
|
||||
keymap_config.no_gui = !keymap_config.no_gui;
|
||||
break;
|
||||
case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
|
||||
keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
|
||||
break;
|
||||
case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
|
||||
keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
|
||||
break;
|
||||
}
|
||||
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
clear_keyboard(); // clear to prevent stuck keys
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
clear_keyboard(); // clear to prevent stuck keys
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "programmable_button.h"
|
||||
|
||||
bool process_programmable_button(uint16_t keycode, keyrecord_t *record) {
|
||||
if (keycode >= QK_PROGRAMMABLE_BUTTON_MIN && keycode <= QK_PROGRAMMABLE_BUTTON_MAX) {
|
||||
uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON_MIN + 1;
|
||||
if (IS_QK_PROGRAMMABLE_BUTTON(keycode)) {
|
||||
uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON + 1;
|
||||
if (record->event.pressed) {
|
||||
programmable_button_register(button);
|
||||
} else {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -389,48 +389,25 @@
|
||||
#define X_ASSISTANT c0
|
||||
|
||||
/* Mouse Buttons (unallocated range in HID spec) */
|
||||
#ifdef VIA_ENABLE
|
||||
#define X_MS_UP f0
|
||||
#define X_MS_DOWN f1
|
||||
#define X_MS_LEFT f2
|
||||
#define X_MS_RIGHT f3
|
||||
#define X_MS_BTN1 f4
|
||||
#define X_MS_BTN2 f5
|
||||
#define X_MS_BTN3 f6
|
||||
#define X_MS_BTN4 f7
|
||||
#define X_MS_BTN5 f8
|
||||
#define X_MS_BTN6 f8
|
||||
#define X_MS_BTN7 f8
|
||||
#define X_MS_BTN8 f8
|
||||
#define X_MS_WH_UP f9
|
||||
#define X_MS_WH_DOWN fa
|
||||
#define X_MS_WH_LEFT fb
|
||||
#define X_MS_WH_RIGHT fc
|
||||
#define X_MS_ACCEL0 fd
|
||||
#define X_MS_ACCEL1 fe
|
||||
#define X_MS_ACCEL2 ff
|
||||
#else
|
||||
#define X_MS_UP cd
|
||||
#define X_MS_DOWN ce
|
||||
#define X_MS_LEFT cf
|
||||
#define X_MS_RIGHT d0
|
||||
#define X_MS_BTN1 d1
|
||||
#define X_MS_BTN2 d2
|
||||
#define X_MS_BTN3 d3
|
||||
#define X_MS_BTN4 d4
|
||||
#define X_MS_BTN5 d5
|
||||
#define X_MS_BTN6 d6
|
||||
#define X_MS_BTN7 d7
|
||||
#define X_MS_BTN8 d8
|
||||
#define X_MS_WH_UP d9
|
||||
#define X_MS_WH_DOWN da
|
||||
#define X_MS_WH_LEFT db
|
||||
#define X_MS_WH_RIGHT dc
|
||||
#define X_MS_ACCEL0 dd
|
||||
#define X_MS_ACCEL1 de
|
||||
#define X_MS_ACCEL2 df
|
||||
#endif
|
||||
|
||||
#define X_MS_UP cd
|
||||
#define X_MS_DOWN ce
|
||||
#define X_MS_LEFT cf
|
||||
#define X_MS_RIGHT d0
|
||||
#define X_MS_BTN1 d1
|
||||
#define X_MS_BTN2 d2
|
||||
#define X_MS_BTN3 d3
|
||||
#define X_MS_BTN4 d4
|
||||
#define X_MS_BTN5 d5
|
||||
#define X_MS_BTN6 d6
|
||||
#define X_MS_BTN7 d7
|
||||
#define X_MS_BTN8 d8
|
||||
#define X_MS_WH_UP d9
|
||||
#define X_MS_WH_DOWN da
|
||||
#define X_MS_WH_LEFT db
|
||||
#define X_MS_WH_RIGHT dc
|
||||
#define X_MS_ACCEL0 dd
|
||||
#define X_MS_ACCEL1 de
|
||||
#define X_MS_ACCEL2 df
|
||||
|
||||
// Send string macros
|
||||
#define STRINGIZE(z) #z
|
||||
|
@ -50,7 +50,6 @@
|
||||
#include "dynamic_keymap.h"
|
||||
#include "eeprom.h"
|
||||
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
|
||||
#include "via_ensure_keycode.h"
|
||||
|
||||
// Forward declare some helpers.
|
||||
#if defined(VIA_QMK_BACKLIGHT_ENABLE)
|
||||
|
@ -58,7 +58,7 @@
|
||||
|
||||
// This is changed only when the command IDs change,
|
||||
// so VIA Configurator can detect compatible firmware.
|
||||
#define VIA_PROTOCOL_VERSION 0x000A
|
||||
#define VIA_PROTOCOL_VERSION 0x000B
|
||||
|
||||
enum via_command_id {
|
||||
id_get_protocol_version = 0x01, // always 0x01
|
||||
@ -103,13 +103,8 @@ enum via_lighting_value {
|
||||
id_qmk_rgblight_color = 0x83,
|
||||
};
|
||||
|
||||
// Can't use SAFE_RANGE here, it might change if someone adds
|
||||
// new values to enum quantum_keycodes.
|
||||
// Need to keep checking 0x5F10 is still in the safe range.
|
||||
// TODO: merge this into quantum_keycodes
|
||||
// Backlight keycodes are in range 0x5F00-0x5F0F
|
||||
enum via_keycodes {
|
||||
FN_MO13 = 0x5F10,
|
||||
FN_MO13 = QK_MACRO,
|
||||
FN_MO23,
|
||||
MACRO00,
|
||||
MACRO01,
|
||||
@ -130,7 +125,7 @@ enum via_keycodes {
|
||||
};
|
||||
|
||||
enum user_keycodes {
|
||||
USER00 = 0x5F80,
|
||||
USER00 = QK_USER,
|
||||
USER01,
|
||||
USER02,
|
||||
USER03,
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user