Skip to content

Fix navigation keys on higher layers not working#3007

Merged
hecrj merged 2 commits intoiced-rs:masterfrom
Seppel3210:master
Nov 29, 2025
Merged

Fix navigation keys on higher layers not working#3007
hecrj merged 2 commits intoiced-rs:masterfrom
Seppel3210:master

Conversation

@Seppel3210
Copy link
Contributor

@Seppel3210 Seppel3210 commented Jun 30, 2025

Some keyboard layouts have navigation keys in "unusual" positions on higher levels (e.g., Neo family layouts). These did not work at all, but this fixes them by not using key_without_modifiers() for Named(…) logical keys.

I also thought of implementing this by checking if key_without_modifiers() changes the std::mem::discriminant of the key (which would also be unexpected) and then you could return the logical key instead, but then you'd probably have to handle dead keys seperately, so I think doing this only for Named keys should be easier.

Fixes #2997.

@hecrj hecrj added this to the 0.14 milestone Nov 29, 2025
@hecrj hecrj added bug Something isn't working text widget fix labels Nov 29, 2025
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I think the proper fix is to use key without modifiers for key combinations (e.g. Ctrl+C) and the modified_key for single key bindings (e.g. motions).

Hope that works.

@hecrj hecrj enabled auto-merge November 29, 2025 08:18
@hecrj hecrj merged commit ec4b925 into iced-rs:master Nov 29, 2025
15 checks passed
@coroa
Copy link

coroa commented Jan 19, 2026

Even though this was merged navigation keys at least on Neo2 and Colemak are not working for instance in cosmic term: pop-os/cosmic-term#497 .

Can you describe what needs to be changed there?

Thank you

@edwloef
Copy link
Contributor

edwloef commented Jan 19, 2026

I believe pop-os hasn't rebased their iced fork onto a commit that includes this patch yet.

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

Labels

bug Something isn't working fix text widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Named Keys not working in widgets

4 participants