Skip to content

Fix caps:escape_shifted_capslock behavior#9971

Open
zoriya wants to merge 1 commit intokovidgoyal:masterfrom
zoriya:fix/caps
Open

Fix caps:escape_shifted_capslock behavior#9971
zoriya wants to merge 1 commit intokovidgoyal:masterfrom
zoriya:fix/caps

Conversation

@zoriya
Copy link
Copy Markdown

@zoriya zoriya commented May 5, 2026

Fix #9861

Handle cases where a shifted key produces a different fuction, like the caps:escape_shifted_capslock behavior of the previous issue

@kovidgoyal
Copy link
Copy Markdown
Owner

Your patch only changes the pres/repeat behavior, what about release behavior? Indeed, the whole concept of mapping shift+capslock to esc is a bit bonkers. When is an esc release event generated? wen you release capslock? or when you release shift? What happens if you release caps lock first or shift first? What happens if you release capslock but not shit and then press some other key like A?

Also I dont understand the logic, from what I can tell you want xkb_sym to not be the clean_sym when sym and clean_sym are different and sym is a functional key? Why? Wouldnt you need to check if clean_sym is a functional key as well? And what about if you press ctrl+shift+capslock? What's supposed to happen then?

@zoriya
Copy link
Copy Markdown
Author

zoriya commented May 5, 2026

When is an esc release event generated

An esc press event is triggered on capslocks without the shift, similarly the release event is triggered if capslocks is released while shift is pressed.

Shift is registred as a normal modifier, if you press +shift -> +capslock >- -capslock -> +a -> -a -> -shift you will have this exact sequence of event (so capslock -> A)

I did miss the release event mapping, just pushed a fix.

Also I dont understand the logic, from what I can tell you want xkb_sym to not be the clean_sym when sym and clean_sym are different and sym is a functional key? Why? Wouldnt you need to check if clean_sym is a functional key as well? And what about if you press ctrl+shift+capslock? What's supposed to happen then?

My reasoning was that if the modified value was a function we want to apply that instead of the clean value ; apart with things like caps:escape_shifted_capslock there should not be ways to have the modified key being a function different from the clean one (ex tab keeps the same key code shifted or not)

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.

xkb caps:escape_shifted_capslock option always types escape

2 participants