Score:2

How to remap symbols on the right shift key (for all layouts)?

br flag

My alphanumerical key for '1' and '!' (the very left of the number keys) broke. So, I edited, against the advice in some articles, the file /usr/share/X11/xkb/symbols/us and remapped the '1' and '!' to the key left to it, the tilde (˜) key. The changes looked like that:

//key <TLDE> {  [     grave,    asciitilde  ]   };
key <TLDE> {    [     1,    exclam  ]   };

This worked fine. Then I decided to assign the tilde symbols to the right shift key, because I never use it. The file /usr/share/X11/xkb/symbols/us doesn't contain the right shift key, so after reading on the internet I decided to alter the file /usr/share/X11/xkb/symbols/pc and did the following changes

//key <RTSH> {  [ Shift_R       ]   };
key <RTSH> {    [ grave,    asciitilde      ]   };

So, I did just an outcomment and copy-paste of the command from the first file. Funnily enough, the second change works, but only in some circumstances. E.g. it works on the log-in screen, when I need to type my password. But after I log-in the right shift key is back to its original functionality. Also, when I try to type the grave sign by pressing left shift + right shift (on a standard US keyboard you get the grave by shift + tilde) I toggle between my different keyboard layouts, instead of writing a grave.

What's wrong? Why do I find in other articles the recommendation not to alter the /usr/share/X11/xkb/symbols/us or pc files? And how can I assign to my right shift key the symbols grave, asciitilde? Also, how can I make this change of the right shift key also be valid for my other keyboard layouts (e.g. German layout, Bulgarian layout a.s.o.). Thanks!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.