Accelerator key event and right shift/alt/ctrl/windows modifiers in Wayland

I want to detect specific keypresses, but being able to discern between left and right modifiers. I mean: to be able to know if the user pressed Key + “left shift” vs Key + “right shift”. I know that the keyboard sends different keycodes, and Gdk.EventKey supports up to 8 modifiers (which seems consistent with Shift/Ctrl/Alt/Windows and Left/Right), but when I receive the key event, there seems to be only “shift/ctrl/alt/windows” modifiers, without “right/left”. Is it possible to do that?

Some extra info: although I receive Gdk.Key.XXX values with differences between left and right modifiers, the “Gtk.accelerator_name” function doesn’t discern between left and right modifiers.

Ok, since Gnome Shell manages the hotkeys without discerning between left and right modifiers, I think that it’s better to avoid discerning them in my program. Closing this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.