Timeline for How do I get current keyboard layout?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 20, 2021 at 21:07 | comment | added | ali b |
@Tino It print those languages because either you (with command setxkbmap -layout us,de) or the system at the startup set it like so. you can put the command setxkbmap <default language> in the startup scripts like .xinitrc or .xprofile to fix it. Afterwards when you query for current keyboard layout, it'll show you one layout. Win+SPC does not work because SPC in German is different character from that in Eng. So when you switch German the combination won't work.So in this way, the best solution is to use a hotkey with non-printable characters like Alt-Esc or Alt-shift etc.
|
|
| Jan 19, 2021 at 11:43 | comment | added | Tino |
At my side setxkbmap -query | awk '/layout/ {print $2}' gives us,de,us. It does not return the current keyboard layout but gives the available keyboard layouts. And after setxkbmap us the Win+SPC no more toggles to German, so this approach has bad sideffects.
|
|
| Dec 26, 2020 at 21:57 | review | Late answers | |||
| Dec 26, 2020 at 22:43 | |||||
| Dec 26, 2020 at 21:37 | history | undeleted | ali b | ||
| Dec 26, 2020 at 21:36 | history | deleted | ali b | via Vote | |
| Dec 26, 2020 at 21:35 | history | answered | ali b | CC BY-SA 4.0 |