in reply to TK:Message box
#!/usr/bin/perl use Tk; $mw = MainWindow->new; $mw->bind("<Key>", [ sub { print "Key Press: $_[1] \n" } , Ev('K') ] + ); $mw->bind("<KeyRelease>", [ sub { print "Key Release: $_[1] \n" } , Ev +('K') ] ); MainLoop; [download]