<Home> toggle non-functional when NumLock set.

Issue3851
This commit is contained in:
Kurt B. Kaiser 2011-03-17 00:05:38 -04:00
parent 764d75f325
commit 020d3d9856
2 changed files with 10 additions and 3 deletions

View file

@ -307,9 +307,9 @@ def new_callback(self, event):
return "break"
def home_callback(self, event):
if (event.state & 12) != 0 and event.keysym == "Home":
# state&1==shift, state&4==control, state&8==alt
return # <Modifier-Home>; fall back to class binding
if (event.state & 4) != 0 and event.keysym == "Home":
# state&4==Control. If <Control-Home>, use the Tk binding.
return
if self.text.index("iomark") and \
self.text.compare("iomark", "<=", "insert lineend") and \