summaryrefslogtreecommitdiffstats
path: root/tsak
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-06 21:01:31 -0500
committerSlávek Banko <slavek.banko@axis.cz>2013-04-08 16:36:03 +0200
commite131fb6f7924c5242773ca9e0624175d7e1db9c4 (patch)
treeec5b3ec587aef19197b852384cbd6e3ea628ddac /tsak
parenteb1b42efffa3e6a0ab960be407f57e8d58638de9 (diff)
downloadtdebase-e131fb6f7924c5242773ca9e0624175d7e1db9c4.tar.gz
tdebase-e131fb6f7924c5242773ca9e0624175d7e1db9c4.zip
Do not load virtual keyboards in tsak
This resolves Bug 1275 (cherry picked from commit 8d2f9ae31522a472de122e849d206a869f248773)
Diffstat (limited to 'tsak')
-rw-r--r--tsak/main.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tsak/main.cpp b/tsak/main.cpp
index 2e79954fb..6d7fcb128 100644
--- a/tsak/main.cpp
+++ b/tsak/main.cpp
@@ -234,11 +234,16 @@ int find_keyboards() {
// Ensure that we do not detect our own tsak faked keyboards
ioctl (fd, EVIOCGNAME(sizeof(name)), name);
if (str_ends_with(name, "+tsak") == 0) {
- /* We assume that anything that has an alphabetic key in the
- QWERTYUIOP range in it is the main keyboard. */
- for (j = KEY_Q; j <= KEY_P; j++) {
- if (TestBit(j, key_bitmask)) {
- keyboard_fds[keyboard_fd_num] = fd;
+ // Do not attempt to use virtual keyboards per Bug 1275
+ struct input_id input_info;
+ ioctl (fd, EVIOCGID, &input_info);
+ if ((input_info.vendor != 0) && (input_info.product != 0)) {
+ /* We assume that anything that has an alphabetic key in the
+ QWERTYUIOP range in it is the main keyboard. */
+ for (j = KEY_Q; j <= KEY_P; j++) {
+ if (TestBit(j, key_bitmask)) {
+ keyboard_fds[keyboard_fd_num] = fd;
+ }
}
}
}