#!/usr/bin/perl -- use strict; use warnings; use Tk; my @t = ( -text => 'focus on me and press ?' ); my $mw = tkinit; $mw->Checkbutton( @t )->pack; $mw->Button( @t )->pack; $mw->Entry( @t )->pack; $mw->bind(q//,sub{warn "$Tk::widget ? " }); $mw->bind(qw/Tk::Entry /,sub{Tk->break}); MainLoop; __END__ MainWindow=HASH(0xf1eeec) ? at - line 10. MainWindow=HASH(0xf1eeec) ? at - line 10. MainWindow=HASH(0xf1eeec) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10. Tk::Button=HASH(0xf42c0c) ? at - line 10. Tk::Button=HASH(0xf42c0c) ? at - line 10. Tk::Button=HASH(0xf42c0c) ? at - line 10. Tk::Button=HASH(0xf42c0c) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10. Tk::Checkbutton=HASH(0xf55164) ? at - line 10.