You are not logged in.
Pages: 1
I want do disable my Escape key (due to a hardware defect) and use the Caps lock key instead.
There exists a vast of tips how to map Escape to Caps lock, but what I want is:
* disable Escape key completely (because it's pressed randomly, tea accident, laptop keyboard)
* change the keymap files (create a new) under /usr/share/kbd/keymaps, not only use xmodmap
I'm from Germany and use the de-latin1-nodeadkeys map.
I tried the following:
# jakob.map: disable Escape and map Escape to Caps lock
include "de-latin1-nodeadkeys.map"
keycode 1 =
keycode 58 = Escape
But this does not disable the Escape key.
So, how can I completely disable that key?
Further questions:
* the Caps lock LED on my keyboard is still turning on and off, although it's now an Escape key -- is there a chance to change this behavior?
* can I change the current keymap while running, or do I have to put the name in rc.conf and reboot?
Offline
You can set X keymap with setxkbmap.
You can remove lock with 'remove Lock = Caps_Lock' in xmodmap. Look for xkbd equivalent.
(that's for X, not vc)
Last edited by lucke (2008-03-24 12:21:08)
Offline
Hello lucke,
thanks for your response but it doesn't help me, because
(1) first it does not disable the Escape key and
(2) second I often work without X so I need the key change under virtual console, too.
Offline
Look at /usr/share/kbd/keymaps/i386/colemak/colemak.map.gz - it disables Capslock lock and puts Backspace there instead. Seems that binding backspace (escape in your case) to key 58 is enough in kbd's case (kbd is vc, xkdb/xmodmap is X).
I'm not sure if disabling esc is possible, but perhaps you might try binding scrollock or numlock to it (if it doesn't break anything for you).
Offline
* can I change the current keymap while running, or do I have to put the name in rc.conf and reboot?
loadkeys: it is invoked by rc.sysinit
status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP
As for your problem you could try to remap esc to some useless key like scroll lock as it's already been suggested.
I think loadkeys replaces the default key bindings made at boot by the kernel, so ESC is mapped to ESC because the standard american keyboard is like that and you have to specify explicitly to remove a binding, so leaving keycode 1 blank simply doesn't replace the value.
Offline
Thanks! I finally solved it the way you propsed:
My new keymap:
$ zcat jakob.map.gz
include "de-latin1-nodeadkeys.map"
keycode 1 = Num_Lock
keycode 58 = Escape
And the X equivalent:
$ cat .Xmodmap
clear lock
keycode 113 = Mode_switch
keycode 9 = Num_Lock
keycode 66 = Escape
Last edited by jakobm (2008-03-25 10:02:30)
Offline
Pages: 1