Terry J. Reedy added the comment: I am not trying to re-invent the wheel. I am trying to bring IDLE up to uniform standards. In particular, make all dialogs usable from the keyboard. The config dialog is the worst. See #27620, the master issue.
For a two button messagebox, I went back to 3.5.2, which still uses the commondialog box. It has the default button marked as such. <Return> always does the default action. <Escape> always cancels. <Tab> moves the focus, but does not affect the above. <Space> enters ' ' in text entry and 'clicks' buttons. So this is at least 'a' Windows standard, as well as 'a' Mac standard. The search dialogs act the same. The space behavior built-in to the TK widgets, at least on Windows. I presume this is a class binding. The dialogs have no platform specific code, so they are also the defacto IDLE standard. Serhiy, it is definitely a tk convention, and I presume more universal than that, that the 'default ring' always indicate what button/action is invoked by <Return>. If the default moved with the focus, the default ring should move also. I am not inclined to do that without a strong reason. The button default ring is controlled by the 'default' option" 'active' = visible, 'normal' = possible, 'disabled' = not possible. (From the tk docs. The NMT reference is useless here.) I will add "default='active'" for the Ok button. (Mark: "default=1", suggested on http://www.tkdocs.com/widgets/button.html, is a nasty bug. "_tkinter.TclError: bad default "1": must be normal, active, or disabled".) ---------- title: <Return> incorrectly works in IDLE Query dialogs -> Finish IDLE Query dialog appearance and behavior. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27621> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com