|There's more than one way to do things|
Gtk2-Perl: How to catch shift-clicking of a button?by Bloehdian (Sexton)
|on Nov 12, 2012 at 18:28 UTC||Need Help??|
Bloehdian has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying to detect whether the shift key is pressed when a button is clicked. Since I did not find a complete prescription for what I am trying to do in one of the documents on Gtk2 I have at hand I "collected" information from several different sources. Therefore I am not sure at all whether the approach distilled into the test program is correct.
Currently, even execution of this prog fails due to the following compilation error:
Bareword "GDK_SHIFT_MASK" not allowed while "strict subs" in use
This is allegeable since this constant is not exported by any of the modules of the toolkit (i found it in the description of the C-API of Gtk).
So, my questions are as follows:
1. Apart from the obviously wrong bit mask: is my approach to the problem solution correct?
2. Which bit mask do I have to use to detect whether the the shift key was pressed simultaneously with the mouse click?
OS: Red Hat 4.1.2-46 (Kernel: 2.6.18-164.el5)
The test program: