Skip to content

evdev: map ChromeOS "Vivaldi" top-row action keys - #2409

Open
kk1987 wants to merge 1 commit into
freebsd:mainfrom
kk1987:evdev-vivaldi-scancodes
Open

evdev: map ChromeOS "Vivaldi" top-row action keys#2409
kk1987 wants to merge 1 commit into
freebsd:mainfrom
kk1987:evdev-vivaldi-scancodes

Conversation

@kk1987

@kk1987 kk1987 commented Sep 6, 2026

Copy link
Copy Markdown

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 are NONE in evdev_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 as keyd have 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-ec include/keyboard_8042_sharedlib.h.

Only entries that were previously NONE are touched. The EC's remaining top-row codes (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) already had mappings, as did e0 1c keypad enter and e0 1d right control; none of those change. The table still has exactly 256 entries.

Tested on a Lenovo ThinkPad C14 Chromebook (Google primus board, ChromeOS EC, MrChromebox UEFI firmware) running FreeBSD 15.1: every top-row key now reports the expected code under evemu-record.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant