use Tk; my $top = MainWindow->new(); $top->bind("<KeyPress>" => [\&click,Ev('K')]); sub click { my ($window, $button) = @_; if ($button eq 'Control_L') { # ignore left Ctrl print "I don't do anything"; } else { print $button; } } MainLoop();
In reply to Re: Conditional check on Tk bind?
by mawe
in thread Conditional check on Tk bind?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |