This is a bug in
Tk::DialogBox, you should report it
here.
To test run
widget, under "Common Dialogs" click on "1. Message boxes.", when "messageBox Demo" pops up,
choose Type OkCancel, then click "Message Box" button, and perform the test (tab over to cancel button, hit enter).
Default is "Tk::DialogBox", and selecting Cancel and hitting enter doesn't work (falsely returns that you selected Ok). If you click radio button to switch to
Tk::MsgBox , and perform test again, you will get Cancel as expected.