Overwrite Console Key Mapping Ctrl+Alt+F1
Dezember 14, 2016
Views: 997
After an Ubuntu 14.04 / KDE 4 update, I had the problem that the key strokes
The configuration is in /etc/console-setup
:
- On boot,
/etc/init/console-setup.conf
loads/etc/console-setup/cached.kmap.gz
- The tty-consoles are named
Console_1
…Console_12
- Find a specific key code:
- Use
Ctrl +Alt +F1 to switch to a terminal - Call
showkey
— this does not work in the desktop
- Use
- Backup the current configuration:
dumpkeys > backup.kmap
- Copy
backup.kmap
and edit the new file according to your needs - For my whishes, remove all console related hot keys, except for
Ctrl +Alt combinations:- Create the new key map file:
sudo -Hi cd /etc/console-setup dumpkeys > backup.kmap sed '/^\t*control\t*alt\t*keycode.*Console_/!{/Console_/d};/\(De\|In\)cr_Console/d;' backup.kmap > mrw.kmap loadkeys mrw.kmap
- Load and test the new key map file:
loadkeys mrw.kmap
- Edit
/etc/init/console-setup.conf
, change/etc/console-setup/cached.kmap.gz
to/etc/console-setup/mrw.keymap
:description "set console keymap" start on (virtual-filesystems or starting rcS or starting mountall-shell) task exec loadkeys /etc/console-setup/mrw.kmap
- Create the new key map file:
- Restore the old behaviour, call
sudo loadkeys /etc/console-setup/backup.kmap
and change back/etc/init/console-setup.conf
.