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

Is there a way to do this without restarting X?

3 Answers 3



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.

  • 1
    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?
    – DLH
    Jul 29, 2010 at 14:55
  • 2
    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!)
    – dieki
    Jul 29, 2010 at 15:02
  • Could you please add the pastebin link or a file:///usr/share/X11/xkb/rules/xorg.lst link to your answer to improve readability? Jul 29, 2010 at 15:08
  • 1
    this answer gives temporarily solution, after reboot system, possible switches would be default session
    – solfish
    Jul 29, 2017 at 9:01
  • This also works if you run synergy and you have a modifier key, e.g. the shift key, apparently stuck down. Jul 31, 2017 at 13:21

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.


Use setxkbmap -layout us. It looks to completely reset the changes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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