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
IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. #48101
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='https://github.com/kbkaiser'closed_at=<Date2010-03-25.23:26:28.000>created_at=<Date2008-09-12.20:15:21.397>labels= ['expert-IDLE', 'type-bug']
title='IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.'updated_at=<Date2017-11-02.22:11:50.012>user='https://github.com/serwy'
This is supposed to have been fixed by http://bugs.python.org/issue1196903
but I don't believe there has not been a 2.5 release since then.
I do not know if that patch was or was backported for 2.5.
Rev 62545 to 2.6 was forward ported to 3.0 on 4May,
r62716. I'm using py3k HEAD and it works the same
as 2.6: pressing Home toggles beween the left margin
and the start of the code text. It works the same way
on Linux and Windows XP.
Won't fix, because this is not a bug, but a feature.
It's useful for copying blocks from the shell.
If you press home to get to the start of the code
text next to the prompt, why did you press it again
except to get to the left margin? And if you did so
accidentally, press it a third time!
The bug reported here is that on Windows XP, on my machine, in 2.5 and
still in multiple releases of 3.0 and 3.0.1, pressing Home sends the
cursor DIRECTLY to the left margin, before '<<<', and never stops at the
beginning of the text, after '>>> '. I am sorry if I was not clear
enough before.
Toggle behavior would be fine if it happened, and I never said
otherwise. But it does not happen, at least not on my machine, using
the PSF .msi installer. There is still a 3.0.2 to come.
This wasn't backported to 2.5 as it's trivial and life
is short.
I have a clean install of 3.0.1 from the msi installer,
running on an eeePC 1000HA, XP Home, tk 8.5.
If I type a string at the >>> prompt in the IDLE shell
and hit the home key, the cursor goes to the left of
the string. A second press puts it at the left margin.
Subseqent presses toggle.
I suggest you do a clean install. I get the same result
on Linux and XP, for 2.6.1, 3.0.1, 2. HEAD, and 3. HEAD.
If you look at EditorWindow.py:282 in 3.0.1 you can see
the fix. Please check yours.
Are you saying you have 2.6.1 and 3.0.1 installed and
they act differently? Do they both show the same version
for Tk? Please try to find out why 2.6 and 3.0 act
differently on your machine!
Activity
serwy commentedon Sep 12, 2008
Pressing "Home" on Windows XP in the PyShell window places the cursor
before ">>>" instead of after it. On Linux, this behaves correctly.
The problem is in PyShell.py in the home_callback(). At line 1064:
"event.state" returns 8 on Windows when Home is pressed, thus the
callback never executes. Here are two solutions:
event.mc_state != 0
or
(event.state & 1) != 0
This fixes the problem on Windows, and still works under Linux.
terryjreedy commentedon Sep 20, 2008
This is supposed to have been fixed by
http://bugs.python.org/issue1196903
but I don't believe there has not been a 2.5 release since then.
I do not know if that patch was or was backported for 2.5.
terryjreedy commentedon Apr 2, 2009
As reported in a comment for bpo-2704, the Home key misbehaves on WinXP for
3.0.1. The 2.6 fix was either not forward ported or otherwise disabled.
I removed 2.5 since that is now on security fix only status.
kbkaiser commentedon Apr 3, 2009
Rev 62545 to 2.6 was forward ported to 3.0 on 4May,
r62716. I'm using py3k HEAD and it works the same
as 2.6: pressing Home toggles beween the left margin
and the start of the code text. It works the same way
on Linux and Windows XP.
Won't fix, because this is not a bug, but a feature.
It's useful for copying blocks from the shell.
If you press home to get to the start of the code
text next to the prompt, why did you press it again
except to get to the left margin? And if you did so
accidentally, press it a third time!
terryjreedy commentedon Apr 3, 2009
Toggle behavior would be fine if it happened, and I never said
otherwise. But it does not happen, at least not on my machine, using
the PSF .msi installer. There is still a 3.0.2 to come.
kbkaiser commentedon Apr 4, 2009
This wasn't backported to 2.5 as it's trivial and life
is short.
I have a clean install of 3.0.1 from the msi installer,
running on an eeePC 1000HA, XP Home, tk 8.5.
I suggest you do a clean install. I get the same result
on Linux and XP, for 2.6.1, 3.0.1, 2. HEAD, and 3. HEAD.
If you look at EditorWindow.py:282 in 3.0.1 you can see
the fix. Please check yours.
Are you saying you have 2.6.1 and 3.0.1 installed and
they act differently? Do they both show the same version
for Tk? Please try to find out why 2.6 and 3.0 act
differently on your machine!
kbkaiser commentedon Apr 4, 2009
Weeble found the problem: it's the numlock key interacting
with a bug. I can reproduce it when I latch numlock.
http://bugs.python.org/msg80478
terryjreedy commentedon Apr 5, 2009
Bingo. I can also switch behaviors with Numlock (which I routinely have
engaged). Neither of us was crazy ;-) Thank you 'weeble'.
python-dev commentedon Mar 17, 2011
New changeset 664a129c01f7 by Kurt B. Kaiser in branch '2.7':
<Home> toggle non-functional when NumLock set.
http://hg.python.org/cpython/rev/664a129c01f7
python-dev commentedon Mar 25, 2011
New changeset a7d50a4e124e by Kurt B. Kaiser in branch '3.1':
<Home> toggle non-functional when NumLock set
http://hg.python.org/cpython/rev/a7d50a4e124e
python-dev commentedon Mar 25, 2011
New changeset 500e48708470 by Kurt B. Kaiser in branch '2.7':
<Home> toggle failing on Tk 8.5, causing IDLE exits. bpo-3851.
http://hg.python.org/cpython/rev/500e48708470
terryjreedy commentedon Nov 2, 2017
The problem is back, at least on Windows, in 2.7.14, 3.5.4, 3.6.3, and 3.7.0. Numlock has no effect. I open bpo-31930 for this.