I'm in the process of building a new vdr box with an Epia mini-itx motherboard and I intend to build it into the case of an old video recorder. The front panel has loads of buttons on it such as play, pause, rew, stop, rec, etc. and it would be really good if I could connect these up.
:-)
I have bought a USB numeric keypad (meant for laptops) that I found cheap in a sale and I have rewired the buttons on the front panel of the video into a matrix and connected them in place of the numeric keypad (it is basically just a small usb module with a keypad membrane plugged into it). All seems to work: I get a new usb input device when I attach it and if I cat the relevant input device, I can see the keypresses. So far so good.
My problem now is how to actually use the thing to control vdr! At the moment, the keyboard driver is grabbing it and all I get is a series of keycodes such as numbers, *, /, -, etc. I am using vdr with a LIRC remote but it also has the keyboard remote compiled in, and, at the moment, pressing random buttons on the front panel does strange things, as would be expected!
I can see at least two options:
1. Delete my remote.conf and program the 'keyboard' remote using the front panel (I won't be able to use the proper keyboard to control vdr but I'm sure I can cope with that!).
2. Use the remote plugin with the input device. If I do this, I will still be getting random commands sent to vdr through the keyboard driver, unless I can remove the usb keyboard driver and get the remote plugin to talk to the remote plugin using a raw device, or something.
Has anyone managed to do something like this? I know that it is possible to use buttons attached to a gameport in conjunction with the joystick plugin but this motherboard does not have a gameport.
Thoughts?
Cheers,
Laz
Laz a écrit :
I have bought a USB numeric keypad (meant for laptops) that I found cheap in a sale and I have rewired the buttons on the front panel of the video into a matrix and connected them in place of the numeric keypad (it is basically just a small usb module with a keypad membrane plugged into it). All seems to work: I get a new usb input device when I attach it and if I cat the relevant input device, I can see the keypresses. So far so good.
Great. I didn't think about those USB keyboards. I used a PS/2 keyboard controler connected to the internal PS/2 connector (leaving the real PS/2 port unusable).
I can see at least two options:
- Delete my remote.conf and program the 'keyboard' remote using the front
panel (I won't be able to use the proper keyboard to control vdr but I'm sure I can cope with that!).
I would go for that one. Maybe you also have the possibility to modify the mapping from scan codes (returned by the USB device) to key codes, thus decoupling the PS/2 keyboard keycodes and the USB keypad codes... This is possible with the PS/2 keyboard driver.
On Tuesday 19 Apr 2005 23:13, Nicolas Huillard wrote:
Laz a écrit :
I have bought a USB numeric keypad (meant for laptops) that I found cheap in a sale and I have rewired the buttons on the front panel of the video into a matrix and connected them in place of the numeric keypad (it is basically just a small usb module with a keypad membrane plugged into it). All seems to work: I get a new usb input device when I attach it and if I cat the relevant input device, I can see the keypresses. So far so good.
Great. I didn't think about those USB keyboards. I used a PS/2 keyboard controler connected to the internal PS/2 connector (leaving the real PS/2 port unusable).
I was originally thinking of pulling apart a joystick or a mouse but found this going cheap!
I can see at least two options:
- Delete my remote.conf and program the 'keyboard' remote using the
front panel (I won't be able to use the proper keyboard to control vdr but I'm sure I can cope with that!).
I would go for that one. Maybe you also have the possibility to modify the mapping from scan codes (returned by the USB device) to key codes, thus decoupling the PS/2 keyboard keycodes and the USB keypad codes... This is possible with the PS/2 keyboard driver.
Hmmm...at the moment, some of the keys are mapped to things like Num Lock, i.e. they get turned into events that aren't normal keypresses. I suppose I could just ignore or disconnect Num Lock! I'll check out the source for the various drivers: I'm not using a usb keyboard so not getting real keycodes doesn't really matter, as long as I can direct the signals from the buttons to vdr somehow!
;-)
Cheers,
Laz
Laz wrote:
I'm in the process of building a new vdr box with an Epia mini-itx motherboard and I intend to build it into the case of an old video recorder. The front panel has loads of buttons on it such as play, pause, rew, stop, rec, etc. and it would be really good if I could connect these up.
:-)
I have bought a USB numeric keypad (meant for laptops) that I found cheap in a sale and I have rewired the buttons on the front panel of the video into a matrix and connected them in place of the numeric keypad (it is basically just a small usb module with a keypad membrane plugged into it). All seems to work: I get a new usb input device when I attach it and if I cat the relevant input device, I can see the keypresses. So far so good.
My problem now is how to actually use the thing to control vdr! At the moment, the keyboard driver is grabbing it and all I get is a series of keycodes such as numbers, *, /, -, etc. I am using vdr with a LIRC remote but it also has the keyboard remote compiled in, and, at the moment, pressing random buttons on the front panel does strange things, as would be expected!
I can see at least two options:
- Delete my remote.conf and program the 'keyboard' remote using the front
panel (I won't be able to use the proper keyboard to control vdr but I'm sure I can cope with that!).
- Use the remote plugin with the input device. If I do this, I will still be
getting random commands sent to vdr through the keyboard driver, unless I can remove the usb keyboard driver and get the remote plugin to talk to the remote plugin using a raw device, or something.
Option 2 should work if - you are using kernel 2.6.x and - specify the event device of the usb keyboard with the -i option.
The remote plugin will grab the event device for exclusive access and the keyboard driver will be disconnected.
Note that this will work with 2.6.x kernels only!
Oliver
On Tuesday 19 Apr 2005 23:42, Oliver Endriss wrote:
Laz wrote:
- Use the remote plugin with the input device. If I do this, I will
still be getting random commands sent to vdr through the keyboard driver, unless I can remove the usb keyboard driver and get the remote plugin to talk to the remote plugin using a raw device, or something.
Option 2 should work if
- you are using kernel 2.6.x and
- specify the event device of the usb keyboard with the -i option.
The remote plugin will grab the event device for exclusive access and the keyboard driver will be disconnected.
Note that this will work with 2.6.x kernels only!
Good good. Will it give proper 'key presses' for the button attached to Num Lock, or do I need to go deeper into stuff for that? I'll have a gander at the source tomorrow.
Cheers,
Laz
----- Original Message ----- From: "Oliver Endriss" o.endriss@gmx.de
Laz wrote:
I can see at least two options:
- Delete my remote.conf and program the 'keyboard' remote using the
front panel (I won't be able to use the proper keyboard to control vdr but I'm sure I can cope with that!).
- Use the remote plugin with the input device. If I do this, I will
still be getting random commands sent to vdr through the keyboard driver, unless I can remove the usb keyboard driver and get the remote plugin to talk to the remote plugin using a raw device, or something.
Option 2 should work if
- you are using kernel 2.6.x and
- specify the event device of the usb keyboard with the -i option.
The remote plugin will grab the event device for exclusive access and the keyboard driver will be disconnected.
How about using svdrp? You should then of course write a program that handles the keyboard events coming from the keypad and sending proper signals through svdrp. But this is just a thought and might even be much more difficult to carry out than using the remote.conf :)
- Kartsa
Oliver Endriss wrote:
Laz wrote:
I'm in the process of building a new vdr box with an Epia mini-itx motherboard and I intend to build it into the case of an old video recorder. The front panel has loads of buttons on it such as play, pause, rew, stop, rec, etc. and it would be really good if I could connect these up.
:-)
I have bought a USB numeric keypad (meant for laptops) that I found cheap in a sale and I have rewired the buttons on the front panel of the video into a matrix and connected them in place of the numeric keypad (it is basically just a small usb module with a keypad membrane plugged into it). All seems to work: I get a new usb input device when I attach it and if I cat the relevant input device, I can see the keypresses. So far so good.
My problem now is how to actually use the thing to control vdr! At the moment, the keyboard driver is grabbing it and all I get is a series of keycodes such as numbers, *, /, -, etc. I am using vdr with a LIRC remote but it also has the keyboard remote compiled in, and, at the moment, pressing random buttons on the front panel does strange things, as would be expected!
I can see at least two options:
- Delete my remote.conf and program the 'keyboard' remote using the front
panel (I won't be able to use the proper keyboard to control vdr but I'm sure I can cope with that!).
- Use the remote plugin with the input device. If I do this, I will still be
getting random commands sent to vdr through the keyboard driver, unless I can remove the usb keyboard driver and get the remote plugin to talk to the remote plugin using a raw device, or something.
Option 2 should work if
- you are using kernel 2.6.x and
- specify the event device of the usb keyboard with the -i option.
The remote plugin will grab the event device for exclusive access and the keyboard driver will be disconnected.
Note that this will work with 2.6.x kernels only!
Oliver
Great that saved me a lot of work and made my new case even better :D Well done Oliver :)
Background: I have since this week a Silverstone LaScala LC14 with neat little buttons on the front. Being connected to one usb port i thought it might be just additional keyboard like buttons (indeed showkey shows values for these keys). .... compiled your plugin, tested which input device it is and started vdr accordingly - keys are instantly working :)
If i would be Laz i would go this way. Regarding the numlock it should not matter much. At least showkey shows just a normal keycode so i would assume that it behaves like any other key on usb too (just imho, but trying does not cause to much work)
Kind Regards
Steffen