You are not logged in.
Pages: 1
My Tab key is broken (it works, but I must press it really hard), so I need to switch CapsLock and Tab keys (CapsLock isn't used so frequently so it can be broken key). I found two ways of doing this with xmodmap. First way:
remove Lock = Caps_Lock
keysym Tab = Caps_Lock
keysym Caps_Lock = Tab
add Lock = Caps_LockSecond:
clear Lock
keycode 66 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 23 = Caps_Lock NoSymbol Caps_LockBoth work fine when I run maually
xmodmap ~/.Xmodmap, but when I put
if [ -f ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fiin my .xinitrc file, Tab key becomes CapsLock, but CapsLock key works as both Tab and CapsLock. I also tried
if [ -f ~/.Xmodmap ]; then
(sleep 5 && xmodmap ~/.Xmodmap) &
fibut the result is the same.
Last edited by lahwaacz (2012-05-29 16:09:38)
Offline
Why not simply use setxkbmap in your .xinitrc and set the correct keycodes for your Tab key to the Caps Lock ?
setxkbmap -option caps:tabThere's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Why not simply use setxkbmap in your .xinitrc and set the correct keycodes for your Tab key to the Caps Lock ?
setxkbmap -option caps:tab
Well, this doesn't work for me...
Offline
I think it's irrelevant, but I've switched the keys for console.
/usr/local/share/kbd/keymaps/personal.map:
keycode 58 = Tab
keycode 15 = Caps_Lock/etc/rc.local:
loadkeys /usr/local/share/kbd/keymaps/personal.mapOr is there any way to tell X to keep console key maps?
Offline
did you check the correct keycode names for caps and tab ? and if so, are you getting any errors in your logs? If so post them
Just saying "doesn't work for me" doesn't help anyone !
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
did you check the correct keycode names for caps and tab ? and if so, are you getting any errors in your logs? If so post them
Just saying "doesn't work for me" doesn't help anyone !
Yes, I checked the keycodes. Console settings are fine. Xmodmap works fine when I run it manually, but not from xinitrc.
/var/log/Xorg.0.log doesn't say much about keyboard, only settings from /etc/X11/xorg.conf.d/20-keyboard_layout.conf and initializing hardware.
Output of setxkbmap -v 10 -option caps:tab:
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules: evdev
model: pc105
layout: cz,us
options: caps:tab,grp:alt_shift_toggle
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwertz)
types: complete
compat: complete
symbols: pc+cz+us:2+inet(evdev)+group(alt_shift_toggle)
geometry: pc(pc105)Offline
Pages: 1