summaryrefslogtreecommitdiff
path: root/normal.py
diff options
context:
space:
mode:
Diffstat (limited to 'normal.py')
-rw-r--r--normal.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/normal.py b/normal.py
index f8c9e90..7fadcc9 100644
--- a/normal.py
+++ b/normal.py
@@ -47,15 +47,18 @@ def normal_mode(self, event, char):
if event.type != X.KeyRelease:
return
+ handled = False
if len(pressed) > 1:
paste_style(self, pressed)
-
- if len(pressed) == 1:
+ handled = True
+ elif len(pressed) == 1:
# Get the only element in pressed
ev = next(iter(pressed))
handled = handle_single_key(self, ev)
- if not handled:
- replay(self)
+
+ # replay events to Inkscape if we couldn't handle them
+ if not handled:
+ replay(self)
events.clear()
pressed.clear()