Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-11-05 13:29:16 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-11-05 13:29:16 (GMT)
commitabf2f85190cafeab41c49a18d14474e9ecab2c7b (patch)
treeb5a4c18bbd4fcb3f11f4008670d44892e7188b66
parent7dca64877a1df5ac3d66c4e544f9e430b2ce5a18 (diff)
ensure we grab focus for keyboard events (needed by python export)
-rw-r--r--TurtleArt/tawindow.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 6d9ca0a..d665b9f 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -3634,6 +3634,7 @@ before making changes to your program'))
def get_keyboard_input(self):
""" Query keyboard and update cached keyboard input """
+ self.window.grab_focus()
if len(self.keypress) == 1:
self.keyboard = ord(self.keypress[0])
elif self.keypress in KEY_DICT: