2

How can I eliminate all of the possible keyboard layout modifications so that my keyboard layout goes back to normal? I wanted to try and change my caps lock key to be a control key, as many people before me have done. I finally found a way to do this by adding the command

/bin/bash -c "sleep 15&&setxkbmap -layout us -option ctrl:nocaps"

to my startup applications preferences. (accessed by typing super, then typing "startup applications")

It works for commands like ctrl+d that only have ctrl and a letter, but it doesn't seem to work for commands like ctrl+alt+T that consist of ctrl and an additional modifier key.

When I was trying to do this earlier, I tried a bunch of different things that I can't remember, most of them having to do with xmodmap and xkeycaps, but possibly some other edits. Commands to xmodmap didn't have any effect and commands with xkeycaps don't persist after logging out.

I don't have a ~/.Xmodmap file, and I've tried using

dpkg-reconfigure keyboard-configuration

as suggested in this thread: Keyboard layout wont change but to no avail.

I noticed that when I use the guest account the caps lock key works as normal, so does that mean the issue lies somewhere in my home directory? I'm tempted to just wipe out my user account and just make another one if that would do the trick.

EDIT: Found a solution! Yay. I checked in my dconf settings using the following command: dconf-editor Then I went to org > gnome > desktop > input-sources and found that the registry 'xkb-options' had ['caps:none']. Changing the option to [] reset my keyboard's behaviour back to normal.

  • It should be user-specific, I think. But from reading your question only, I think removing the startup command you describe could be probably everything needed already. – Byte Commander Sep 18 '15 at 7:08
  • I've removed the startup command, now the caps lock key appears to do nothing. When running xev, it registers as keycode 66 (keysym 0xfe03, ISO_Level3_Shift) but it doesn't seem to have a function mapped to it. – wyverniv Sep 18 '15 at 7:13
  • I'm no expert at this, but maybe you want to try dpkg-reconfigure keyboard-configuration again? – Byte Commander Sep 18 '15 at 7:25
1

I had the same problem and the following command worked for me

dpkg-reconfigure keyboard-configuration

(following a suggestion by @Byte Commander)

0

Thanks to details in Debian wiki Keyboard topic, I often use the following command to reset compose:ralt layout option when switching between keyboards layout:

sudo udevadm trigger --subsystem-match=input --action=change

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.