in reply to How can I read keyboard "in the background"
#!/usr/bin/perl use Tk; my $mw = new Tk::MainWindow; my $btn = $mw->Button(-text => 'Hit Return')->pack(); # # Note that we *usually* bind to the main window, # not the button - it's a focus thing. # $mw->bind('<Return>', \&_on_rtn); MainLoop; exit(0); sub _on_rtn { $mw->messageBox(-message=>'Thanx for using the keyboard!'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How can I read keyboard "in the background"
by Foggy Bottoms (Monk) on Jun 10, 2003 at 15:34 UTC | |
by finni (Beadle) on Jun 10, 2003 at 18:16 UTC | |
by zentara (Cardinal) on Jun 11, 2003 at 14:09 UTC | |
by Foggy Bottoms (Monk) on Jun 12, 2003 at 09:19 UTC | |
by Mr. Muskrat (Canon) on Jun 10, 2003 at 15:54 UTC |