I'm trying to configure my Ubuntu 18.04 to switch between Arabic and English using Right Shift and Right Alt. I've been working on it for several days and I've checked tons of solutions out there but none of them seems to be working with Arabic. I think that I've found the cause of the problem. When the keyboard is set to English, the Right Alt button's name in the keyboard layout form is Alt R which is pretty normal. But when I set it to Arabic, the name of Alt R is changed to be Level 3 Shift. Check the pictures to get me.

This picture for the English layout, the Alt R is a normal Alt R. enter image description here

But when it comes to Arabic, thats what happens. enter image description here

Alt-Left is the same in both layouts and that's why its working fine with me but I'm used to Alt-Right and I wanna get it to work, I've tried to remap Level 3 shift to be Alt R but I couldn't. How to make it works? Thanks in advance.

  • First: You realize that you need a Level 3 Shift key to be able to access third and forth level symbols on the Arabic layout, right? So you need to pick some other key for that purpose. Once you have done that, what you already did ought to work. – Gunnar Hjalmarsson Sep 12 '18 at 3:21
  • @GunnarHjalmarsson But we don't use Level3 Shift for that purpose. The normal shift is used and the Level3 Shift is not even working when it comes to accessing the extra symbols. And on Ubuntu 16.04 I was able to switch using Alt-R and Shift-R without any kind of problems and that's what im looking for but on Ubuntu 18.04 – Kordy Sep 12 '18 at 3:27
  • Yes, the Level3 modifier works with the Arabic layout unless you have disabled that functionality somehow. I submitted an answer which may or may not help. – Gunnar Hjalmarsson Sep 12 '18 at 16:05

The Arabic layout makes Right Alt the 3rd level modifier key automatically. However, the lv3:ralt_alt XKB option makes Right Alt to work as any Alt, so possibly this command will make a difference for you:

gsettings set org.gnome.desktop.input-sources xkb-options "['lv3:ralt_alt']"

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.