1

I'd like to be able to use the Windows/Super key on my keyboard as the Meta key. I'm doing this because the standard Gnome bindings are not all tweakable. You can change a lot of them but Gnome seems to insist on Super being the application launcher and to click/drag windows. This seems to interfere with some applications ability to use the Super key as a modifier for other keys/mouse clicks.

I'm thoroughly stumped by this. I've tried the following:

  • using gnome-tweaks to swap the alt/win keys. This gets me halfway there, but there's no combination of options that allow both settings to exist for some reason
  • using xkbcomp to remap the alt key to meta and the win key to alt. This seems to work in applications (I can clearly see the keycode swap working in xev), but Gnome refuses to honor this change for reasons that are wholly unclear to me. It continues to treat the Alt key as the Alt key and the Windows key as the Windows key.

Is this possible to do?

5
  • You can disable Super launching the overview, and Supter for dragging windows. However, you asked something different here. We call this an XY problem. Asking about problem Y, which you think will solve your real problem X instead of directly asking about problem X.
    – vanadium
    Nov 9, 2022 at 7:03
  • How do I disable those things? I can't find anything in the Gnome settings that disables either functionality, but this is a pretty arcane part of the desktop. I also do not know that that the super key will be well-behaved after I do those things at this point, but I'd be happy to try.
    – monitorjbl
    Nov 9, 2022 at 15:45
  • Feel free to open a question about this.
    – vanadium
    Nov 20, 2022 at 12:15
  • I did here: askubuntu.com/questions/1441271/…. I honestly don't think it's going to be sufficient for what I want to do, but I'm happy to try it if you know how to do it.
    – monitorjbl
    Nov 20, 2022 at 21:11
  • not sure if it works in Ubuntu 22.04. as it use Wayland, but in 20.04 with Xorg, you can modify /usr/share/X11/xkb/symbols/ .
    – Mlocik97
    Nov 24, 2022 at 19:51

2 Answers 2

1

My first thought was just re-mapping the key, for example if you use xev in terminal then press a key it tells you its keycode i.e. left windows is 133 and right windows key is 134. But I do not know what the keycode is for a meta key.

It seems most modern keyboard layouts do not support META and instead use AltGr on some international layouts, AltGr can also be simulated by Ctrl+Alt or rightALT depending on what documentation you read

You may be able to add a keyboard layout to your system that supports it and use the keyboard shortcut for the system to switch between layouts.

0

Try this - install an, input remapper (simple, yet powerful) there is right and left meta key to remap super left or right https://github.com/sezanzeb/input-remapper

https://raw.githubusercontent.com/sezanzeb/input-remapper/main/readme/screenshot.png

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.