Skip to content

Conversation

@w9nz
Copy link

@w9nz w9nz commented Nov 2, 2025

Fix: #8809 (reply in thread)

If the physical key is non-remappable but is set to act as a remappable key in xkb layout, in the actual behavior, the key is dismissed by Ghostty (which is not the behavior in other apps).

With this modification, the key will be remapped if it is a remappable physical key or if the key it is remapped to is remappable.

This way, we respect the most possible the rules given by xkb, but we keep the non-remappable keys safe (cf previous bugs).

@w9nz w9nz requested a review from a team as a code owner November 2, 2025 13:20
@pluiedev
Copy link
Member

pluiedev commented Nov 2, 2025

Does this solve all the bugs regarding XKB input? (e.g. Ctrl+ц behaving the same as Ctrl+C in a Russian layout, caps:swapescape works, etc.) If it does, then I'm happy to merge this, but we need to be very careful to not break existing workflows again.

@w9nz
Copy link
Author

w9nz commented Nov 2, 2025

It should not change the actual behavior. If you want to remap a letter to another letter, it will still be not allowed.

Before this fix, we only allow non-letter keys to be remapped. With this, we also add the letters keys that wants to act as a remappable key as allowed remappable keys.

Let me make more tests with Russian keyboard by reviewing the previous tickets. I'll keep you updated.

Thank you for the quick reply!

@w9nz
Copy link
Author

w9nz commented Nov 2, 2025

Hello,

I tested a russian keyboard, with these setups:

- ctrl:nocaps, altwin:swap_lalt_lwin
- caps:swapescape

ctrl-c , escape, return,.. is working all the time.

I also tried to replicate some behavior before/after and I got the same results in both current and this version.

Can you see other tests I could run ?

Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants