111111 00 10 10 10 01 0011 10 01 01 01 01 01 01 01 01 01 01 01 10 10 10 10 01 01 01 01 01 10 01 01 01 01 01 01 10 10 01 10A combination of two states gives us the final digital data. Whenever a combination 01 is seen, it results in a 0; 10 results in 1. All other pairs are not allowed. Be aware of the header consisting of the sync pulse (length 6), a space of length 2 and four bits followed by the so called 'toggle bit' -- in this case consisting of 0011 (i.e. double length). The four bits in header do not carry important information for this case. They can be used to identify the data packet, since possibly other remote controls use this kind of code, which could lead into confusion.
The final decoding of our above mentioned packet (omiting the section from sync to toggle) gives us:
1000 0000 0000 1111 0000 0100
0000 1101
The most significant bit (MSB) comes first. See below for information
on the content
of those data packets.
| Identification |
C |
Code Set |
Identification |
Pressed
Button |
||||
|---|---|---|---|---|---|---|---|---|
| 1000 |
0000 |
0000 |
1111 |
x |
xxx |
0100 |
xxxx |
xxxx |
| Value |
Pressed Button |
|---|---|
| 0x00 |
0 (rc only) |
| 0x01 |
1 (rc only) |
| 0x02 |
2 (rc only) |
| 0x03 |
3 (rc only) |
| 0x04 |
4 (rc only) |
| 0x05 |
5 (rc only) |
| 0x06 |
6 (rc only) |
| 0x07 |
7 (rc only) |
| 0x08 |
8 (rc only) |
| 0x09 |
9 (rc only) |
| 0x0A |
Delete (rc only) |
| 0x0B |
Enter (rc only) |
| 0x0C |
PC Power |
| 0x0D |
Green Logo Button |
| 0x0E |
Mute |
| 0x0F |
Info |
| 0x10 |
Vol + |
| 0x11 |
Vol - |
| 0x12 |
Ch/Pg + |
| 0x13 |
Ch/Pg - |
| 0x14 |
Fwd |
| 0x15 |
Rew |
| 0x16 |
Play |
| 0x17 |
Record |
| 0x18 |
Pause |
| 0x19 |
Stop |
| 0x1A |
Skip |
| 0x1B |
Replay |
| 0x1C |
# (rc only) |
| 0x1D |
* (rc only) |
| 0x1E |
Up |
| 0x1F |
Down |
| 0x20 |
Left |
| 0x21 |
Right |
| 0x22 |
OK |
| 0x23 |
Back |
| 0x24 |
DVD Menu |
| 0x25 |
Live TV |
| 0x26 |
EPG |
| 0x46 |
TV (keyboard only) |
| 0x47 |
Music (keyboard only) |
| 0x48 |
Recorded TV |
| 0x49 |
Pictures (keyboard only) |
| 0x4A |
Videos (keyboard only) |
| 0x50 |
Radio (keyboard only) |
| 0x5A |
Videotext (rc only) |
| 0x5B |
Red (rc only) |
| 0x5C |
Green (rc only) |
| 0x5D |
Yellow (rc only) |
| 0x5E |
Blue (rc only) |
| 0x64 |
Messenger (keyboard only) |
| Identification |
unknown |
ΔY |
ΔX |
R |
L |
Checksum |
|||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 |
0001 |
xxxx |
xxxx |
xxx |
xxxx |
xxx |
xxxx |
x |
x |
x |
xxxx |
R is the right button flag, L is the left button flag:
| Bit |
Meaning |
|---|---|
| 0 |
not pressed |
| 1 |
pressed |
| Value |
Meaning |
|---|---|
| 0x00 |
0 |
| 0x01 |
1 |
| 0x02 |
2 |
| 0x03 |
3 |
| 0x04 |
4 |
| 0x05 |
5 |
| 0x06 |
6 |
| 0x07 |
7 |
| 0x08 |
8 |
| 0x09 |
9 |
| 0x0A |
10 |
| 0x0B |
11 |
| 0x0C |
12 |
| 0x0D |
13 |
| 0x0E |
14 |
| 0x0F |
15 |
| 0x10 |
16 |
| 0x11 |
17 |
| 0x12 |
18 |
| 0x13 |
19 |
| 0x14 |
20 |
| 0x15 |
21 |
| 0x16 |
22 |
| 0x17 |
23 |
| 0x18 |
24 |
| 0x19 |
25 |
| 0x1A |
26 |
| 0x1B |
27 |
| 0x1C |
28 |
| 0x1D |
29 |
| 0x1E |
30 |
| ... |
|
| 0x62 |
-30 |
| 0x63 |
-29 |
| 0x64 |
-28 |
| 0x65 |
-27 |
| 0x66 |
-26 |
| 0x67 |
-25 |
| 0x68 |
-24 |
| 0x69 |
-23 |
| 0x6A |
-22 |
| 0x6B |
-21 |
| 0x6C |
-20 |
| 0x6D |
-19 |
| 0x6E |
-18 |
| 0x6F |
-17 |
| 0x70 |
-16 |
| 0x71 |
-15 |
| 0x72 |
-14 |
| 0x73 |
-13 |
| 0x74 |
-12 |
| 0x75 |
-11 |
| 0x76 |
-10 |
| 0x77 |
-9 |
| 0x78 |
-8 |
| 0x79 |
-7 |
| 0x7A |
-6 |
| 0x7B |
-5 |
| 0x7C |
-4 |
| 0x7D |
-3 |
| 0x7E |
-2 |
| 0x7F |
-1 |
| Identification |
unknown |
Code Set |
unknown |
Key Code |
Shift
Mask |
|||||
|---|---|---|---|---|---|---|---|---|---|---|
| 0 |
0100 |
xxx |
x |
xxxx |
xxxx |
xxxx |
xxxx |
xxxx |
xxxx |
xxxx |
The shift mask uses basically bits used also in USB HID. The following table shows the contents of 'Shift Mask'.
| Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|---|
| Key |
Right Logo (n/a) |
Right Alt |
Right Shift |
Right Ctrl |
Left Logo |
Left Alt |
Left Shift |
Left Ctrl |
| Matching Key Code |
0xE7 |
0xE6 |
0xE5 |
0xE4 |
0xE3 |
0xE2 |
0xE1 |
0xE0 |
The Key Codes also follow the USB HID standard and are described here only for reference. The assumption is made, that the keyboard is a US English keyboard (which mine is not). The keys have to be translated to your local character set. It is possible that some key codes are not sent by all keyboards, as well as some might be sent, which are not in this table.
| Keycode |
Meaning |
|---|---|
| 0x00 |
All keys released (except those
in Shift Mask) |
| 0x04 |
A |
| 0x05 |
B |
| 0x06 |
C |
| 0x07 |
D |
| 0x08 |
E |
| 0x09 |
F |
| 0x0A |
G |
| 0x0B |
H |
| 0x0C |
I |
| 0x0D |
J |
| 0x0E |
K |
| 0x0F |
L |
| 0x10 |
M |
| 0x11 |
N |
| 0x12 |
O |
| 0x13 |
P |
| 0x14 |
Q |
| 0x15 |
R |
| 0x16 |
S |
| 0x17 |
T |
| 0x18 |
U |
| 0x19 |
V |
| 0x1A |
W |
| 0x1B |
X |
| 0x1C |
Y |
| 0x1D |
Z |
| 0x1E |
1 |
| 0x1F |
2 |
| 0x20 |
3 |
| 0x21 |
4 |
| 0x22 |
5 |
| 0x23 |
6 |
| 0x24 |
7 |
| 0x25 |
8 |
| 0x26 |
9 |
| 0x27 |
0 |
| 0x28 |
↵ |
| 0x29 |
Esc |
| 0x2A |
← (backspace) |
| 0x2B |
Tab |
| 0x2C |
Space |
| 0x2D |
- |
| 0x2E |
= |
| 0x2F |
[ |
| 0x30 |
] |
| 0x31 |
\ |
| 0x32 |
Non-US # |
| 0x33 |
; |
| 0x34 |
' |
| 0x35 |
` |
| 0x36 |
, |
| 0x37 |
. |
| 0x38 |
/ |
| 0x39 |
Caps Lock |
| 0x3A |
F1 |
| 0x3B |
F2 |
| 0x3C |
F3 |
| 0x3D |
F4 |
| 0x3E |
F5 |
| 0x3F |
F6 |
| 0x40 |
F7 |
| 0x41 |
F8 |
| 0x42 |
F9 |
| 0x43 |
F10 |
| 0x44 |
F11 |
| 0x45 |
F12 |
| 0x46 |
Print Screen |
| 0x47 |
Scroll Lock |
| 0x48 |
Pause |
| 0x49 |
Insert |
| 0x4A |
Home |
| 0x4B |
Page Up |
| 0x4C |
Delete |
| 0x4D |
End |
| 0x4E |
Page Down |
| 0x4F |
→ |
| 0x50 |
← |
| 0x51 |
↓ |
| 0x52 |
↑ |
| ... |
|
| 0x64 |
Non-US \ |
| 0x65 |
Application (=context menu) |
| ... |
|
Since the project is in some early stage, I unfortunately cannot give you more assistance right now.
For further information take a look at the SourceForge files page.