-
Notifications
You must be signed in to change notification settings - Fork 27
Keyboard
Chrome/Chromium OS enables sysrq functionality on the F10/Volume Up key when the system is put in developer mode. This behavior is reflected in crouton chroot environments and the Alt+F10/Volume Up key combination will be intercepted and interpreted as Alt+sysrq.
Installing crouton's keyboard target provides an xkb overlay that provides similar functions to bindings found in Chromium OS:
sudo sh -e ~/Downloads/crouton -t keyboard -u
Chromium OS key bindings can be inspected by typing Ctrl+Alt+/ (or whatever key is directly next to the right Shift key):
- All Search+key bindings are supported, with the difference that the top row (function keys) maps to F1->F10 by default. Search+function keys map to actual functions (navigation, brightness, volume, etc.).
- The other bindings (Ctrl+key, Alt+key, ...) are not supported, and will probably never be, as they may interfere with useful key combinations in some Linux applications.
Non-US layout can be setup by typing: setxkbmap -layout de (replace de by your layout). Some layouts also need to specify a variant, e.g. setxkbmap -layout ch -variant fr. This command needs to be run every time the chroot X server is started (you may want to put it in your window manager startup script).
Non-US layouts are compatible with the Chromebook keyboard model, so you still get Search+key bindings.
xbindkeys is loaded in the chroot X server, to allow commands to be executed when certain key combination is pressed (e.g. Ctrl+Alt+Back/Forward to switch between Chromium OS and the chroot display). .xbindkeysrc.scm in the user home directory is also loaded, if it exists, allowing to add custom bindings.
The configuration file is based on Scheme/Guile, and an example configuration file can be generated with xbindkeys -dg.
After modifying ~/.xbindkeysrc.scm, you need to restart the chroot X server (pkill -SIGHUP xbindkeys may not always work).
You can debug syntax errors by running:
METHOD='x11' xbindkeys -fg /etc/crouton/xbindkeysrc.scm -v,
replacing x11 by xephyr if you are using Xephyr (ARM or explicit choice)
Getting a middle click is tricky, especially on the Samsung ARM Chromebook: it requires quite a bit of skill to get 3 fingers down on the trackpad at the same time, and sometimes a right click is generated instead.
If your window manager or applications do not require Alt+Click for any other purpose, you can map it to generate a middle button click:
; Add to ~/.xbindkeysrc.scm
; Map Alt+click to middle button
; Map on Release so that it does not appear both buttons are pressed
(xbindkey '(release alt "b:1") "xdotool click --clearmodifiers 2")