You are not logged in.
Hello,
Since my last update (2015/02/05), the xkb option
caps:swapescape gets removed everytime X server loses focus. By "lose focus", I mean switching to virtual console, triggering sleep, triggering suspend, etc.
EDIT: This situation changed. Suspend and sleep no longer drops swapescape. Only virtual console drops it.
Here is the output of setxkbmap -query before and after jumping to virtual console (ctrl+alt+f2):
[22:52:57 ~]$ setxkbmap -query
rules: evdev
model: pc104
layout: ca,us
variant: multi,
options: caps:swapescape,numpad:microsoft
[22:53:00 ~]$ setxkbmap -query
rules: evdev
model: pc104
layout: ca,us
variant: multi,
options: numpad:microsoft
[22:53:05 ~]$ The swapescape option got dropped. Another option I tried was to run:
[22:53:05 ~]$ cat .speedswapper
! Swap caps lock and escape
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
[22:53:05 ~]$ xmodmap ~/.speedswapperWhile this successfully swaps esc and caps, it does not stick (switching to console reverts the change)
I'm not exactly sure how I could fix that. Is there a way I can execute some code every time X unhangs? Is there a way to punch in the esc <-> caps flip in the XKB layout map?
Extra info:
this is my .xinitrc file:
setxkbmap -layout ca -variant multi -option caps:swapescape -option numpad:microsoftAfter boot, the caps:swapescape is not enables. A quick
setxkbmap -option caps:swapescapeapplies the option.
EDIT: This situation changed. Suspend and sleep no longer drops swapescape. Only going to virtual console drops it.
Last edited by morphheus (2015-02-06 21:03:39)
Offline
Update: sleep and suspend no longer caps/escape swap. Only going to the console does it.
Offline
Try using an X config file instead.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
No success with the X config file: the appropriate keyboard loads, but not the swapescape option. The swapescape still gets cleared on switching to Virtual console.
Is there a way I can code in caps -> esc directly in the keyboard mapping? Here are a couple of way I can think of:
1) "hard code" caps and esc in the XKB mapping (i.e. don't use an option, shove it straight in the config file)
2) Use a "loadkeys" keymap for an X session? (I have a keymap made for the console that has switched esc/caps keys)
3) Recompile my kernel to permanently switch those two keys
After having messed a bit with the XKB layout maps, I think it's possible to do 1). I'll look into it later.
I looked around and couldn't find a way to use a keymap made for Loadkeys on X.
I have never compiled a kernel, so I don't know if 3) is possible.
Offline
No success with the X config file: the appropriate keyboard loads, but not the swapescape option.
I use an X config file to swap ctrl and caps. Are you sure you're doing it right?
$ ls /etc/X11/xorg.conf.d/
00-keyboard.conf 20-nouveau.conf 30-fonts.conf
$ cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
Identifier "system-keyboard"
Driver "evdev"
Option "XkbLayout" "carpalx"
Option "XkbOptions" "ctrl:swapcaps"
EndSection.
The swapescape still gets cleared on switching to Virtual console.
Presumably you're falling back to however you were doing it before, so it's no surprise it still gets cleared right?
As to workarounds, I think your best option is to figure out why the right solution is not working. 1) may be more complicated than you expect; 2) definitely won't work; 3) a lot of time & effort for little reward.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
I was struggling with the same problem: xkboptions was resetted every time X server loosed focus.
I don't know what magic stands behind GNOME Tweak Tool, but using this tool solved problem for me (setting 'Ctrl key position' to 'Swap Ctrl and Caps Lock' in 'Typing' tab).
Offline