Score:1

Change keyboard layout with r_shift and r_alt in Lubuntu(LXQt)

in flag

I want change my keyboard layout, like Windows with right Shift and right Alt. But now just can one time change. left Shift + left Alt is working but right Shift and right Alt work for one time. enter image description here

Sadaharu Wakisaka avatar
pl flag
Welcome to AskUbuntu, Can you upload a picture of your keyboard? May be the right Alt key you think it is, actually an Alt_Gr key.
Score:0
in flag

I don't know if this is the right way but this way worked for me.

Edit your secondary keyboard layout symbols language file in path:

/usr/share/X11/xkb/symbols/

Example: for Persian(Iran) language:

/usr/share/X11/xkb/symbols/ir

And delete all the following lines of code from the file:

include "level3(ralt_switch)"

You can use Replace(Ctrl+H) option in your editor.

reboot at the end.

Gunnar Hjalmarsson avatar
uz flag
With that, and if you didn't do anything more, you don't have access to 3rd and 4th level symbols on your Persian layout.
Score:0
uz flag

I'm on Ubuntu and not on Lubuntu. With Ubuntu I would use Tweaks and enable the following settings:

Switching to another layout

  • Check the "Alt + Shift" option (maybe you have already done the Lubuntu equivalent to that)

Key to choose the 3rd level

  • Check the "Right Alt never chooses 3rd level" option
  • Check the "Left Alt" option

The reason for the two latter is that the Persian keyboard layout you are using defaults to define Right Alt as the key to access 3rd and 4th level symbols. That's why you could switch from English to Persian using Right Alt+Right Shift but not back to English.

But with the above options, Left Alt is defined as the 3rd level key instead, and hence Right Alt+Right Shift always works for switching to next keyboard layout.

Hopefully you can find your way in the Lubuntu GUI to set those options.

Edit:

One way which may work on Lubuntu is to open the /etc/default/keyboard file for editing and set XKBOPTIONS there like this:

XKBOPTIONS="grp:alt_shift_toggle,lv3:ralt_alt,lv3:lalt_switch"

Then reboot and see if it makes a difference.

Sajad Speed avatar
in flag
Thank you very much for your answer, but I use LXQt Keyboard Layout and it does not have the options you mentioned. I also tried to install Tweaks, but it did not work. Do you not know the command or config file that I can enable these options?
Gunnar Hjalmarsson avatar
uz flag
@SajadMomeni: Well, I know the command line equivalent to using Tweaks. But if Tweaks doesn't work, the command line option would be slightly different.
Gunnar Hjalmarsson avatar
uz flag
@SajadMomeni: I edited my answer and added a variant which you may want to try.
Sajad Speed avatar
in flag
I edit /etc/default/keyboard file but now change keyboard layout just with Right Left + Right Shift but i want change layout with both Shift + Alt (Right or Left). Now my hotkey not working for example Alt+Ctrl+T just work in Right Alt and Ctrl and this is problem.
Sajad Speed avatar
in flag
I change XKOPTIONS to **grp:alt_shift_toggle,lv3:ralt_alt** and problem solved now i can change layout with both alt_shift But I can not change with rshift_ralt, I must first press ralt and then rshift to work. Can't I like the left to change anyway, not just when I first pressed ralt?
Gunnar Hjalmarsson avatar
uz flag
@SajadMomeni: I also noticed that latter behavior. Can't tell if/how it can be solved. But I'd also like to point out that you now have a new problem: You have no way to access 3rd and 4th level symbols when using your Persian layout. So you should really pick some key to choose the 3rd level.
Sajad Speed avatar
in flag
Thank you very much, but I solved the problem in a different way. I do not know if it is principled or not, but the answer is for me. I will post my answer below. Thanks again
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.