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

feat: make layout-independent shortcuts #147

Merged
merged 1 commit into from
Jan 11, 2025
Merged

feat: make layout-independent shortcuts #147

merged 1 commit into from
Jan 11, 2025

Conversation

JarKz
Copy link
Contributor

@JarKz JarKz commented Jan 7, 2025

Related issues

Closes #121
Should resolve #146

Changes

  • Added crate 'keycode' as dependency which helps us to use evdev keycodes.
  • Implemented evdev keycode matching as fallback for shortcuts.

As maintainer said that the application should focus only to linux, so this changes on linux should work as remains, even on X11 (my friend has tested, but I'll accepts more tests). To match key uses Key from gtk4 as primary and fallbacks to use keycode which on linux is evdev keycode. That's why I've used the 'keycode' crate which have a list of evdev keycodes. This should make the shortcuts layout-independent.

Is it ready to merge?

I should make attention to fallback word. Maybe it is not correct way to use independent-layouts as default. I've asked in issue, but not got any answers and at this time I had draft code. So I implemented and can make changes if need to use config property.

@gabm
Copy link
Owner

gabm commented Jan 11, 2025

I think we can go ahead with this like it is.. For current users i don't see a huge downside..

That being said, I can't estimate the consequences. If users start reporting bugs i am ready to revert this. Until then: let's go!

@gabm gabm merged commit ee4e117 into gabm:main Jan 11, 2025
3 checks passed
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.

Make shortcuts independent to layouts
2 participants