Here is the code sample:
use Tk;
my $main = new MainWindow;
my $f = $main->Frame(-width => 100, -height => 100)->pack;
$f->bind('<Key>' => [sub {print "Key: $_1\n";}, Ev('K')]);
MainLoop;
This one is supposed to echo the keys pressed "in the widget" to the console. Why doesn't it work?
Cheers, Phil
In reply to Key bindings for Tk::Frame? by pdsx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |