key-remap
configuration to remap modifiers at the app-level
#5160
Labels
key-remap
configuration to remap modifiers at the app-level
#5160
Discussion: #3493 (comment)
Introduce a new configuration
key-remap
which can be used to remap keys from one to another within the scope of Ghostty. Example:This would act the same as if a user went to their OS config and remapped these keys. If a sided-modifier isn't specified, then left swaps with left, right swaps with right.
Notes:
ctrl
becomessuper
butsuper
does not becomectrl
.ctrl=super
and thenalt=ctrl
, thenalt != super
. Alt would be mapped to control.keybind
in any way. In the same waykeybind
is already roughly unaware of keyboard layouts (i.e.cmd+f
works withf
as specified by your layout), the same will happen in this case (i.e.cmd+f
will trigger with a physical "ctrl" key if you remappedcmd=ctrl
).Additional scope limiting
For the initial creation of this feature, we should limit scope in the following ways:
There is a much more urgent need and request for this on macOS (see #3493) and macOS APIs give us a much easier way to do this by easily letting us insert event filters in the path. My attempts at doing this with GTK have thus far failed, but I think it's possible.
In the future, we can likely lift both of these limitations.
The text was updated successfully, but these errors were encountered: