-
Notifications
You must be signed in to change notification settings - Fork 15
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
Expose wlr_keyboard_notify_modifiers
function.
#123
Expose wlr_keyboard_notify_modifiers
function.
#123
Conversation
This change seems fine to me. Is there any way that we can wrap this in some Python API for qtile to be able to use it? That would definitely be preferred to just exposing it directly in the ffi object. |
Like adding a method to the Keyboard class ? |
Compositors now have to do something like this : from wlroots.wlr_types.keyboard import ModifiersMask
mask = ModifiersMask(self.keyboard)
if numlock:
mask.add("Mod2")
if capslock:
mask.add("Lock")
self.keyboard.notify_modifiers(mask) |
Maybe pass the keyboard to |
I was just about to start working on exposing this functionality to pywlroots in order to make it happen in qtile, this is awesome! Thank you, @Sydiepus. (btw, I'm just random passerby, no affiliation with qtile or pywlroots) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Sway uses this function to configure the initial state of numlock/capslock.
Tested with Qtile.
Compositors would implement something similar to sway, like this to enable Numlock:
the Capslock is named
Lock
.My implementation is definitely not the best but it works.
I'm not sure if there's a way to do the same thing using pywlroots instead of copying sway's implementation.