Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Gtk2-Perl: How to catch shift-clicking of a button?

by Anonymous Monk
on Nov 13, 2012 at 09:45 UTC ( #1003577=note: print w/ replies, xml ) Need Help??


in reply to Re: Gtk2-Perl: How to catch shift-clicking of a button?
in thread Gtk2-Perl: How to catch shift-clicking of a button?

Nope, the OP's approach is correct, just needs to fix the typos :) 90% of the way there.

Has to find what exports GDK_SHIFT_MASK.

Has to use  Gtk2->get_current_event because the callback doesn't get an event object

update: after some basic debugging

I figured it out, examples in Glib, Glib::Flags
my $state = Gtk2->get_current_event->get_state ; exit warn "How dare you shift" if $state * "shift-mask";


Comment on Re^2: Gtk2-Perl: How to catch shift-clicking of a button?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2015-07-06 03:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls