Custom keyboard layout, Super+Space won't switch
- Vous devez vous identifier ou créer un compte pour écrire des commentaires
I bought a ThinkPad X200 and installed Trisquel 7, planning on installing libreboot later. But I want to use a customized keyboard layout and I can't get it to work.
I've /usr/share/X11/xkb/symbols/us to my liking, removed /var/lib/xkb/*.xkm and run sudo service lightdm restart. Then I went to System Settings > Language Support and selected "Keyboard input method system: None" (IBus seems to be for chinese, I don't want to run systems I don't need). Then System Settings > Region & Language > Input Sources where I added my custom layout. If I click the keyboard-button to view the selected keyboard layout it is correct. Next to the input sources list it says "Shortcuts: Switch to next source: Super+Space". So I open gedit and start typing. It's the standard layout. I press windows+space. Still the standard layout.
So, how do I switch between keyboard layouts? And how do I set which keyboard layout is the default keyboard layout, to be used when the machine boots? Should the topmost keyboard layout in the list be used? Because that isn't working either.
Any help greatly appreciated :)
I use XFCE and simply use the "Keyboard Layout Handler" plugin which I added to my taskbar by clicking on "Add / Remove Panel Items". In the settings for this plugin I can specify the default layout and easily change layouts by simply clicking on the flag showing up in my taskbar. Which DE are you using?
I just downloaded the standard Trisquel. System Settings > Details says I'm using Gnome. I come from a Mac background and have been using Linux for servers (headless) so I'm not very familiar with Linux desktop stuff.
There is no Keyboard Layout Handler to choose when I right-click the bottom bar and pick "Add to panel...".
Well, actually it should work out of the box: https://help.gnome.org/users/gnome-help/stable/keyboard-layouts.html.en
Does this problem only occur if you use gedit? Do you have the new layout for other programs?
I use GNOME Shell (and GDM but I do not think it matters): it works out of the box.
I installed Trisquel Mini with LXDE instead. I'm able to switch between keyboard layouts using Keyboard Layout Handler. But then I addded my variant of the us keyboard layout using the method described in my first post and it won't show up in Keyboard Layout Handler. I can get it to load if I tell Keyboard Layout Handler to use the system layout and edit /etc/default/keyboard to use my layout. So the system can find it but it's not visible to Keyboard Layout Handler.
Why am I mucking about with this? I want to use a US layout as it's best suited for programming, but I'm in Sweden so I really need to be able to write ÅÄÖ. So I want a US layout with the ability to AltGr to ÅÄÖ on some buttons. This was quite easy to setup on my mac, but I'm really confused by the keyboard handling in Linux. There's xkb and input methods like xim and IBus and I can't understand how it fits together.
OK, I think I've come up with something that works.
- Fix my keyboard layout as described in my first post
- Leave Keyboard Layout Handler with "Keep system layouts"
- Create an executable file with the line 'setxkbmap -layout "us,se" -variant "myvariant," -option "grp:shifts_toggle"'
- In ~/.config/autostart create a file with the content:
[Desktop Entry]
Exec=/path/to/above/script
Type=Application
Now when I log in I have my US variant, and if I press both shift-keys it switches to a standard swedish keyboard layout. Awesome! :)
- Vous devez vous identifier ou créer un compte pour écrire des commentaires