rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

Mac - Change Right Alt/Option (AltGr) to Left Alt/Option #853

Open Woorkier opened 4 months ago

Woorkier commented 4 months ago

Hi Guys,

Maybe i am too dumb to find or did not understood very well, but is there a way to change the right Alt/Option key for the left Alt/Option key, in order to use characters like ê é ñ, as it is on a macbook? I'm running manjaro on MBP and very used to the left option key instead of the right one.

Thanks.

RedBearAK commented 4 months ago

@Woorkier

Hi, I'm not the Kinto dev, but I have contributed a few things to Kinto and tried to look into this in the past. Here's what I understand.

The special characters can come from the keyboard itself if you choose one of the "Macintosh" layout variants. But these layout variants, as far as I can tell, rely on treating the right-hand Alt key as Alt_Gr. So in Kinto there is an option to stop modmapping the keys on the right side of the Space bar so that these special characters and ISO level 3 characters on international layouts can be accessible.

When I tried just modmapping the RIGHT_ALT key code onto the left Alt key to make these characters work from the left side also, I couldn't get that to work. That functionality seems to operate on a lower level of the input system.

What I did in my own variant of Kinto is implement the macOS special characters for two different US layouts (standard US and the ABC Extended layout). But in order to do this, my variant of Kinto had to switch to a different keymapper utility. If you don't naturally use a US keyboard layout, the special characters will be in the wrong places, or the wrong characters.

But if you do use a US keyboard layout, this implementation of the special characters inside the keymapper config file does allow usage of both keys in the physical Option/Alt position, in pretty much the same way as you would on macOS while using an Apple keyboard.

Another limitation is that it requires ibus to be the input manager, or the Unicode keyboard shortcut won't work except in GTK apps. This is the default in GNOME and maybe Xfce and other GTK-based desktops, and can be configured to be the default in KDE desktops and others.

If you want to try this Kinto alternative, you'll need to first stop Kinto and disable the auto-start option, so that it doesn't interfere. Then you'd install Toshy from this repo:

https://github.com/RedBearAK/toshy

Be sure to submit any issues to that repo, not here in the Kinto repo.