-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key-remap
configuration to remap modifiers at the app-level
#5160
Comments
Just repeating myself: this is only tagged The design of the config does not preclude Linux support in the future. |
Hi, could you include this feature in 1.2.0 milestone? |
is this not the same as #4335? |
@00-kat #4335 is about using a modier key by itself to kick off an action (like double tapping ctrl to open a new terminal). This is about remapping the modifier keys themselves (e.g. making it so when I hit CTRL-C it behaves as if I'd hit CMD-C, and when I hit CMD-C it behaves as if I'd hit CTRL-C). #3493 talks about the motivation in detail but briefly: a lot of Mac users (especially ones who come from Windows or Linux) swap the CTRL and CMD keys in the OS, so that CTRL-C is copy and CTRL-S is save and everything works the way they're used to it working on other platforms. On other platforms, in a terminal though, CTRL-C is still "break", so you want CTRL and CMD swapped in all apps, except in your terminal program. The easiest way to do that is "swap them back" in the terminal. iterm2 makes this really easy, but ghostty sadly does not. |
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: