Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 41 additions & 40 deletions tmk_core/protocol/report.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ enum mouse_buttons {
*/
enum consumer_usages {
// 15.5 Display Controls
SNAPSHOT = 0x065,
BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf
BRIGHTNESS_DOWN = 0x070,
SNAPSHOT = 0x065,
BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf
BRIGHTNESS_DOWN = 0x070,
// 15.7 Transport Controls
TRANSPORT_RECORD = 0x0B2,
TRANSPORT_FAST_FORWARD = 0x0B3,
Expand All @@ -69,43 +69,44 @@ enum consumer_usages {
TRANSPORT_STOP_EJECT = 0x0CC,
TRANSPORT_PLAY_PAUSE = 0x0CD,
// 15.9.1 Audio Controls - Volume
AUDIO_MUTE = 0x0E2,
AUDIO_VOL_UP = 0x0E9,
AUDIO_VOL_DOWN = 0x0EA,
AUDIO_MUTE = 0x0E2,
AUDIO_VOL_UP = 0x0E9,
AUDIO_VOL_DOWN = 0x0EA,
// 15.15 Application Launch Buttons
AL_CC_CONFIG = 0x183,
AL_EMAIL = 0x18A,
AL_CALCULATOR = 0x192,
AL_LOCAL_BROWSER = 0x194,
AL_LOCK = 0x19E,
AL_CONTROL_PANEL = 0x19F,
AL_ASSISTANT = 0x1CB,
AL_KEYBOARD_LAYOUT = 0x1AE,
AL_CC_CONFIG = 0x183,
AL_EMAIL = 0x18A,
AL_CALCULATOR = 0x192,
AL_LOCAL_BROWSER = 0x194,
AL_LOCK = 0x19E,
AL_CONTROL_PANEL = 0x19F,
AL_ASSISTANT = 0x1CB,
AL_KEYBOARD_LAYOUT = 0x1AE,
// 15.16 Generic GUI Application Controls
AC_NEW = 0x201,
AC_OPEN = 0x202,
AC_CLOSE = 0x203,
AC_EXIT = 0x204,
AC_MAXIMIZE = 0x205,
AC_MINIMIZE = 0x206,
AC_SAVE = 0x207,
AC_PRINT = 0x208,
AC_PROPERTIES = 0x209,
AC_UNDO = 0x21A,
AC_COPY = 0x21B,
AC_CUT = 0x21C,
AC_PASTE = 0x21D,
AC_SELECT_ALL = 0x21E,
AC_FIND = 0x21F,
AC_SEARCH = 0x221,
AC_HOME = 0x223,
AC_BACK = 0x224,
AC_FORWARD = 0x225,
AC_STOP = 0x226,
AC_REFRESH = 0x227,
AC_BOOKMARKS = 0x22A,
AC_MISSION_CONTROL = 0x29F,
AC_LAUNCHPAD = 0x2A0
AC_NEW = 0x201,
AC_OPEN = 0x202,
AC_CLOSE = 0x203,
AC_EXIT = 0x204,
AC_MAXIMIZE = 0x205,
AC_MINIMIZE = 0x206,
AC_SAVE = 0x207,
AC_PRINT = 0x208,
AC_PROPERTIES = 0x209,
AC_UNDO = 0x21A,
AC_COPY = 0x21B,
AC_CUT = 0x21C,
AC_PASTE = 0x21D,
AC_SELECT_ALL = 0x21E,
AC_FIND = 0x21F,
AC_SEARCH = 0x221,
AC_HOME = 0x223,
AC_BACK = 0x224,
AC_FORWARD = 0x225,
AC_STOP = 0x226,
AC_REFRESH = 0x227,
AC_BOOKMARKS = 0x22A,
AC_NEXT_KEYBOARD_LAYOUT_SELECT = 0x29D,
AC_DESKTOP_SHOW_ALL_WINDOWS = 0x29F,
AC_SOFT_KEY_LEFT = 0x2A0
};

/* Generic Desktop Page (0x01)
Expand Down Expand Up @@ -321,9 +322,9 @@ static inline uint16_t KEYCODE2CONSUMER(uint8_t key) {
case KC_WWW_FAVORITES:
return AC_BOOKMARKS;
case KC_MISSION_CONTROL:
return AC_MISSION_CONTROL;
return AC_DESKTOP_SHOW_ALL_WINDOWS;
case KC_LAUNCHPAD:
return AC_LAUNCHPAD;
return AC_SOFT_KEY_LEFT;
default:
return 0;
}
Expand Down