abubacker has asked for the wisdom of the Perl Monks concerning the following question:

Currently I am working with the perl Tk
In that I want to disable the keyboad inputs
I will receive inputs from the mouse only
please help me out

Replies are listed 'Best First'.
Re: Disable the keyboard
by zentara (Cardinal) on Dec 29, 2009 at 12:52 UTC
    #!/usr/bin/perl # Global grab example use warnings; use strict; use Tk; my $mw=MainWindow->new(-title=>'Global grab window'); $mw -> Button ( -text=>"Action", -command=>sub { print "Magic!\n" } ) -> pack(-anchor=>'nw', -side=>'top'); $mw -> Button ( -text=>"Exit", -command=>sub { exit } ) -> pack(-anchor=>'nw', -side=>'top'); $mw->geometry("200x200+200+200"); $mw->after(500,sub {$mw->grabGlobal}); $mw->focusForce; MainLoop;

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku