From f0da7c856f667bb116b6dec0e0c16f3038af3b5e Mon Sep 17 00:00:00 2001 From: Pekka Vuorela Date: Wed, 27 Sep 2017 17:19:46 +0300 Subject: Increase kmap2qmap KEY_MAX to 0x2ff Linux KEY_MAX was increased this way already in 2008. https://kernel.opensuse.org/cgit/kernel/commit/?id=03bac96fae0efdb25e2059e5accbe4f3ee6328dd commit 03bac96fae0efdb25e2059e5accbe4f3ee6328dd Author: Dmitry Torokhov Date: Mon Jun 23 10:47:34 2008 -0400 Input: expand keycode space Expand the number of potential key codes from 512 to 768 since people are coming up with more and more keys. Change-Id: If4f36f9b42d6e74f9fedb5a74cb09703967ac97d Reviewed-by: Laszlo Agocs --- src/kmap2qmap/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kmap2qmap/main.cpp b/src/kmap2qmap/main.cpp index 60d49ddca..84125497e 100644 --- a/src/kmap2qmap/main.cpp +++ b/src/kmap2qmap/main.cpp @@ -697,8 +697,8 @@ bool KeymapParser::parseKmap(QFile *f) if (kcpos >= 0 && kcpos < (tokens.count()-3) && tokens[kcpos+2] == "=") { quint16 keycode = tokens[kcpos+1].toInt(); - if (keycode <= 0 || keycode > 0x1ff /* KEY_MAX */) { - parseWarning("keycode out of range [0..0x1ff]"); + if (keycode <= 0 || keycode > 0x2ff /* KEY_MAX */) { + parseWarning("keycode out of range [0..0x2ff]"); break; } -- cgit v1.2.1