You are not logged in.
Hi
i use xmodmap to swap esc and caps lock. my .xmodmaprc:
remove Lock = Caps_Lock
keycode 9 = Caps_Lock
keycode 66 = Escape dead_diaeresis
add Lock = Caps_LockAs login manager i use slim and everthing works as expected as long as i don't activate slim's autologin option. In this case pressing caps lock executes caps lock and esc. The same happens if i start X from the console via startx. I have no clue why this happens. Anyone got an idea whats the problem?
More, maybe relevant info: i use dwm as window manager and xmodmap is executed in .xinitrc.
ccc1
Last edited by ccc1 (2014-04-26 08:19:55)
Offline
I find that many of these types of common key switches are supported by xorg.conf.d configurations. For example, I use my caps lock as a secondary "windows key" since that is the mod key for my i3 setup. So I have this in /etc/X11/xorg.conf.d/10-evdev.conf
% cat /etc/X11/xorg.conf.d/00-keyboard.conf
<snip>
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbOptions" "caps:super"
EndSection
<snip> I found the option you need. It is in /usr/share/X11/xkb/rules/base.lst, and it is "caps:swapescape". In my mind, this is the more "correct" way of doing it, as it is done during the initalization of X rather than as an after thought.
I hope this helps!
Last edited by WonderWoofy (2013-04-25 22:55:19)
Offline
Or if you want to use ~/.xinitrc:
...
setxkbmap -model evdev -layout us -option caps:swapescape
...I am using this since a long time and never had problems.
Offline
I don't use an xinitrc, as my system is entirely systemd --user. But you are right, this is another option as well. I guess it also might be handy in that it gives an example if the user ever wants to make other "options" changes to xkb.
Offline
Oh, just saw your answer now!
Thanks, wonderwoofy! your solution works fine ![]()
ccc1
Offline
Oh, just saw your answer now!
Thanks, wonderwoofy! your solution works fineccc1
Wow, I looked at the date of my previous post and thought, "...but I haven't posted anything today yet!" But this thread is from exactly a year ago. ccc1, I commend you for coming back and marking your thread as [Solved]!
Offline