Reset keyboard layout to default and wipe out all earlier settings

16,019

Solution 1

only that helps me

dconf reset -f /org/gnome/

Solution 2

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

dpkg-reconfigure keyboard-configuration

(following a suggestion by @Byte Commander)

Solution 3

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
Share:
16,019

Related videos on Youtube

wyverniv
Author by

wyverniv

just another guy, hoping to change the world for the better through science and technology.

Updated on September 18, 2022

Comments

  • wyverniv
    wyverniv over 1 year

    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.

    • wyverniv
      wyverniv over 8 years
      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.
    • Byte Commander
      Byte Commander over 8 years
      I'm no expert at this, but maybe you want to try dpkg-reconfigure keyboard-configuration again?