[mythtv-users] TiVo Slide Remote, Linux and Scan Codes
jmk
jmk at foofus.net
Fri Sep 17 15:04:12 UTC 2010
I finally had a few minutes last night to play with the remote again
(it's been sitting on a shelf collecting dust). I decided to try and
avoid the lirc approach - I don't like the idea that all key-presses are
routed through lirc (I'm assuming this is the case, based on a previous
email); I'd like it to function as a normal keyboard at times.
Based on my understanding we have two primary challenges here:
1) Several of the buttons generate events which X11 does not understand
(e.g. Channel Up/Down).
2) Several of the buttons generate X11 key events, but Myth doesn't
process them (e.g. TiVo button -> XF86Launch1).
For #1, I'm playing with evrouter to map these keys. I understand this
code may be abandoned, but it appears to function at this time. I was
able to redirect the 6 buttons which fell into this category using the
following evrouter config:
---
"HID 150a:1201" "/dev/input/by-id/usb-150a_1201-event-kbd" none key/377
"XKey/F1" # Live TV
"HID 150a:1201" "/dev/input/by-id/usb-150a_1201-event-kbd" none key/362
"XKey/F2" # Guide
"HID 150a:1201" "/dev/input/by-id/usb-150a_1201-event-kbd" none key/402
"XKey/F3" # Channel Up
"HID 150a:1201" "/dev/input/by-id/usb-150a_1201-event-kbd" none key/403
"XKey/F4" # Channel Down
"HID 150a:1201" "/dev/input/by-id/usb-150a_1201-event-kbd" none key/353
"XKey/F5" # Select
"HID 150a:1201" "/dev/input/by-id/usb-150a_1201-event-kbd" none key/163
"XKey/F6" # Slow
---
For #2, I simply created a xmodmap file for those 16 keys:
---
! TiVo keycode 156 XF86Launch1
! TV Pwr keycode 124 XF86
! Input keycode 249 NoSymbol
! Vol Up keycode 123 XF86AudioRaiseVolume
! Vol Down keycode 122 XF86AudioLowerVolume
! Info keycode 138 SunProps
! Mute keycode 121 XF86AudioMute
! Record keycode 175 XF86AudioRecord
! Thumbs Down keycode 117 Next
! Thumbs Up keycode 112 Prior
! Play keycode 215 XF86AudioPlay
! Fwd keycode 216 XF86AudioForward
! Rewind keycode 176 XF86AudioRewind
! Pause keycode 127 Pause
! Repeat keycode 173 XF86AudioPrev
! JumpToEnd keycode 171 XF86AudioNext
keycode 112 = F7
keycode 117 = F8
keycode 121 = F9
keycode 122 = F10
keycode 123 = F11
keycode 124 = F12
keycode 127 = F13
keycode 138 = F14
keycode 156 = F15
keycode 171 = F16
keycode 173 = F17
keycode 175 = F18
keycode 176 = F19
keycode 215 = F20
keycode 216 = F21
keycode 249 = F22
---
I've only played with this approach briefly in a test VM. I'm waiting on
some new hardware for a new frontend, so when that arrives I'll
hopefully have time to play with it more. However, I do have a few
concerns, which maybe others have suggestions on:
- I used the F* key approach for ease of testing. I want the keyboard
piece of the remote for text entered and don't want it to trigger
actions within Myth, so I'm trying to avoid using any basic keys (e.g.
"A", "G", etc.) in the Myth key setup. Anyone see an issue issue with
using a bunch of F* keys? Is there a definitive listing of the keys
which Myth understands? For example, can I simply assign a Myth action
to something like "XF86AudioForward" or an equivalent name?
- Other than that evrouter may not be actively developed anymore, does
the lirc approach offer any benefit over this xmodmap/evrouter
combination?
Thanks,
Joe
More information about the mythtv-users
mailing list