From e1fa67ce621f741661f3517b47c579ecbc185209 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Wed, 20 Sep 2023 19:00:38 +0100 Subject: [PATCH] feat(hid): Add apple globe keycode --- app/include/dt-bindings/zmk/keys.h | 4 ++++ docs/src/data/groups.js | 1 + docs/src/data/hid.js | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/app/include/dt-bindings/zmk/keys.h b/app/include/dt-bindings/zmk/keys.h index 3e67c402470..ddf1af85566 100644 --- a/app/include/dt-bindings/zmk/keys.h +++ b/app/include/dt-bindings/zmk/keys.h @@ -1439,3 +1439,7 @@ #define C_KEYBOARD_INPUT_ASSIST_CANCEL \ (ZMK_HID_USAGE(HID_USAGE_CONSUMER, HID_USAGE_CONSUMER_KEYBOARD_INPUT_ASSIST_CANCEL)) #define C_KBIA_CANCEL (C_KEYBOARD_INPUT_ASSIST_CANCEL) + +/* Apple Globe key */ +#define C_KEYBOARD_LAYOUT_SELECT (ZMK_HID_USAGE(HID_USAGE_CONSUMER, 0x029D)) +#define GLOBE (C_KEYBOARD_LAYOUT_SELECT) diff --git a/docs/src/data/groups.js b/docs/src/data/groups.js index 0eb15d27fc5..c560dbbcbf8 100644 --- a/docs/src/data/groups.js +++ b/docs/src/data/groups.js @@ -49,6 +49,7 @@ export default { "C_AC_DESKTOP_SHOW_ALL_WINDOWS", "C_AC_DESKTOP_SHOW_ALL_APPLICATIONS", "C_VOICE_COMMAND", + "C_KEYBOARD_LAYOUT_SELECT", ], applications: [ "C_AL_NEXT_TASK", diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 457671728f8..c3f89eead51 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -7865,4 +7865,25 @@ export default [ }, footnotes: {}, }, + { + names: ["C_KEYBOARD_LAYOUT_SELECT", "GLOBE"], + description: "Layout Select (Apple Globe)", + context: "Consumer AC", + clarify: true, + usages: [ + { + application: consumerApplication, + item: usage(consumerPage, 0x29d), + }, + ], + documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=150", + os: { + windows: null, + linux: true, + android: null, + macos: true, + ios: null, + }, + footnotes: {}, + }, ];