X11 has no such mechanism to give that to you. Key presses and
releases are sent directly to the application that has focus, not to
the window manager.

Main.wm.addKeybinding allows you to register a "grab", which is a way
of punching through this model, but unfortunately, grab semantics are
hard to make work for the release case. So we don't properly trigger
keybindings for key release.

On Thu, Apr 23, 2015 at 4:40 PM, Vjekoslav Brajkovic
<vj...@brajkovic.org> wrote:
> Hi!
>
> I am writing an extension and would like to get notified when a
> key-*release*-event has occurred regardless of which actor has key focus and
> without changing it.
>
> From what I understand, the indented way of doing this would be by
> registering a callback with Main.wm.addKeybinding() and specifying a desired
> KeyHandlerFunc. The problem is that key release/press information seems to
> be missing when the handler gets invoked -- the  ClutterKeyEvent parameter
> is missing and instead of it I get Meta.KeyBinding.
>
> I have also tried doing global.stage.connect('key-release-event', ...), but
> the stage does not receive any signals unless I change the key focus to an
> actor like overview, which I assume propagates its signals.
>
> Does anyone have any ideas or suggestions?
>
> Thanks!
> Vjeko
>
>
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-shell-list



-- 
  Jasper
_______________________________________________
gnome-shell-list mailing list
gnome-shell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list

Reply via email to