How do I reset my keyboard layout?

31,751

Solution 1

Try:

setxkbmap us

(Replacing us with the keyboard layout you want). If using a variant (e.g. intl), try

setxkbmap -layout us -variant intl

Here's a list of keyboard layouts.

Solution 2

Check current layout and options:

setxkbmap -print -verbose 10

Reset layout to US and reset options:

setxkbmap -layout us -option

(Without the empty -option parameter, no options would be reset.)

Use the first command to check the result.

Share:
31,751

Related videos on Youtube

Andrea Bertani
Author by

Andrea Bertani

Updated on September 17, 2022

Comments

  • Andrea Bertani
    Andrea Bertani over 1 year

    How can I reset my keyboard layout after modifying it with xkbcomp?

    Is there a way to do this without restarting X?

  • Andrea Bertani
    Andrea Bertani almost 14 years
    Where can I get a list of the names of the keyboard layouts? For example, how do I find out what to use for USA International?
  • dieki
    dieki almost 14 years
    I created this list from the contents of /usr/share/X11/xkb/rules/xorg.lst: pastebin.com/v2vCPHjs For USA International, do setxkbmap us -variant intl. (Only one dash!)
  • ArjanZuidhof
    ArjanZuidhof almost 14 years
    Could you please add the pastebin link or a file:///usr/share/X11/xkb/rules/xorg.lst link to your answer to improve readability?
  • solfish
    solfish almost 7 years
    this answer gives temporarily solution, after reboot system, possible switches would be default session
  • Henry's Cat
    Henry's Cat almost 7 years
    This also works if you run synergy and you have a modifier key, e.g. the shift key, apparently stuck down.
  • Rahul
    Rahul over 6 years
    is there any permanent solution to persist this changes, because it seems like after reboot it goes back to original state..
  • aliopi
    aliopi over 6 years
    This is not a real reset command
  • Pablo Bianchi
    Pablo Bianchi over 2 years
    Isn't the same list of keyboard layouts as in man xkeyboard-config?