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: IDLE Windows shortcuts by default
Type: enhancement Stage: needs patch
Components: IDLE Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: AlexWaygood, primexx, terry.reedy
Priority: normal Keywords:

Created on 2022-02-06 21:43 by primexx, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg412671 - (view) Author: primexx (primexx) Date: 2022-02-06 21:43
In IDLE on Windows, there are certain keyboard shortcut idiosycracies in the default configuration. 

For example,

redo is ctrl+shift+z (standard elsewhere) rather than ctrl+y (Microsoft's standard)

de-indenting is ctrl+[ rather than shift+tab (also affects multi-line selected behaviour)

Request: adjust the defaults based on OS platform and use windows style by default on windows

If this is a dupe I apologize. I tried to search for an existing issue but wasn't able to find any with the keywords i can think of
msg412693 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-02-07 00:20
I wish it were otherwise, but configuration defaults cannot be changed as some people would not like it and it would badly interact with custom configurations.  We can add new themes and keysets, but that should be very rare.  We can consider adding bindings, though clashes with customizations are possible.

Do you have any documentation for you claims?  My impression is that Microsoft occasionally makes UI changes, so that 'Microsoft Standard' is a bit of a joke.  Maybe keys are an exception.

Ctrl+y is *not* recognized in Notepad.  ctrl+shift+z acts the same as ctrl_z.  Notepad++ recognizes both and lists both for Dedent in its
Scintilla mapper.  If it is not in use in the Windows keyset, adding it could be considered.

Before the first character on a line, in the absence of a selection, tab and backspace indent and dedent.  When there is a selection, tab and ctrl-] indent the selections and ctrl-[ dedents.  Shift-tab acts the same as tab.  I believe that tk, at least on Windows, does not recognize shift-tab as different from tab.  I know that this is true for some named keys, such as Enter.  (This stuff needs to be documented.)  Shift-tab works as you (and I) want in Notepad++, so this is not a Windows issue.
msg412700 - (view) Author: primexx (primexx) Date: 2022-02-07 01:33
> I wish it were otherwise, but configuration defaults cannot be changed as some people would not like it and it would badly interact with custom configurations.

that is a good point. perhaps just adding alternate keysets. this is clearly not a high priority issue since it can be changed manually.

> Do you have any documentation for you claims?

for redo: https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec

shift + tab does a lot of different things depending on context (e.g. the link above, and there are 3 documented behaviour in word alone https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-word-95ef89dd-7142-4b50-afb2-f762f663ceb2). however, i just tried and it does de-indent in word 365 with just a simple text selection (i.e. plain paragraph, not inside tables, etc.). also tried the same thing in google docs and it also de-indents text selection. i think you could be correct that  this is not actually windows specific, it does seem to be fairly common behaviour in the context of text editors anyway.

> Ctrl+y is *not* recognized in Notepad.

yeah notepad is all sorts of messed up. it does not have the usual ctrl+z behaviour either.
msg412730 - (view) Author: Alex Waygood (AlexWaygood) * (Python triager) Date: 2022-02-07 10:36
As a longtime Windows user, I also generally expect ctrl+Y to redo an action in most programs, FWIW.
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90823
2022-02-07 10:36:12AlexWaygoodsetnosy: + AlexWaygood
messages: + msg412730
2022-02-07 01:33:56primexxsetmessages: + msg412700
2022-02-07 00:20:58terry.reedysettype: enhancement
stage: needs patch
messages: + msg412693
versions: - Python 3.7, Python 3.8, Python 3.9, Python 3.10
2022-02-06 21:43:55primexxcreate