You are not logged in.
When I go to KDE's System Settings > Input Devices > Keyboard > Advanced, I try "Ctrl key position: Swap Left Alt Key With Left Ctrl Key". Nothing happens, Ctrl and Alt still do the same thing as before. This is a fresh Arch/KDE install so I may have neglected to install/configure something, but I haven't had any other keyboard problems.
EDIT: This problem seems to have gone away on its own. I guess an update fixed it?
Last edited by YAOMTC (2014-10-18 20:21:35)
Offline
I just tried installing xorg-xmodmap and creating this ~/.xmodmap
remove mod1 = Alt_L
remove control = Control_L
add mod1 = Control_L
add control = Alt_LBut that didn't work either.
Last edited by YAOMTC (2014-09-20 20:58:23)
Offline
Solved! Someone in #kde linked me to this:
http://superuser.com/questions/116376/c … alt-in-kde
Run setxkbmap -print | xkbcomp -xkb -o original.xkb -
Then copy original.xkb to switch-LALT-LCTL.xkb. Keep the file original.xkb as a backup, better remove write permission.
Edit switch-LALT-LCTL.xkb in the block xkb_keycodes and exchange the keycodes for LALT and LCTL.
Run xkbcomp switch-LALT-LCTL.xkb $DISPLAY to active your new layout. Run xkbcomp original.xkb $DISPLAY to restore the old one.
These instructions suffice for modification on any level of sophistication. The keyboard description file is just structured text, after all.
It worked for me! Not sure why System Settings couldn't do it but oh well.
EDIT: This resets every startup for some reason, so put that last line of code in a shell script and told KDE to run that script on startup.
Last edited by YAOMTC (2014-09-26 21:02:04)
Offline
Okay, this is ridiculous.
Even though I set up a shell script to run that line of code, and put it in ~/.kde4/Autostart, it didn't work. It would only swap the keys if I did it in the command line manually.
So I tried setting up 90-keyboard.conf in /etc/X11/xorg.conf.d/ :
Section "InputClass"
Identifier "keyboard defaults"
MatchIsKeyboard "on"
Option "XkbOptions" "grp:lctrl_lalt__toggle"
EndSectionBut it doesn't do anything!
EDIT: Someone on #archlinux helpfully pointed out the double underscore there, and directed me to /usr/share/X11/xkb/rules/xorg.lst, so I modified 90-keyboard.conf to be:
Section "InputClass"
Identifier "keyboard defaults"
MatchIsKeyboard "on"
Option "XkbOptions" "ctrl:swap_lalt_lctl"
EndSectionI was expecting it to work this time, but sadly, no...
Last edited by YAOMTC (2014-09-26 22:28:14)
Offline
Another update: tried xkeycaps, wouldn't work properly. Tried clicking left Ctrl and left Alt, but when I right-clicked a context menu popped up and quickly disappeared. It would only stay up while I held the right mouse button down, and I couldn't find a way to activate any of the menu items. Also, every time I start xkeycaps it says the keyboard type was not specified. Oh well, it looks like a buggy old thing anyway.
EDIT: System Settings is working consistently now, I'm guessing it was an obscure bug that no longer exists in a newer update?
Last edited by YAOMTC (2014-10-18 20:20:50)
Offline