Skip to content

Instantly share code, notes, and snippets.

@bendavis78
Last active November 27, 2018 18:04
Show Gist options
  • Save bendavis78/56780b185e2c8b87ee45b14a162ba6de to your computer and use it in GitHub Desktop.
Save bendavis78/56780b185e2c8b87ee45b14a162ba6de to your computer and use it in GitHub Desktop.

Notes for Chromebook keyboard settings

Make the search key an additional Escape

The chromebook search key sends the keycode 133, or LWIN. This can be mapped as an additional escape key (useful for vim users) using XKB.

Create the file /usr/share/X11/xkb/symbols/chromebook_opts with the following:

// Make LWIN an additional Escape
hidden partial modifier_keys
xkb_symbols "search_esc" {
    key <LWIN> { [ Escape ] };
    modifier_map Mod4 { <LWIN> };
};

Edit /usr/share/X11/xkb/rules/evdev and add a new line in the ! option = symbols section:

  chromebook:search_esc = +chromebook_opts(search_esc)

Edit /usr/share/X11/xkb/rules/evdev.lst and add a new line the ! option section:

  chromebook:search_esc  Make Chromebook search key an additional ESC

XFCE / GalliumOS

Edit /etc/default/keyboard and add chromebook:search_esc to the XKBOPTIONS variable (comma-separated).

Gnome

Run dconf-editor, and add the 'chromebook:search_esc' xkb option for Gnome under org.gnome.desktop.input-sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment