This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add number pad enter bind to TK's simpleDialog
Type: enhancement Stage: resolved
Components: Tkinter Versions: Python 3.11
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Electro707, gvanrossum, rmast, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2021-08-18 03:08 by rmast, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27498 closed rmast, 2021-08-18 03:08
Messages (6)
msg399816 - (view) Author: Ryan Mast (nightlark) (rmast) * Date: 2021-08-18 03:08
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.
msg399817 - (view) Author: Ryan Mast (nightlark) (rmast) * Date: 2021-08-18 03:12
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 `tkinter` should be added to the Nosy List?
msg399844 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-08-18 13:55
It’s fine. We now need the PR author to sign the CLA.
msg399849 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-08-18 15:14
Sorry, CLA is signed, but I'd like Terry Reedy to have a peek.
msg399879 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-08-19 00:14
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.
msg399916 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-19 13:22
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.
History
Date User Action Args
2022-04-11 14:59:48adminsetgithub: 89105
2021-08-19 16:50:58terry.reedysetstatus: open -> closed
resolution: rejected
stage: resolved
2021-08-19 13:22:53serhiy.storchakasetmessages: + msg399916
2021-08-19 00:14:18terry.reedysetnosy: - gpolo
type: behavior -> enhancement
messages: + msg399879
2021-08-18 15:14:35gvanrossumsetnosy: + terry.reedy
messages: + msg399849
2021-08-18 13:55:11gvanrossumsetnosy: + gvanrossum
messages: + msg399844
2021-08-18 13:53:28Electro707setnosy: + Electro707
2021-08-18 03:12:53rmastsetnosy: + gpolo, serhiy.storchaka
messages: + msg399817
2021-08-18 03:08:11rmastcreate