You are not logged in.

#1 2013-04-06 14:04:08

bergqvistjl
Member
Registered: 2011-01-05
Posts: 55

How can I map remote presses to keyboard commands WITOUT using LIRC?

Hi, i'm tearing my hair out here, and I'm really starting from scratch here now I guess.

I have a media centre USB remote, that I would like to map (using evdev, as I gather you can do that now) each button press to a single letter on the keyboard, so that when I press the Play button on my remote, it's as though I typed the letter P on the keyboard.

I've been told not to use LIRC as it's now possible to do this within Xorg, but I have literally no clue how to do this, and the internet has not been helpful so far. I'll start off by giving you  the output of ir-keytable. The remote I want to control is on RC1, and I can't get rid of the device on RC0, as that's my tuner card, unfortuantly:

Found /sys/class/rc/rc0/ (/dev/input/event10) with:
        Driver saa716x, table rc-tbs-nec
        Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other
        Enabled protocols:
        Name: saa716x IR (TurboSight TBS 6284)
        bus: 1, vendor/product: 6284:0001, version: 0x0001
        Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc1/ (/dev/input/event14) with:
        Driver mceusb, table rc-rc6-mce
        Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other
        Enabled protocols: NEC RC-5 RC-6 JVC SONY LIRC other
        Name: Media Center Ed. eHome Infrared
        bus: 3, vendor/product: 0471:0815, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms

Please help! I've been tearing my hair out here...

Last edited by bergqvistjl (2013-04-06 14:04:33)

Offline

#2 2013-04-06 14:38:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,522
Website

Re: How can I map remote presses to keyboard commands WITOUT using LIRC?

Where did you here you could do this with just xlib?  Have you verified this with xev?

EDIT: I'm not claiming it can't be done with xlib - I hope it can, as if it can be I'll start tinkering with this too.  I'm just curious whether this was a good source and whether xev receives the events.

Last edited by Trilby (2013-04-06 14:39:17)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-04-06 14:51:02

bergqvistjl
Member
Registered: 2011-01-05
Posts: 55

Re: How can I map remote presses to keyboard commands WITOUT using LIRC?

Trilby wrote:

Where did you here you could do this with just xlib?  Have you verified this with xev?

EDIT: I'm not claiming it can't be done with xlib - I hope it can, as if it can be I'll start tinkering with this too.  I'm just curious whether this was a good source and whether xev receives the events.

Well look at ir-keytable....

Anyway first off, I want to either disable the current device that's at rc0, or move it away so that my usb remote goes onto rc0, can anyone help?

Offline

Board footer

Powered by FluxBB