2

I just installed Ubuntu 18 and got surprised by the fact that I can change keyboard layout only by key combinations, not by a single key.

Actually its not a problem yet - I used gnome-tweak-tool to change keyboard layout key to Right Shift. It works. Partially.

I mean, yes, I can change it by Right Shift, but it doesn't works as I expect. In Ubuntu 16 I use Right Shift too, but I also was able to print capital letters with it, now I can't.

When I press the Right Shift button, it changes layout immediately, before I can press any other button, so in total it prints lowercase letter in another keyboard layout.

I googled it and didn't find anything even close to my problem.
So Can someone help me with this?

3

1 Answer 1

1

You can achieve this with the tool xcape

sudo apt install xcape

Description: Configure modifier keys to act as other keys when pressed and released xcape allows you to use a modifier key as another key when pressed and released on its own. Note that it is slightly slower than pressing the original key, because the pressed event does not occur until the key is released. The default behaviour is to generate the Escape key when Left Control is pressed and released on its own.

once xcape is installed run the below command to make Right Shift release act as Super_L+space which is the default keyboard shortcut for keyboard layout change..

xcape -e 'Shift_R=Super_L|Space'

this way while Right Shift is held down you can type capital letters and when the key is pressed on its own and released, It will change the keyboard layout..

3
  • Thanks, but it didnt worked for me. I want to change layout only when Rshift is released, not immediately when it pressed. Is there any way to approach this? Commented Mar 6, 2019 at 10:29
  • It was somehow possible in Ubuntu 16. Moreover, i only set it up in standart settings window and at works well. Yes, Im able to type Capital letters with this workaround, but it prints letters in another layout, because it changes layout right when i press RShift. For example, here how it works when i press Rshift+L several times: ДLДLДLД Commented Mar 6, 2019 at 10:39
  • Hi, Answer Edited.. Please have a review..
    – PRATAP
    Commented Sep 18, 2019 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .