in reply to Re: Morse input from keyboardin thread Morse input from keyboard
$mw->Button(-text => 'Exit', -command => sub {$mw->destroy})->pack; [download]
no need for closures
-command => sub { $Tk::widget->toplevel->destroy } [download]
-command => 'exit' [download]