linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.57k stars 745 forks source link

Keyboard layout gets stuck when using Super + Space shortcut to change the layout to Persian #10505

Open amrear opened 2 years ago

amrear commented 2 years ago
 * Cinnamon 5
 * Mint 20.2

The keyboard shortcut Super + Space works fine for all of the languages except Persian. It gets stuck in Persian and the Super + Space key combination doesn't work anymore. Other combinations like Alt + Shift work just fine if enabled.

I originally asked this question here and it seems that the problem is from the DE.

hydroEng commented 2 years ago

I have had the same problem, this shortcut doesn't work for me when I add Syriac to my language list.

ahonorat commented 2 years ago

Hello

I have the same problem with English (US) and French (alternate version) keyboards. Switching from English to French with Win + Space works well but nothing happens when trying to switch from French to English.

Using Cinnamon 4.4 on Ubuntu 20.04.

mhdolatabadi commented 2 years ago

Hi I have the same problem with persian. All of them works except the win + space!

fuxinko commented 2 years ago

Hi, Slovak layout also gets stuck.

soul86 commented 2 years ago

hi , i've got the same problem with persian...

MehradN commented 2 years ago

Hey, it's been a long time and they still haven't fixed it, so I found a solution for this problem until they eventually patch the bug: (Thanks to sonrad10 for finding a solution to set custom shortcuts for changing layouts that helped me find this solution)

  1. Install xkb-switch:
    • sudo apt install libxkbfile-dev cmake g++ git
    • git clone https://github.com/grwlf/xkb-switch xkb-switch-master
    • cd xkb-switch-master/
    • mkdir build && cd build
    • cmake ..
    • make
    • sudo make install
    • sudo ldconfig (I don't understand what this is for but in sonrad10's answer they said it will update the program cache)
    • Now by running xkb-switch -n in the terminal you should switch to next keyboard layout
  2. Disable the system's win+space keyboard shortcut: (if it's enabled)
    • Go to System Settings > Keyboard > Layouts and click on Options...
    • Under Switching to another layout disable Win+Space
  3. Adding our own not buggy shortcut:
    • Go to System Settings > Keyboard > Shortcuts and click on Add custom shortcut
    • Name it Change Language and set the command to xkb-switch -nthen click on Add
    • Under Keyboard bindings double click on the first unassigned
    • Enter your shortcut (Here it is Super+Space (Win+Space))

And it should be working now. Sadly I couldn't figure out a way to go a layout back using xkb-switch without knowing how many layouts are selected in the settings, so I couldn't figure out a way to add the shift+win+space shortcut back, but if you are using only 2 or 3 layouts it shouldn't be a big problem.

Kylejustknows commented 2 years ago
  1. Disable the system's win+space keyboard shortcut: (if it's enabled)

    Go to System Settings > Keyboard > Layouts and click on Options... Under Switching to another layout disable Win+Space

This above basically fixes all the "super+space" issues showing everywhere on the internet regarding Linux Mint.

"super+space" is a very common hotkey set for many users, and shouldn't be systemly assigned for "layout change"

BTW, too many global hotkeys basically killed Linux for pro gamers. When I am on Starcraft II, I use alt/ctrl/shift + nearly all the Fn all the numbers all the letters, for complex unit controls.

On Windows, the game temporarily overwrites the system hotkeys. On Linux....it is a painful experience.