evdev: map ChromeOS "Vivaldi" top-row action keys - #2409
Open
kk1987 wants to merge 1 commit into
Open
Conversation
Chromebook keyboards driven by the ChromeOS EC emit the top-row action keys as scancode set 1 codes 0xE0 0x11 - 0xE0 0x1E (see the codeset 1 comments on the SCANCODE_* enum in chrome-ec include/keyboard_8042_sharedlib.h). The e0 half of the evdev_scancode2key() translation table leaves eleven of those at NONE, so on FreeBSD those keys emit no evdev event at all and userspace remappers such as keyd have nothing to bind to: e0 11 fullscreen KEY_ZOOM e0 12 overview KEY_SCALE e0 13 screenshot KEY_SYSRQ e0 14 brightness down KEY_BRIGHTNESSDOWN e0 15 brightness up KEY_BRIGHTNESSUP e0 16 privacy screen toggle KEY_PRIVACY_SCREEN_TOGGLE e0 17 kbd backlight down KEY_KBDILLUMDOWN e0 18 kbd backlight up KEY_KBDILLUMUP e0 1a play/pause KEY_PLAYPAUSE e0 1b mic mute KEY_MICMUTE e0 1e kbd backlight toggle KEY_KBDILLUMTOGGLE Fill those in. Only entries that were previously NONE are touched: the EC's remaining top-row codes already have mappings here (e0 10 prev track, e0 19 next track, e0 20 mute, e0 2e / e0 30 volume, e0 67 refresh, e0 69 forward, e0 6a back), as do e0 1c keypad enter and e0 1d right control, and none of them change. Tested on: Lenovo ThinkPad C14 Chromebook (Google primus, ChromeOS EC) MFC after: 2 weeks Signed-off-by: Kang Kang <kk1987@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chromebook keyboards driven by the ChromeOS EC emit their top-row action keys as scancode set 1 codes
0xE0 0x11-0xE0 0x1E. Eleven of those areNONEinevdev_scancode2key()'s e0 table, so on FreeBSD the keys emit no evdev event at all — brightness, keyboard backlight, mic mute, screenshot, fullscreen, overview and the privacy-screen toggle are simply dead, and userspace remappers such askeydhave nothing to bind to.This fills in those eleven entries. The codes and their meanings are taken from the codeset 1 comments on the
SCANCODE_*enum in chrome-ecinclude/keyboard_8042_sharedlib.h.Only entries that were previously
NONEare touched. The EC's remaining top-row codes (e0 10prev track,e0 19next track,e0 20mute,e0 2e/e0 30volume,e0 67refresh,e0 69forward,e0 6aback) already had mappings, as dide0 1ckeypad enter ande0 1dright control; none of those change. The table still has exactly 256 entries.Tested on a Lenovo ThinkPad C14 Chromebook (Google
primusboard, ChromeOS EC, MrChromebox UEFI firmware) running FreeBSD 15.1: every top-row key now reports the expected code underevemu-record.