Add "AC Next Keyboard Layout Select" consumer usage entry (macOS Globe key) (#22256)

This commit is contained in:
Ryan 2023-10-31 13:19:53 +11:00 committed by GitHub
parent 49fd13f596
commit 6979794bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,9 +55,9 @@ enum mouse_buttons {
*/ */
enum consumer_usages { enum consumer_usages {
// 15.5 Display Controls // 15.5 Display Controls
SNAPSHOT = 0x065, SNAPSHOT = 0x065,
BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf
BRIGHTNESS_DOWN = 0x070, BRIGHTNESS_DOWN = 0x070,
// 15.7 Transport Controls // 15.7 Transport Controls
TRANSPORT_RECORD = 0x0B2, TRANSPORT_RECORD = 0x0B2,
TRANSPORT_FAST_FORWARD = 0x0B3, TRANSPORT_FAST_FORWARD = 0x0B3,
@ -70,43 +70,44 @@ enum consumer_usages {
TRANSPORT_STOP_EJECT = 0x0CC, TRANSPORT_STOP_EJECT = 0x0CC,
TRANSPORT_PLAY_PAUSE = 0x0CD, TRANSPORT_PLAY_PAUSE = 0x0CD,
// 15.9.1 Audio Controls - Volume // 15.9.1 Audio Controls - Volume
AUDIO_MUTE = 0x0E2, AUDIO_MUTE = 0x0E2,
AUDIO_VOL_UP = 0x0E9, AUDIO_VOL_UP = 0x0E9,
AUDIO_VOL_DOWN = 0x0EA, AUDIO_VOL_DOWN = 0x0EA,
// 15.15 Application Launch Buttons // 15.15 Application Launch Buttons
AL_CC_CONFIG = 0x183, AL_CC_CONFIG = 0x183,
AL_EMAIL = 0x18A, AL_EMAIL = 0x18A,
AL_CALCULATOR = 0x192, AL_CALCULATOR = 0x192,
AL_LOCAL_BROWSER = 0x194, AL_LOCAL_BROWSER = 0x194,
AL_LOCK = 0x19E, AL_LOCK = 0x19E,
AL_CONTROL_PANEL = 0x19F, AL_CONTROL_PANEL = 0x19F,
AL_ASSISTANT = 0x1CB, AL_ASSISTANT = 0x1CB,
AL_KEYBOARD_LAYOUT = 0x1AE, AL_KEYBOARD_LAYOUT = 0x1AE,
// 15.16 Generic GUI Application Controls // 15.16 Generic GUI Application Controls
AC_NEW = 0x201, AC_NEW = 0x201,
AC_OPEN = 0x202, AC_OPEN = 0x202,
AC_CLOSE = 0x203, AC_CLOSE = 0x203,
AC_EXIT = 0x204, AC_EXIT = 0x204,
AC_MAXIMIZE = 0x205, AC_MAXIMIZE = 0x205,
AC_MINIMIZE = 0x206, AC_MINIMIZE = 0x206,
AC_SAVE = 0x207, AC_SAVE = 0x207,
AC_PRINT = 0x208, AC_PRINT = 0x208,
AC_PROPERTIES = 0x209, AC_PROPERTIES = 0x209,
AC_UNDO = 0x21A, AC_UNDO = 0x21A,
AC_COPY = 0x21B, AC_COPY = 0x21B,
AC_CUT = 0x21C, AC_CUT = 0x21C,
AC_PASTE = 0x21D, AC_PASTE = 0x21D,
AC_SELECT_ALL = 0x21E, AC_SELECT_ALL = 0x21E,
AC_FIND = 0x21F, AC_FIND = 0x21F,
AC_SEARCH = 0x221, AC_SEARCH = 0x221,
AC_HOME = 0x223, AC_HOME = 0x223,
AC_BACK = 0x224, AC_BACK = 0x224,
AC_FORWARD = 0x225, AC_FORWARD = 0x225,
AC_STOP = 0x226, AC_STOP = 0x226,
AC_REFRESH = 0x227, AC_REFRESH = 0x227,
AC_BOOKMARKS = 0x22A, AC_BOOKMARKS = 0x22A,
AC_MISSION_CONTROL = 0x29F, AC_NEXT_KEYBOARD_LAYOUT_SELECT = 0x29D,
AC_LAUNCHPAD = 0x2A0 AC_DESKTOP_SHOW_ALL_WINDOWS = 0x29F,
AC_SOFT_KEY_LEFT = 0x2A0
}; };
/* Generic Desktop Page (0x01) /* Generic Desktop Page (0x01)
@ -302,9 +303,9 @@ static inline uint16_t KEYCODE2CONSUMER(uint8_t key) {
case KC_WWW_FAVORITES: case KC_WWW_FAVORITES:
return AC_BOOKMARKS; return AC_BOOKMARKS;
case KC_MISSION_CONTROL: case KC_MISSION_CONTROL:
return AC_MISSION_CONTROL; return AC_DESKTOP_SHOW_ALL_WINDOWS;
case KC_LAUNCHPAD: case KC_LAUNCHPAD:
return AC_LAUNCHPAD; return AC_SOFT_KEY_LEFT;
default: default:
return 0; return 0;
} }