New GitHub issue #108399 from hsantanna:<br>
<hr>
<pre>
# Bug report
### Checklist
- [X] I am confident this is a bug in CPython, not a bug in a third-party project
- [X] I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc),
and am confident this bug has not been reported before
### CPython versions tested on:
3.11
### Operating systems tested on:
Linux
### Output from running 'python -VV' on the command line:
Python 3.11.3 (main, Jun 5 2023, 09:32:32) [GCC 13.1.1 20230429]
### A clear and concise description of the bug:
There is any way for making the Home key from keypad (KP_Home) to work just like the regular Home key on IDLE shell/editor?
And the same to KP_End, KP_Prior (PageUp) and KP_Next (PageDown).
Current behavior:
The KP_Home, KP_End, KP_Prior and KP_Next keys doesn't work with IDLE on Linux (I didn't test it on MS Windows).
The expected behavior:
For most QT/GTK applications the common behavior is the KP_Home to move the keyboard cursor to the begin of the line and the KP_End to move to the end of the line, just like Home and End keys.
Ctrl + KP_Home should move to the begin of the file and Ctrl + KP_End should move to the end of the file/buffer.
Shift modifier should be used to select text together with any of those keypad keys. But I'm not sure if it depends on keyboard layout on Linux, may be a layout where Shift modifier may return a number when used together with keypad keys (I'm not sure about this). For my keyboard layout Shift only modify the keypad keys if NumLock is active, so the expected behavior is that Shift triggers text selection if NumLock is disabled.
Those expected behaviors works as described here for almost any non TKinter applications on modern Linux desktops, ie, works on VSCode, Chromium, Firefox and most GTK or QT based software.
Additionally:
As already discussed for bug #41237, TK will not change it's own default behavior, since the current behavior is the desired behavior for some use cases.
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/108399">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>