2

I'm trying to set the windows key as the meta modifier on Ubuntu 17.10, so that I can use OSX style keyboard layout on the IntelliJ editor.

When ever I go to the gnome-tweak-tool application, in the "Keyboard & Mouse" > "Additional Layout Options" > "Alt/Win key behavior", and select "Meta is mapped to Win keys", I should expect that I can now create a shortcut using the Win key + a letter and IntelliJ would identify it as Meta + the letter.

But no matter the option I select in the "Alt/Win key behavior" menu, it detects the input as the Win key as "Super".

How can I map the Win Key to Meta?

It seems that I have the correct menu option, it's just not working as intended.

The output for the following commands:

gsettings get org.gnome.desktop.input-sources sources 
[('xkb', 'us+dvorak')]
gsettings get org.gnome.desktop.input-sources xkb-options 
['altwin:meta_win']

Edit:

After failing around for a while I have given up on 17.10 and reinstalled 17.04.

Works fine on 17.04

  • You may want to try to include the line XKBOPTIONS=altwin:meta_win in the /etc/default/keyboard file (and reboot). – Gunnar Hjalmarsson Jan 26 '18 at 1:39
  • Hey @GunnarHjalmarsson, thanks for the tip. I now have this as my config: XKBLAYOUT=us XKBMODEL=pc105 XKBVARIANT=dvorak XKBOPTIONS=altwin:meta_win BACKSPACE=guess One thing I did notice, as I was playing around, was that this was only seeming to apply during login, and once my user was logged in, the changes would be removed. I found this because I would remove the dvorak variant, and that would only apply while I was logging into my account after reboot, once I was logged in it would go from QWERTY back to dvorak again. – Staylward Jan 26 '18 at 3:27
  • The settings in /etc/default/keyboard are system wide. They are not "removed" at login, by may be overridden by settings you made for the specific user (e.g. in Settings or Tweaks). Did it help for the Win -> Meta mapping? – Gunnar Hjalmarsson Jan 26 '18 at 3:46
  • No it didn't help yet. But I'll try and have a look through Settings or Tweaks to see if there is something that I have set at a user level that is overriding what I want. – Staylward Jan 26 '18 at 3:47
  • Please show us what these two commands output: 1. gsettings get org.gnome.desktop.input-sources sources 2. gsettings get org.gnome.desktop.input-sources xkb-options (But you'd better show us by editing your question, and not in a comment.) – Gunnar Hjalmarsson Jan 26 '18 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.