helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.39k stars 2.47k forks source link

Alt-` keys on gnome linux #4850

Closed kynrai closed 1 year ago

kynrai commented 1 year ago

I have been having issues trying to use the Alt modifier for actions like Alt-` In gnome, that is the key combo for switching window instances. This overrides all windows open in gnome.

I understand this is not a helix issue but it affects the use of helix on arguably one of the most commonly distributed linux DE.

Is there any known workaround for this, ive tried various terminal emulators on a clean install of gnome 42, same issue.

archseer commented 1 year ago

Are you also using gnome terminal?

archseer commented 1 year ago

One of the first results on google for "alt key terminal gnome" https://askubuntu.com/questions/30224/how-to-disable-the-alt-hotkey-behavior-on-gnome-terminal

Ordoviz commented 1 year ago

This issue isn't related to Gnome Terminal. The alt+` key combination is bound in gnome-shell to switch windows; in Helix it is bound to switch_to_uppercase. A solution would to change Helix's default keymap to match Kakoune's:

[keys.normal]
"`" = "switch_to_lowercase"
"~" = "switch_to_uppercase"
"A-`" = "switch_case"

With this mapping, Gnome users don't have access to switch_case, but this isn't a big deal since switch_to_lowercase and witch_to_uppercase can be used to emulate it.

lesleyrs commented 1 year ago

@archseer https://askubuntu.com/questions/1077439/ubuntu-18-04-is-there-a-way-to-disable-the-alt%C2%BDthe-button-right-above-tab-s

This fixes it, just tested on fedora.

kynrai commented 1 year ago

One of the first results on google for "alt key terminal gnome" https://askubuntu.com/questions/30224/how-to-disable-the-alt-hotkey-behavior-on-gnome-terminal

Saw that when i googled and as shown by the comments the info does not work, I ended up using @lesleyrs tip, turns out gnome has many hotkeys set for the same actions, notable Super+as well as Alt+ so disabling all the alt bindings works

Thanks for the help everyone!