VDR 1.3.38: menu key no longer works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Klaus Schmidinger wrote:
> Are you sure about that?
> 64 bit are 8 byte, and 5 ReadKey() calls should only result in
> 5 * 8 = 40 bit.
> 
> Klaus
> 
>> cKbdRemote::ReadKeySequence: r=1 k=1b key1=0
>> cKbdRemote::ReadKeySequence: r=2 k=1b5b key1=0
>> cKbdRemote::ReadKeySequence: r=3 k=1b5b32 key1=0
>> cKbdRemote::ReadKeySequence: r=4 k=1b5b3232 key1=0
>> cKbdRemote::ReadKeySequence: r=5 k=5b323234 key1=1b
>> cKbdRemote::ReadKeySequence: r=5 k=5b323234

Tracked more down

remote.conf contains:

KBD.Menu       0000001B5B32347E

which works in 1.3.37

In 1.3.38, trailing 7E is missing because of while loop.

After fixing this temporary I still get "32" twice here:

cKbdRemote::ReadKeySequence: r=1 key1=1b
cKbdRemote::ReadKeySequence: r=1 k=000000000000001b
cKbdRemote::ReadKeySequence: r=2 key1=5b
cKbdRemote::ReadKeySequence: r=2 k=0000000000001b5b
cKbdRemote::ReadKeySequence: r=3 key1=32
cKbdRemote::ReadKeySequence: r=3 k=00000000001b5b32
cKbdRemote::ReadKeySequence: r=4 key1=32
cKbdRemote::ReadKeySequence: r=4 k=000000001b5b3232
cKbdRemote::ReadKeySequence: r=5 key1=34
cKbdRemote::ReadKeySequence: r=5 k=000000005b323234
cKbdRemote::ReadKeySequence: r=5 k=000000003232347e

There is a logical bug in the code, the key after "5b" will be added
twice, following will proper work:

                      switch (key1) {
                        case 0x31 ... 0x3F: // more-byte sequence
                             do {
                                   if ((key1 = ReadKey()) < 0)
                                      break; // Sequence ends here
                                   k <<= 8;
                                   k |= key1 & 0xFF;
                             } while (key1 != 0x7E);
                             break;
                        }
                      }

But there is still a strangeness, F1 to F5 now report single key code,
while from F6, 5 key code is reported.

Will try to debug this later, have to leave now.

	Peter


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux