From 174bed49a0d6a15671c13c1ebc0c87081294154f Mon Sep 17 00:00:00 2001 From: seife Date: Sun, 6 Mar 2011 16:09:08 +0000 Subject: [PATCH] tuxtxt: allow direction keys to autorepeat Useful e.g. for page-catching mode. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1260 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- lib/libtuxtxt/tuxtxt.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 14208ae77..9674fad2c 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -6360,7 +6360,9 @@ int GetRCCode() { if (ev.value) { - if (ev.code != rc_last_key) + if (ev.code != rc_last_key || + ev.code == KEY_DOWN || ev.code == KEY_UP || /* allow direction keys */ + ev.code == KEY_LEFT || ev.code == KEY_RIGHT) /* to autorepeat... */ { rc_last_key = ev.code; switch (ev.code) @@ -6423,7 +6425,9 @@ int GetRCCode() } fprintf(stderr, "rccode: %04x\n", RCCode); - if (RCCode == LastKey) + if (RCCode == LastKey && + RCCode != 0x18 && RCCode != 0x19 && /* allow direction keys */ + RCCode != 0x1b && RCCode != 0x1c) /* to autorepeat... */ { RCCode = -1; return 1;