You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add number pad enter bind to TK's simpleDialog #89105
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-08-19.16:50:58.475>created_at=<Date2021-08-18.03:08:11.931>labels= ['type-feature', 'expert-tkinter', '3.11']
title="Add number pad enter bind to TK's simpleDialog"updated_at=<Date2021-08-19.16:50:58.474>user='https://github.com/nightlark'
Tk the number pad enter and main enter keys separately. The number pad enter button should be bound to self.ok in simpleDialog's Dialog class so that both enter buttons have the same behavior.
A PR for this change has been submitted on GitHub by Electro707.
In my testing on Windows today, Ryan is correct in saying (on the PR) that kp return key normally acts is same as normal return key. True regardless of Numlock. This is *also true*, at least on Windows, of instances of SimpleDialog, Dialog, and _QueryDialog. I tested _QueryDialog via IDLE's use of askinteger. I believe the patch has no effect on Windows.
I have the impression that the Windows behavior in not standard on *nix, where tcl/tk was first implemented. I would not change behavior on *nix with Serhiy's okay, and I would not expect it.
IDLE adds KP_Enter bindings in a couple of its own dialogs with defaults. I don't remember if I inherited these, but I believe that there was a pre-existing policy of trying to make IDLE acts the same across systems, which I have adopted also. But a *nix-only tkinter app should not have Windows behavior imposed on it.
Tk does not bind KP_Enter in standard TK dialogs. I do not think we should introduce additional discrepancy between dialogs implemented in Tk and Python.
Please file a feature request for Tk. If they add a binding for KP_Enter we will follow them.
Activity
nightlark commentedon Aug 18, 2021
Tk the number pad enter and main enter keys separately. The number pad enter button should be bound to
self.okin simpleDialog'sDialogclass so that both enter buttons have the same behavior.A PR for this change has been submitted on GitHub by Electro707.
nightlark commentedon Aug 18, 2021
I'm new to this system, if I'm understanding https://devguide.python.org/triaging/#nosy-list then it looks like the people listed for
tkintershould be added to the Nosy List?gvanrossum commentedon Aug 18, 2021
It’s fine. We now need the PR author to sign the CLA.
gvanrossum commentedon Aug 18, 2021
Sorry, CLA is signed, but I'd like Terry Reedy to have a peek.
terryjreedy commentedon Aug 19, 2021
This proposal is not a bug fix.
In my testing on Windows today, Ryan is correct in saying (on the PR) that kp return key normally acts is same as normal return key. True regardless of Numlock. This is *also true*, at least on Windows, of instances of SimpleDialog, Dialog, and _QueryDialog. I tested _QueryDialog via IDLE's use of askinteger. I believe the patch has no effect on Windows.
I have the impression that the Windows behavior in not standard on *nix, where tcl/tk was first implemented. I would not change behavior on *nix with Serhiy's okay, and I would not expect it.
IDLE adds KP_Enter bindings in a couple of its own dialogs with defaults. I don't remember if I inherited these, but I believe that there was a pre-existing policy of trying to make IDLE acts the same across systems, which I have adopted also. But a *nix-only tkinter app should not have Windows behavior imposed on it.
I cannot test on my no-numberpad Macbook Air.
serhiy-storchaka commentedon Aug 19, 2021
Tk does not bind KP_Enter in standard TK dialogs. I do not think we should introduce additional discrepancy between dialogs implemented in Tk and Python.
Please file a feature request for Tk. If they add a binding for KP_Enter we will follow them.