-
Notifications
You must be signed in to change notification settings - Fork 29
Protocol for requesting keyboard modifiers #30
Comments
I wonder if we could build a more general protocol. Can this be useful for other use-cases too? Also, do we want to only provide modifiers, or do we want to provide more info? |
There could be other use cases but I am unable to think of any.
More info as in, other events or more info along with the modifiers? |
Would something like this work? harishkrupo@0966640 |
I don't actually understand what's supposed to happen after the client calls get_keyboard_modifiers with need_events = 1. |
@harishkrupo Wayland protocols aren't RPC, they're asynchronous. You don't "call" methods, you send requests. Requests don't "return" values, instead the compositor can send events to clients. |
I wonder if it's worth it to have such a specific protocol. |
@emersion This seems a nice addition to have (IMHO). But I'm not sure, can't the app somehow get this from the wl_keyboard? |
If it's focused, yes. It doesn't work if it's a statusbar though. |
@emersion @SirCmpwn @ammen99 |
I'd rather not change |
Sorry, I didn't understand. Could you please explain? |
@harishkrupo What you do is reusing the |
@ammen99 Thanks. got it :) |
okay, updated it. harishkrupo@a868f4e |
This doesn't work when there are multiple seats (ie. multiple Instead we'd need a request to create a Note: I'm still not sure this protocol is a good idea. |
Makes sense.
Any other alternative way to get layout details? |
Another alternative would be to have the sway IPC do this. It's probably not a better solution considering that it's sway-specific. Has someone else thoughts about that? |
@emersion I have updated based on your comments |
The structure of the protocol looks good. Only missing thing is a |
Okay, will add that. |
@emersion I have added the destructor request. harishkrupo@d9c82c1 |
Sure. @ddevault Thoughts? |
opened PR #31 |
wlr-protocols has migrated to gitlab.freedesktop.org. This issue has been moved to: https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/issues/30 |
The idea is to use the change in modifiers information to be notified about the change in keyboard layout.
This is useful for applications like status bar to show the current keyboard layout. Please see swaywm/wlroots#1360 for more information.
The text was updated successfully, but these errors were encountered: