Mac key bindings and Shell home method behavior are separate and long-standing issues. They were discussed together in #18444, and this could be considered a duplicate thereof. However, the two issues need to be discussed and solved separately.
1. The bindings of <Control-Key-A> and <<beginning-of-line>> on Macs. The more general issue is IDLE key bindings on MacOSX.
Here are the beginning-of-line and select-all bindings in the various keysets.
From idlelib/config-keys.def
[IDLE Classic Windows]
beginning-of-line= <Key-Home>
select-all=<Control-Key-a> <Control-Key-A>
[IDLE Classic Unix]
beginning-of-line=<Control-Key-a> <Key-Home>
select-all=<Alt-Key-a> <Meta-Key-a>
[IDLE Modern Unix] # default on *nix, design by Serhiy Storchaka
beginning-of-line = <Key-Home>
select-all = <Control-Key-a>
[IDLE Classic Mac] # so obsolete that it almost should be removed?
beginning-of-line= <Key-Home>
select-all=<Command-Key-a>
[IDLE Classic OSX]
beginning-of-line = <Control-Key-Left>
select-all = <Command-Key-a>
I am guessing that Raymond is using a Mac and a customized version of IDLE Classic OSX with Control-Key-A added as either *a* or *the* binding of the <<beginning-of-line pseudoevent. On #18444, I asked whether we should make this addition config-key.def. (No answer there.) I now realize that doing so would break any custom keyset that binds ^A to any other pseudoevent. So I would be very reluctant to change the current keyset.
On the same issue, Ned suggested (July 2013) that even the OSX keyset had multiple problems and should be replaced. A new keyset would have to be justified by more than one change, but would not be encumbered by back compatibility. Are standards stable enough on Mac to make a new keyset appropriate now?
In June 2016, Serhiy Storchaka posted a new keyset for Linux that he claimed followed current Linux standards, such as they are. It is now the default on Linux. I would do the same for Mac if Ned and Raymond agreed on something. I changed the title of this issue to this generalization, rather than close it as a duplicate.
2. The behavior of editor.EditorWindow.home_callback, bound to <beginning-of-line>, in Shell. Jumping to the physical start of line was fixed, at least on *nix and Windows, in #3851. I remember verifying this. Yet now, on Win 10, the old behavior is back. So, this is not only a Mac issue and this part is a duplicate of #31930.
The underlying issue is the mixing of a read-only prompt and the first line of a possibly multiline read-write Python statement in the Shell text widget. This also leads to the indent problem and a couple of other minor issues. In retrospect, I consider this mixing a design mistake and I am working on a suggestion about fixing it.
|