1

First of all sorry my punctuation will be bad. its hard to type when keys are not doing what you expect. Eg it keeps scaring the **** out of me by taking a screen shot when I push the up arrow lolol

So anyways, I broke a key on my keyboard and used xkeycaps to remap it to an unused key which worked. But then I realized it screwed up other keys...

I think this is the program I used http://www.jwz.org/xkeycaps/man.html

And then after doing the modifications I found out how to save them from the second answer in this question How to Map my enter key to a different key down where it says this "When you are happy with your current keymap and want to use it in future X-sessions, run the following command to save it:

xmodmap -pke > ~/.Xmodmap"

I doubt this is relevant but I just restarted with a live cd and the keys all worked there. well it's kind of relevant because it verifies what I was thinking... worst case scenario I can format and reinstall and the issue will go away.

1 Answers1

2


According to this answer "xmodmap has no notion of state, so it has no way to reset state directly."

So, you can restore it to back by undoing your edited keys:

Open terminal again and type this line one by one for key: for example to set the ; and F12 as default do following command.

xmodmap -e "keycode 47 = semicolon"
xmodmap -e "keycode 96 = F12"

Next type xmodmap -pke > ~/.Xmodmap

Or you can use setxkbmap -layout Your_keybard_Layout_Here to reset completely your changes to default.

Note:
Replace correct keyboard layout istead of Your_keybard_Layout_Here use setxkbmap -query to find your correct layout.

For example my layout is "us":

user@test-pc:~$ setxkbmap -query
   rules:      evdev
   model:      pc105
   layout:     us        <---------------------- HERE
   options:    grp_led:scroll
αғsнιη
  • 35,660
  • I don't care if those two stay swapped. Even if I get this reset I will try to swap those two again. It's all the other keys that got remapped with out me trying to remap them that are the problem, and now they won't map to anything... – user273872 Aug 22 '14 at 23:35
  • @user273872 I have updated my answer. check please. – αғsнιη Aug 23 '14 at 06:00
  • seems legit... I have reformatted a couple of times since then so idk... – user273872 Sep 22 '14 at 04:35