From 5b239bcd619c62661fc96e9a037b8935a2bd67a6 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Wed, 7 Mar 2018 10:16:11 +0100 Subject: [PATCH] Update evdevDriver.py --- src/fenrir/inputDriver/evdevDriver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fenrir/inputDriver/evdevDriver.py b/src/fenrir/inputDriver/evdevDriver.py index b147dc3b..5435f9c4 100644 --- a/src/fenrir/inputDriver/evdevDriver.py +++ b/src/fenrir/inputDriver/evdevDriver.py @@ -77,7 +77,8 @@ class driver(inputDriver): r, w, x = select(self.iDevices, [], [], 0.5) for fd in r: event = None - foreward = False + foreward = False + eventFired = False try: event = self.iDevices[fd].read_one() except: @@ -98,11 +99,12 @@ class driver(inputDriver): if not foreward: if currMapEvent['EventState'] in [0,1,2]: eventQueue.put({"Type":fenrirEventType.KeyboardInput,"Data":currMapEvent}) + eventFired = True else: if not event.type in [0,1,4]: foreward = True event = self.iDevices[fd].read_one() - if foreward: + if foreward and not eventFired: self.writeEventBuffer() self.clearEventBuffer() def handleInputEvent(self, event):