The file /usr/share/X11/xkb/keycodes/evdev
is not an "evdev file", it's one of the many source files for the X keyboard translation table (xkb). No, it's not loaded upon login. Instead it serves as a source file for the compiler xkbcomp
, and the output of the compiled filed are loaded when the X server starts. The whole topic is a bit complex, so don't go about making changes randomly and expect stuff to work. Also, the usual way to make your own keyboard mapping is to write new files, and leave the old ones in place. See for example An Unreliable Guide to XKB Configuration for an introduction.
If you want to make your right alt key work as control key, a better way is to leave those files as they are, make an ~/.Xmodmap
file with the following two lines
remove mod4 = Alt_R
add control = Alt_R
test that it works by looking at xmodmap -pk
for the old state, then loading it with xmodmap ~/.Xmodmap
, then do again an xmodmap -pk
and make sure it looks right.
The result of this will be that the right alt key still shows up under its own keycode, but is treated as the control modifier so you can use it in combination with other keys.
Some display managers load ~/.Xmodmap
by default on login, some of the new display managers have lost this feature and you'll have to configure them to do that.
xmodmap
instead. – dirkt Mar 24 '17 at 06:52/usr/share/X11/xkb/keycodes/
. It s being loaded upon login. What I posted with just a snippet from the file. – lo tolmencre Mar 24 '17 at 16:37xkb
option (ctrl:ralt_rctrl
) to makeRALT
function likeRCTL
. Do you absolutely need it to work asLCTL
? If not, use the built-in option. Otherwise it should be trivial to define a new option in thectrl
file (it's the same code, just changeControl_R
toControl_L
)... – don_crissti Mar 24 '17 at 22:27