From 2a73fa5403788bfec9525a4f593efb9c5f1394c3 Mon Sep 17 00:00:00 2001 From: Bas Weelinck Date: Mon, 3 Dec 2012 23:12:40 +0100 Subject: [PATCH] Ignore keyboard auto-repeat. --- map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/map.c b/map.c index 9d950f0..1406aeb 100644 --- a/map.c +++ b/map.c @@ -174,7 +174,8 @@ int main(int argc, char** argv) { nowrite = 0; j = 0; - if (e.type == EV_KEY) { + /* Only catch keys and ignore auto-repeat (value == 2) */ + if (e.type == EV_KEY && e.value != 2) { switch(e.code) { case KEY_UP: je.type = EV_ABS; je.code = ABS_HAT0Y; je.value = -e.value; j = 0; break;