Is it possible to remap keys of remote not using Lirc?
#1
Hi,

I have an iMON Pad remote control; the newer one with kernel support.

Rather then hacking the system out and running with Lirc can I alter the key functions?

The keys are correctly mapped in:

/etc/rc_keymaps/imon-pad

and going through this thread: http://forum.xbmc.org/showthread.php?tid=126711

all is fine, have tested with ir-keytable.

Code:
I: Bus=0003 Vendor=15c2 Product=0036 Version=0003
N: Name="iMON Remote (15c2:0036)"
P: Phys=usb-0000:00:14.0-13.3/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-13/3-13.3/3-13.3:1.0/rc/rc0/input17
U: Uniq=
H: Handlers=kbd event17
B: PROP=0
B: EV=100013
B: KEY=fff 0 4400000108c0320 2d5008000000000 30000 400119000 418614000801 809e168000000000 200000010004002
B: MSC=10


What I'm asking for basically is that some of the buttons don't seem to be mapped in XBMC, the number pad being one of them.


I have another machine, running Lirc and a different remote of which the mapping was done between the Lircmap.xml file and the remote.xml file; how to achieve a similar result with the kernel module based remote though? Would I need to create a keyboard.xml? Is there any information on this?

The only thing I could find was:

http://wiki.xbmc.org/index.php?title=keymap

specifically:

Quote:4.2 Remotes
An up to date list of the available actions can be found in the source code of XBMC in ButtonTranslator.cpp where the TranslateRemoteString() function does the work.
Example:
<remote>
<play>Play</play>
</remote>


Does the above mean use the ButtonTranslator.cpp in a similar manner that Lirc uses the Lircmap.xml file?


Thanks.
Reply
#2
Just a quick update; I had a look at ButtonTranslator.cpp and tried to cross-compare that with the ir-keytable file I generated. They don't entirely add up so I tried adding the names of the keys from the ir-keytable file to a file I called remote.xml but unfortunately that didn't work Sad

Here are the scan codes for the remote:

Code:
scancode 0x100007f = KEY_RIGHT (0x6a)
scancode 0x1000080 = KEY_LEFT (0x69)
scancode 0x1007f00 = KEY_DOWN (0x6c)
scancode 0x1008000 = KEY_UP (0x67)
scancode 0x1010000 = BTN_MOUSE (0x110)
scancode 0x1010080 = BTN_MOUSE (0x110)
scancode 0x1020000 = BTN_RIGHT (0x111)
scancode 0x1020080 = BTN_RIGHT (0x111)
scancode 0x200001e = KEY_NUMERIC_1 (0x201)
scancode 0x200001f = KEY_NUMERIC_2 (0x202)
scancode 0x2000020 = KEY_NUMERIC_3 (0x203)
scancode 0x2000021 = KEY_NUMERIC_4 (0x204)
scancode 0x2000022 = KEY_NUMERIC_5 (0x205)
scancode 0x2000023 = KEY_NUMERIC_6 (0x206)
scancode 0x2000024 = KEY_NUMERIC_7 (0x207)
scancode 0x2000025 = KEY_NUMERIC_8 (0x208)
scancode 0x2000026 = KEY_NUMERIC_9 (0x209)
scancode 0x2000027 = KEY_NUMERIC_0 (0x200)
scancode 0x2000028 = KEY_ENTER (0x1c)
scancode 0x2000029 = KEY_ESC (0x01)
scancode 0x200002a = KEY_BACKSPACE (0x0e)
scancode 0x200002c = KEY_SPACE (0x39)
scancode 0x2000065 = KEY_COMPOSE (0x7f)
scancode 0x2200020 = KEY_NUMERIC_POUND (0x20b)
scancode 0x2200025 = KEY_NUMERIC_STAR (0x20a)
scancode 0x2800000 = KEY_CONTEXT_MENU (0x1b6)
scancode 0x288195b7 = KEY_EXIT (0xae)
scancode 0x288515b7 = KEY_BOOKMARKS (0x9c)
scancode 0x288795b7 = KEY_CHANNELDOWN (0x193)
scancode 0x289115b7 = KEY_POWER (0x74)
scancode 0x289395b7 = KEY_CHANNELUP (0x192)
scancode 0x289515b7 = KEY_DOWN (0x6c)
scancode 0x28a115b7 = KEY_BACKSPACE (0x0e)
scancode 0x28a195b7 = KEY_ENTER (0x1c)
scancode 0x28a395b7 = KEY_VOLUMEUP (0x73)
scancode 0x28a515b7 = KEY_TV (0x179)
scancode 0x28a595b7 = KEY_VOLUMEDOWN (0x72)
scancode 0x28b195b7 = KEY_NUMERIC_3 (0x203)
scancode 0x28b515b7 = KEY_NUMERIC_STAR (0x20a)
scancode 0x28b595b7 = KEY_NUMERIC_1 (0x201)
scancode 0x28b715b7 = KEY_COMPOSE (0x7f)
scancode 0x298115b7 = KEY_RECORD (0xa7)
scancode 0x298195b7 = KEY_NEXT (0x197)
scancode 0x298315b7 = KEY_REWIND (0xa8)
scancode 0x298595b7 = KEY_SUBTITLE (0x172)
scancode 0x299115b7 = KEY_KEYBOARD (0x176)
scancode 0x299135b7 = KEY_KEYBOARD (0x176)
scancode 0x299195b7 = KEY_AUDIO (0x188)
scancode 0x299395b7 = KEY_EJECTCLOSECD (0xa2)
scancode 0x299595b7 = KEY_NUMERIC_5 (0x205)
scancode 0x29a115b7 = KEY_NUMERIC_POUND (0x20b)
scancode 0x29a295b7 = KEY_DVD (0x185)
scancode 0x29a395b7 = KEY_DVD (0x185)
scancode 0x29a515b7 = KEY_LEFT (0x69)
scancode 0x29a595b7 = KEY_ZOOM (0x174)
scancode 0x29b195b7 = KEY_EJECTCD (0xa1)
scancode 0x29b715b7 = KEY_DASHBOARD (0xcc)
scancode 0x2a8115b7 = KEY_PLAY (0xcf)
scancode 0x2a8195b7 = KEY_REWIND (0xa8)
scancode 0x2a8315b7 = KEY_PLAY (0xcf)
scancode 0x2a8515b7 = KEY_NUMERIC_8 (0x208)
scancode 0x2a8595b7 = KEY_NUMERIC_4 (0x204)
scancode 0x2a9115b7 = KEY_PAUSE (0x77)
scancode 0x2a9315b7 = KEY_SPACE (0x39)
scancode 0x2a9395b7 = KEY_CYCLEWINDOWS (0x9a)
scancode 0x2aa115b7 = KEY_NUMERIC_9 (0x209)
scancode 0x2aa395b7 = KEY_SCREEN (0x177)
scancode 0x2aa515b7 = KEY_UP (0x67)
scancode 0x2aa595b7 = KEY_NUMERIC_6 (0x206)
scancode 0x2ab195b7 = KEY_MEDIA (0xe2)
scancode 0x2ab715b7 = KEY_CAMERA (0xd4)
scancode 0x2b8115b7 = KEY_FASTFORWARD (0xd0)
scancode 0x2b8195b7 = KEY_CONTEXT_MENU (0x1b6)
scancode 0x2b8315b7 = KEY_FASTFORWARD (0xd0)
scancode 0x2b8395b7 = KEY_TIME (0x167)
scancode 0x2b8515b7 = KEY_VIDEO (0x189)
scancode 0x2b8595b7 = KEY_LANGUAGE (0x170)
scancode 0x2b9115b7 = KEY_PREVIOUS (0x19c)
scancode 0x2b9395b7 = KEY_NUMERIC_7 (0x207)
scancode 0x2b9595b7 = KEY_MUTE (0x71)
scancode 0x2b9715b7 = KEY_STOP (0x80)
scancode 0x2ba115b7 = KEY_IMAGES (0x1ba)
scancode 0x2ba385b7 = KEY_MENU (0x8b)
scancode 0x2ba395b7 = KEY_MENU (0x8b)
scancode 0x2ba515b7 = KEY_RIGHT (0x6a)
scancode 0x2ba595b7 = KEY_NUMERIC_0 (0x200)
scancode 0x2bb195b7 = KEY_NUMERIC_2 (0x202)
scancode 0x2bb715b7 = KEY_ESC (0x01)
scancode 0x688301b7 = BTN_MOUSE (0x110)
scancode 0x688481b7 = BTN_RIGHT (0x111)

The buttons I'm able to use so far are:

Volume
Up/Down/Left/Right
Enter
Power
Mute
Back

but that's about it.

It would be great to get all the buttons working and mapped to features of my choosing.
Reply
#3
Just looking at page 2 from here:

http://forum.xbmc.org/showthread.php?tid=126711&page=2

According to what is written and quickly quoting:

Quote:Configure lirc in devinput mode: (This step is unnecessary. You can uninstall lirc completely, it won't cause any harm if you complete this step)

Does this mean that Lircmap.xml will work even without Lircd?

- Though I tried adding:

Code:
<lircmap>
  <remote device="linux-input-layer">
    <altname>cx23885_remote</altname>
    <altname>devinput</altname>
    <livetv>KEY_MEDIA</livetv>
  </remote>
</lircmap>

Then mapped it into remote.xml

Code:
<keymap>
        <global>
                <remote>
                        <left>Left</left>
                        <right>Right</right>
                        <up>Up</up>
                        <down>Down</down>
                        <select>Select</select>
                        <back>ParentDir</back>
                        <menu>PreviousMenu</menu>
                        <info>Info</info>
                        <display>FullScreen</display>
                        <title></title>
                        <play>Play</play>
                        <pause>Pause</pause>
                        <reverse>Rewind</reverse>
                        <forward>FastForward</forward>
                        <skipplus>SkipNext</skipplus>
                        <skipminus>SkipPrevious</skipminus>
                        <stop>Stop</stop>
                        <power>XBMC.ActivateWindow(ShutDownMenu)</power>
                        <livetv>XBMC.ActivateWindow(Home)</livetv>
                        <mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
                        <mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
                        <myvideo>XBMC.ActivateWindow(MyVideos)</myvideo>
                        <red>XBMC.ActivateWindow(12600)</red>
                        <star>AudioNextLanguage</star>
                        <record>Info</record>
                        <volumeplus>VolumeUp</volumeplus>
                        <volumeminus>VolumeDown</volumeminus>
                        <channelplus>PageUp</channelplus>
                        <channelminus>PageDown</channelminus>
                        <pageplus>PageUp</pageplus>
                        <pageminus>PageDown</pageminus>
                        <mute>Mute</mute>
                        <hash>ShowSubtitles</hash>
                        <clear>PreviousMenu</clear>
                        <start>XBMC.EjectTray()</start>
                </remote>
        </global>
        <SlideShow>
                <remote>
                        <pageplus>ZoomIn</pageplus>
                        <pageminus>ZoomOut</pageminus>
                        <one>ZoomLevel1</one>
                        <two>ZoomLevel2</two>
                        <three>ZoomLevel3</three>
                        <four>ZoomLevel4</four>
                        <five>ZoomLevel5</five>
                        <six>ZoomLevel6</six>
                        <seven>ZoomLevel7</seven>
                        <eight>ZoomLevel8</eight>
                        <nine>ZoomLevel9</nine>
                        <zero>ZoomNormal</zero>
                </remote>
        </SlideShow>
</keymap>

The key being tested is KEY_MEDIA, though again it didn't work??


Though my remote is the later version the exact same input method -evdev is being used:

Code:
# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event14) with:
        Driver imon, table rc-imon-pad
        Supported protocols: RC-6 other
        Enabled protocols: other
        Name: iMON Remote (15c2:0036)
        bus: 3, vendor/product: 15c2:0036, version: 0x0003
        Repeat delay = 500 ms, repeat period = 125 ms

Code:
# ir-keytable -d /dev/input/event14
Name: iMON Remote (15c2:0036)
bus: 3, vendor/product: 15c2:0036, version: 0x0003

Again all key codes defined in: /usr/lib/udev/rc_keymaps/imon_pad

work completely. I just need to get XBMC to understand the "missing" buttons so that I can use the remote to its full capability.
Reply

Logout Mark Read Team Forum Stats Members Help
Is it possible to remap keys of remote not using Lirc?0