Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Use a remote without LIRC
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Use a remote without LIRC
12th May, 2015, 10:09 AM
Post: #1
mikecar Offline
Registered
Posts: 2
Joined: May 2015
Reputation: 0
Use a remote without LIRC
For reasons that would take too long to explain, I would like to use my remote control without LIRC. In "standard' Kodi installations, this is how I do it:

1. stop - uninstall LIRC

2. fix the rc_keymaps for the remote in question (MCE receiver with HP remote), so that it produces
known keycodes, in the 1-254 range

3. use Kodi's keymap editor to map the keycodes into actions.

This has always worked up to now, kodi handles the remote as if it is a keyboard.
All configuration is via the GUI, no manual editing of xml files involved.

In Xbian, this does not work, strangely. this is what I did :

1. set lirc service to not autostart and rebooted
2. created the rc6_mce file
3. tested with ir-keytable. the file works fine.
4. tested the remote on the command line, OS sees it as a keyboard.

so far, so good. BUT :

when I start Kodi, the log says it sees the device and opens it (/dev/input/event2), but Kodi does not recognize ANY keys from the remote. It is not a permissions issue, /dev/input/event2 can be read by group 'input', and 'xbian' belongs to the group. Enabling debug logging shows nothing, no events are recognized by Kodi.

what could be wrong ? why is Kodi ignoring the input, while the operating system (and any apps started from the command line) handles the remote just fine ?
Find all posts by this user
Quote this message in a reply
12th May, 2015, 08:00 PM
Post: #2
mikecar Offline
Registered
Posts: 2
Joined: May 2015
Reputation: 0
RE: Use a remote without LIRC
I found the answer myself, and it is a beut!

kodi contains some (dangerous IMHO) code to "auto-detect" linux input devices, and decide whay to do with them. Apparently, a device is considered a "keyboard" if it can generate AT LEAST 20 ascii characters. In my case, the remote DOES simulate a keyboard, but not completely. Therefore, kodi decides to ignore it.

The workaround is this : when setting up the kernel keymap for an input device that generates keyboard events, add some "dummy" scancodes, to get the number of possible key events to be >20! silly, but works! and, since the remote will never actually send those scancodes, the workaround should not hurt...

One last note : keep the scancodes <255, and preferrably < 127, as kodi has these limits hard-wired
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  Hama MCE Remote: does not care about lirc kometa_triatlon 22 70,598 7th Mar, 2014 05:39 AM
Last Post: teekay

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 19th May, 2025, 11:32 PM Powered By MyBB, © 2002-2025 MyBB Group.