[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.

Roger Serwy report at bugs.python.org
Fri Sep 12 22:20:35 CEST 2008


New submission from Roger Serwy <roger.serwy at gmail.com>:

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:

if event.state != 0 and event.keysym == "Home":
    return

"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.

----------
components: +IDLE
type:  -> behavior
versions: +Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3851>
_______________________________________


More information about the Python-bugs-list mailing list