//
crouton
ubuntu
chromebook
chrome os
,caps lock
,linux
Crouton is a nice set of scripts for running Ubuntu on a
Chromebook. These notebooks have a Search
key in place of the usual Caps Lock
key.
This article describes how to map the Search
key to the Caps Lock
function in crouton.
In your chroot, start xev
and press the Search
key:
$ xev | grep keycode
If you haven't installed the keyboard target you should see
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
which means that the key has the keycode 133
and
is associated to the keysym Super_L
, which is the
function triggered by the Windows
key on other keyboards.
All we now need to do is to associate that same keycode to the Caps_Lock
keysym.
You can do so by typing
$ xmodmap -e "keycode 133 = Caps_Lock"
You can now add this line to any autostart script you have in place. Note that this command must
be issued after any setxkbmap
command otherwise it will be overriden.
For the record here is the usual way.
Create a file ~/.Xmodmap
containing:
keycode 133 = Caps_Lock
Add the following lines to your .xinitrc:
if [-s ~/.Xmodmap]; then
xmodmap ~/.Xmodmap
fi
Replace Caps_Lock
with Escape
:
$ xmodmap -e "keycode 133 = Escape"