If you are willing to use Gtk2, you can easily make a dialog work the way you want. This will let you tab around to the buttons, and enter will then select the right button.
#!/usr/bin/perl use warnings; use strict; use Glib qw(TRUE FALSE); use Gtk2 '-init'; my $dialog = Gtk2::Dialog->new ('Confirmation Dialog', undef, 'modal', 'gtk-ok' => 'ok', # response ids may be one of the built-in + enums... '_Cancel' => 2, # or any positive integer. 'gtk-undo' => 'reject', 'gtk-save' => 'accept', 'gtk-cancel' => 'cancel', 'Do it' => 'ok', ); # put an hbox with a label and entry into the dialog's vbox area. my $hbox = Gtk2::HBox->new (FALSE, 6); $hbox->pack_start (Gtk2::Label->new ('Continue Real Transfer? '), TRUE +, TRUE, 0); $hbox->show_all; $dialog->vbox->pack_start ($hbox, TRUE, TRUE, 0); # Set which response is the default: $dialog->set_default_response ('ok'); # connect a signal to the dialog's response signal. $dialog->signal_connect (response => sub { print "@_\n"; # get our params shift; # we don't need the dialog my $response = shift; # the clicked button print "The user clicked: $response\n"; if ($response eq 'ok'){ Gtk2->main_quit; } if ($response eq 'cancel'){ return } #more if's and elsif's...... }); # show the dialog $dialog->show; Gtk2->main;

I'm not really a human, but I play one on earth Remember How Lucky You Are

In reply to Re: Dialog box Binding issue by zentara
in thread Dialog box Binding issue by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.