mirror of
https://github.com/qmk/qmk_firmware
synced 2025-01-06 15:01:39 +00:00
feat(core): add KC_GLOBE keycodes according
This commit is based on lordpixel23 commit [d390fff](d39033f320
)
This commit is contained in:
12
data/constants/keycodes/keycodes_0.0.4_basic_hjson
Normal file
12
data/constants/keycodes/keycodes_0.0.4_basic_hjson
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x00C3": {
|
||||
"group": "media",
|
||||
"key": "KC_GLOBE",
|
||||
"label": "Apple Globe/FN Key",
|
||||
"aliases": [
|
||||
"KC_GLB"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -283,6 +283,7 @@ enum qk_keycode_defines {
|
||||
KC_ASSISTANT = 0x00C0,
|
||||
KC_MISSION_CONTROL = 0x00C1,
|
||||
KC_LAUNCHPAD = 0x00C2,
|
||||
KC_GLOBE = 0x00C3,
|
||||
QK_MOUSE_CURSOR_UP = 0x00CD,
|
||||
QK_MOUSE_CURSOR_DOWN = 0x00CE,
|
||||
QK_MOUSE_CURSOR_LEFT = 0x00CF,
|
||||
@ -926,6 +927,7 @@ enum qk_keycode_defines {
|
||||
KC_ASST = KC_ASSISTANT,
|
||||
KC_MCTL = KC_MISSION_CONTROL,
|
||||
KC_LPAD = KC_LAUNCHPAD,
|
||||
KC_GLBE = KC_GLOBE,
|
||||
MS_UP = QK_MOUSE_CURSOR_UP,
|
||||
MS_DOWN = QK_MOUSE_CURSOR_DOWN,
|
||||
MS_LEFT = QK_MOUSE_CURSOR_LEFT,
|
||||
@ -1456,7 +1458,7 @@ enum qk_keycode_defines {
|
||||
#define IS_INTERNAL_KEYCODE(code) ((code) >= KC_NO && (code) <= KC_TRANSPARENT)
|
||||
#define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL)
|
||||
#define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE)
|
||||
#define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_LAUNCHPAD)
|
||||
#define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_GLOBE)
|
||||
#define IS_MOUSE_KEYCODE(code) ((code) >= QK_MOUSE_CURSOR_UP && (code) <= QK_MOUSE_ACCELERATION_2)
|
||||
#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)
|
||||
@ -1481,7 +1483,7 @@ enum qk_keycode_defines {
|
||||
#define INTERNAL_KEYCODE_RANGE KC_NO ... KC_TRANSPARENT
|
||||
#define BASIC_KEYCODE_RANGE KC_A ... KC_EXSEL
|
||||
#define SYSTEM_KEYCODE_RANGE KC_SYSTEM_POWER ... KC_SYSTEM_WAKE
|
||||
#define CONSUMER_KEYCODE_RANGE KC_AUDIO_MUTE ... KC_LAUNCHPAD
|
||||
#define CONSUMER_KEYCODE_RANGE KC_AUDIO_MUTE ... KC_GLOBE
|
||||
#define MOUSE_KEYCODE_RANGE QK_MOUSE_CURSOR_UP ... QK_MOUSE_ACCELERATION_2
|
||||
#define MODIFIER_KEYCODE_RANGE KC_LEFT_CTRL ... KC_RIGHT_GUI
|
||||
#define SWAP_HANDS_KEYCODE_RANGE QK_SWAP_HANDS_TOGGLE ... QK_SWAP_HANDS_ONE_SHOT
|
||||
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// clang-format off
|
||||
|
||||
/* HID report IDs */
|
||||
enum hid_report_ids {
|
||||
enum hid_report_ids {
|
||||
REPORT_ID_ALL = 0,
|
||||
REPORT_ID_KEYBOARD = 1,
|
||||
REPORT_ID_MOUSE,
|
||||
@ -316,6 +316,8 @@ static inline uint16_t KEYCODE2CONSUMER(uint8_t key) {
|
||||
return AC_DESKTOP_SHOW_ALL_WINDOWS;
|
||||
case KC_LAUNCHPAD:
|
||||
return AC_SOFT_KEY_LEFT;
|
||||
case KC_GLOBE:
|
||||
return AC_NEXT_KEYBOARD_LAYOUT_SELECT;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user