1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-25 20:46:17 +02:00

ase: another keymouse fix: keep F1-F3 mouse-buttons from causing key events.

This commit is contained in:
David Kühling 2011-06-19 12:36:43 +02:00
parent 026792a075
commit cd0c7cebcc

View File

@ -192,19 +192,23 @@ Index: ase-0.8.2/data/gui.xml
Index: ase-0.8.2/src/jinete/jmessage.cpp Index: ase-0.8.2/src/jinete/jmessage.cpp
=================================================================== ===================================================================
--- ase-0.8.2.orig/src/jinete/jmessage.cpp 2011-06-16 12:43:59.718215107 +0200 --- ase-0.8.2.orig/src/jinete/jmessage.cpp 2011-06-16 12:43:59.718215107 +0200
+++ ase-0.8.2/src/jinete/jmessage.cpp 2011-06-16 12:44:02.948215109 +0200 +++ ase-0.8.2/src/jinete/jmessage.cpp 2011-06-19 12:35:11.813186277 +0200
@@ -81,6 +81,18 @@ @@ -81,6 +81,22 @@
msg->key.propagate_to_children = false; msg->key.propagate_to_children = false;
msg->key.propagate_to_parent = true; msg->key.propagate_to_parent = true;
+ /* ignore arrow keys without shift, to not interfere with the + /* ignore keys used for mouse emuliation unless shift is pressed, to not
+ * keyboard-mouse */ + * interfere with the keyboard-mouse (some menus would close when
+ * receiveing key events) */
+ switch (msg->key.scancode) + switch (msg->key.scancode)
+ { + {
+ case KEY_UP: + case KEY_UP:
+ case KEY_DOWN: + case KEY_DOWN:
+ case KEY_LEFT: + case KEY_LEFT:
+ case KEY_RIGHT: + case KEY_RIGHT:
+ case KEY_F1:
+ case KEY_F2:
+ case KEY_F3:
+ if (!(msg->any.shifts&KB_SHIFT_FLAG)) + if (!(msg->any.shifts&KB_SHIFT_FLAG))
+ msg->any.used = true; + msg->any.used = true;
+ } + }