|
From: Yan S. <ya...@se...> - 2009-01-24 15:57:52
|
I got a cheap USB IR remote that emulates a keyboard. On some keys it
sends out several characters. The problem is that these are seen as
multiple button pushes, even if I have flags = quit set...
Changing the order doesn't help.
I've isolated a test case:
lircrc:
# FA
begin
remote = hid_keyboard
button = LeftControl
button = LeftAlt
button = A
button = 1
button = F1
prog = irexec
config = echo FA
repeat = 0
flags = quit
end
# A
begin
remote = hid_keyboard
button = A
prog = irexec
config = echo A
flags = quit
end
# 1
begin
remote = hid_keyboard
button = 1
prog = irexec
config = echo 1
repeat = 0
flags = quit
end
# NoClue
begin
remote = hid_keyboard
button = LeftAlt
button = Tab
prog = irexec
config = echo NoClue
flags = quit
end
# Tab
begin
remote = hid_keyboard
button = Tab
prog = irexec
config = echo Tab
flags = quit
end
Output from irw:
selene:~# irw
Function Key A:
000000000001001d 00 LeftControl hid_keyboard
0000000000010038 00 LeftAlt hid_keyboard
000000000001001e 00 A hid_keyboard
0000000000010002 00 1 hid_keyboard
000000000001003b 00 F1 hid_keyboard
NoClue key:
0000000000010038 00 LeftAlt hid_keyboard
000000000001000f 00 Tab hid_keyboard
^C
output from irexec - for some reason, the A and 1 keys are seen as
separate key strokes AND the whole FA pattern is also seen - in spite of
using the quit flag.... But this doesn't happen with the NoClue key.
(It's got a picture I can't figure out, thus the name....)
yan@selene:~$ irexec ~/.lircrc
A
1
FA
NoClue
Output from evtest (google for evtest.c - a simple utility that dumps
scan codes)
Testing ... (interrupt to exit)
Function A:
Event: time 1232812446.747180, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1232812446.747199, type 1 (Key), code 29 (LeftControl), value 1
Event: time 1232812446.747203, type 4 (Misc), code 4 (ScanCode), value 700e2
Event: time 1232812446.747206, type 1 (Key), code 56 (LeftAlt), value 1
Event: time 1232812446.747212, type 4 (Misc), code 4 (ScanCode), value 70004
Event: time 1232812446.747217, type 1 (Key), code 30 (A), value 1
Event: time 1232812446.747221, -------------- Report Sync ------------
Event: time 1232812446.763176, type 4 (Misc), code 4 (ScanCode), value 7001e
Event: time 1232812446.763194, type 1 (Key), code 2 (1), value 1
Event: time 1232812446.763197, -------------- Report Sync ------------
Event: time 1232812446.779178, type 4 (Misc), code 4 (ScanCode), value 7003a
Event: time 1232812446.779192, type 1 (Key), code 59 (F1), value 1
Event: time 1232812446.779196, -------------- Report Sync ------------
Event: time 1232812446.803190, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1232812446.803207, type 1 (Key), code 29 (LeftControl), value 0
Event: time 1232812446.803211, type 4 (Misc), code 4 (ScanCode), value 700e2
Event: time 1232812446.803214, type 1 (Key), code 56 (LeftAlt), value 0
Event: time 1232812446.803222, type 4 (Misc), code 4 (ScanCode), value 70004
Event: time 1232812446.803226, type 1 (Key), code 30 (A), value 0
Event: time 1232812446.803230, -------------- Report Sync ------------
Event: time 1232812446.811178, type 4 (Misc), code 4 (ScanCode), value 7001e
Event: time 1232812446.811191, type 1 (Key), code 2 (1), value 0
Event: time 1232812446.811194, -------------- Report Sync ------------
Event: time 1232812446.827174, type 4 (Misc), code 4 (ScanCode), value 7003a
Event: time 1232812446.827185, type 1 (Key), code 59 (F1), value 0
Event: time 1232812446.827188, -------------- Report Sync ------------
NoClue:
Event: time 1232812451.323180, type 4 (Misc), code 4 (ScanCode), value 700e2
Event: time 1232812451.323193, type 1 (Key), code 56 (LeftAlt), value 1
Event: time 1232812451.323199, type 4 (Misc), code 4 (ScanCode), value 7002b
Event: time 1232812451.323203, type 1 (Key), code 15 (Tab), value 1
Event: time 1232812451.323207, -------------- Report Sync ------------
Event: time 1232812451.347184, type 4 (Misc), code 4 (ScanCode), value 700e2
Event: time 1232812451.347198, type 1 (Key), code 56 (LeftAlt), value 0
Event: time 1232812451.347204, type 4 (Misc), code 4 (ScanCode), value 7002b
Event: time 1232812451.347208, type 1 (Key), code 15 (Tab), value 0
Event: time 1232812451.347212, -------------- Report Sync ------------
|