Re: GTK3 -- query mouse pointer coordinates for keyboard input?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-01-17 at 16:38 -0500, Jasper St. Pierre wrote:
> If you have a keyboard device, you can use
> gdk_device_get_associated_device() to return the paired mouse device.

Fine -- but currently I have only a keyboard event as described in

https://developer.gnome.org/gdk3/stable/gdk3-Event-Structures.html#GdkEventKey

There is no reference to a device. For mouse buttons I have

https://developer.gnome.org/gdk3/stable/gdk3-Event-Structures.html#GdkEventButton

which has a device field. That is fine.

After much googling I found GdkDisplay

https://developer.gnome.org/gdk/unstable/GdkDisplay.html

which may help finding a pointing device, but that seems to be much
complicated overhead. 

You may say that mouse and keyboard input is generally fully unrelated.
In theory  that may be true, but for CAD applications we really want
keyboard input related to current mouse pointer position, i.e. delete
object under mouse cursor when 'X' or 'DEL' key is pressed. That is much
faster than context menu or button clicks. And professionals prefer
working fast.

Best regards,

Stefan Salewski


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux