Hama Remote Control

From MythTV Official Wiki
Jump to: navigation, search

Identification

Hama Remote Control (front/top)
Label from Back of Hama Remote Control
Hama Remote Control USB IR receiver dongle

The Hama Remote Control is a generic model that has been marketed under various Brand names. Running the following command in a terminal with the USB IR receiver dongle plugged into the computer.

lsusb |grep "ID 05a4:9881"

If you have this remote under any brand name it will return: (Bus and Device numbers may be different.)

Bus 005 Device 002: ID 05a4:9881 Ortek Technology, Inc.


Setup

It can be setup in one of two ways:

I choose the first option as it is more responsive. More reasons at the first link above.

My configuration file looks like this:

! Copy this file to ~/.Xmodmap to have it automatically loaded at startup
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute
keycode 121 = F9
!keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 122 = F10
!keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 123 = F11
!keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext
keycode 171 = Z
!keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 172 = P
!keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev
keycode 173 = Q
!keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject
keycode 174 = T
! Internet Explorer key
!keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage
! Power/Standby key
!keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep

Note that all lines starting with a ! are comments and can be safely removed. Some are changes that I made. You can load these key mapings with:

xmodmap  PathToFile/FilenameKeyMapSavedTo

Finding Keycodes

xev can be used to find key codes. Run the following:

xev | sed -n 's/^.*state \([0-9].*\), keycode *\([0-9]\+\) *\(.*\), .*$/keycode \2 = \3, state = \1/p'

Then point your remote at the IR dongle and press a key. You will notice that each press outputs multiple keystroke and keycodes.

Hama Remote Control Button Mappings from settings file above