Skip to content
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

input: Add "AltGr" alias for ISO level3 shift modifier #264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Trundle
Copy link
Contributor

@Trundle Trundle commented Mar 24, 2024

It's what's written on keyboards, so perhaps a bit more accessible to users.

It's what's written on keyboards, so perhaps a bit more accessible to
users.
@YaLTeR
Copy link
Owner

YaLTeR commented Mar 25, 2024

cc @sodiboo who had the original concern.

So, I'm not sure this is such a good idea, because you need a specific xkb option (lv3:ralt_switch I think), or I guess a specific layout, to make AltGr actually emit the level 3 modifier. By default (on us with no special options) it emits a right alt, which does not trigger the level 3 modifier. (Compared to Win/Super, which sends that key by default.) So I think it would only be confusing to make AltGr an alias here.

Unless of course it is established practice in compositors to accept the AltGr alias for this.

@Trundle
Copy link
Contributor Author

Trundle commented Mar 25, 2024

The key is alt right on us layouts, but the key is also labeled Alt and not AltGr on US keyboards, isn't it? My non-scientific quick image search found keyboards with Alt and AltGr though 🙈

As another data point, the de layout maps AltGr to ISO Level3 Shift.

Re other compositors: In my limited experience, it's Mod5-ish everywhere

@kchibisov
Copy link
Contributor

Mine AltGr was always a regular Alt on US layout, yes it's called AltGr on keyboard, but it's just alt. And when you compose it's a Compose key, not AltGr, so whether it's ISO level3 shift is a layout dependant, I guess.

Keep in mind that there's also a level 5 shift.

@sodiboo
Copy link
Contributor

sodiboo commented Mar 25, 2024

because you need a specific xkb option (lv3:ralt_switch I think), or I guess a specific layout, to make AltGr actually emit the level 3 modifier

I don't think the "layout" needs to be as specific as you think -- i've used the norwegian layout my whole life, that's what is physically printed on my keyboards whenever possible (really "nordic" usually) and the only option i ever set for xkb is layout "no"; for me, on both my computers, this will lead to the AltGr key emitting the ISO_Level3_Shift keysym and my other alt key emitting the Alt_L keysym -- no special options here!

As far as i can tell by looking at a picture of a US layout, emitting Alt_R is correct there because those keys don't say AltGr, they say just Alt. so given that the configured keyboard layout matches the physical layout, i don't think there are any layouts where (with no special options) AltGr emits Alt_R or right alt emits ISO_Level3_Shift

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.

None yet

4 participants