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

'caps:swapescape' not respected #200

Closed
JohnMertz opened this issue Sep 25, 2024 · 1 comment
Closed

'caps:swapescape' not respected #200

JohnMertz opened this issue Sep 25, 2024 · 1 comment

Comments

@JohnMertz
Copy link

I've used tofi for quite some time now and love it. However, I've just encountered an issue after experimenting with the xkb_option caps:swapescape. As the name suggests, this swaps the roles of the Escape and CapsLock keys and I have it configured in Sway with:

input * xkb_options "caps:swapescape"

After a day or so, I've found that the only problem I have with this is tofi. If I want to exit the dialog without making a selection, it requires that I still hit the Escape key, hitting CapsLock will not exit. However, Sway is still listening and so hit the Espace key also toggles the CapsLock state. I then have to press Escape again to restore the CapsLock state to what it was before running tofi.

Tofi does correctly interpret that I have the non-standard 'dvorak' layout set with:

input * xkb_variant "dvorak"

I suspect that this is related to issue #62, but I don't know enough about keycodes/keysyms to know for sure. I do see that I have to use 'Ctrl+J' as the optional escape in lieu of 'Ctrl+C'. That is, I need to use the physical 'C' key, which maps to 'J' for Dvorak. It does seem a bit odd to me that the keys are correctly interpretted as regular input (ie. at the prompt to narrow the list of available options in a menu context), but not for control characters (but, again, I don't know what I'm talking about).

As discussed in that other issue, allowing an option seems to possibly be the best option.

@JohnMertz
Copy link
Author

Bah! Sorry!

Another search and I found mention of the Escape key in the keysym_to_key function. A quick blame later and I found the physical-bindings=false option. With that set CapsLock dismisses tofi as expected.

Turns out that this is also mention in #109, which was mentioned in 62, but I didn't bother looking because that issue was still marked as open, so I just assumed it would not have answers.

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

No branches or pull requests

1 participant