After some time i finally found out, what I had to do.
Configuring remotes in linux does not seem to be an easy task :-)
I had to use quite some tools performing cat on the raw data of the event device, using irrecord and ir-keytable and reading posts in different forums... but finally it worked.
So for all of you having trouble with this... here is my configuration and the commands that need to be executed.
First... load the following keymap and
save it as "/etc/rc_keymaps/zotac_mce"
Code:
0x8034043d KEY_POWER2
0x8034843d KEY_POWER2
0x8034048e KEY_WAKEUP
0x8034848e KEY_WAKEUP
0x80340437 KEY_RECORD
0x80348437 KEY_RECORD
0x80340430 KEY_PAUSE
0x80348430 KEY_PAUSE
0x80340431 KEY_STOP
0x80348431 KEY_STOP
0x80340429 KEY_REWIND
0x80348429 KEY_REWIND
0x8034042c KEY_PLAY
0x8034842c KEY_PLAY
0x80340428 KEY_FASTFORWARD
0x80348428 KEY_FASTFORWARD
0x80340421 KEY_BACK
0x80348421 KEY_BACK
0x80340420 KEY_NEXT
0x80348420 KEY_NEXT
0x80340483 KEY_ESC
0x80348483 KEY_ESC
0x803404cb KEY_INFO
0x803484cb KEY_INFO
0x8034045d KEY_MENU
0x8034845d KEY_MENU
0x80340458 KEY_UP
0x80348458 KEY_UP
0x8034045a KEY_LEFT
0x8034845a KEY_LEFT
0x8034045b KEY_RIGHT
0x8034845b KEY_RIGHT
0x80340459 KEY_DOWN
0x80348459 KEY_DOWN
0x8034045c KEY_OK
0x8034845c KEY_OK
0x80340410 KEY_VOLUMEUP
0x80348410 KEY_VOLUMEUP
0x80340411 KEY_VOLUMEDOWN
0x80348411 KEY_VOLUMEDOWN
0x8034040d KEY_MUTE
0x8034840d KEY_MUTE
0x8034041e KEY_CHANNELUP
0x8034841e KEY_CHANNELUP
0x8034041f KEY_CHANNELDOWN
0x8034841f KEY_CHANNELDOWN
0x80340401 KEY_NUMERIC_1
0x80348401 KEY_NUMERIC_1
0x80340402 KEY_NUMERIC_2
0x80348402 KEY_NUMERIC_2
0x80340403 KEY_NUMERIC_3
0x80348403 KEY_NUMERIC_3
0x80340404 KEY_NUMERIC_4
0x80348404 KEY_NUMERIC_4
0x80340405 KEY_NUMERIC_5
0x80348405 KEY_NUMERIC_5
0x80340406 KEY_NUMERIC_6
0x80348406 KEY_NUMERIC_6
0x80340407 KEY_NUMERIC_7
0x80348407 KEY_NUMERIC_7
0x80340408 KEY_NUMERIC_8
0x80348408 KEY_NUMERIC_8
0x80340409 KEY_NUMERIC_9
0x80348409 KEY_NUMERIC_9
0x80340400 KEY_NUMERIC_0
0x80348400 KEY_NUMERIC_0
0x80340433 KEY_PROG1 # *
0x80348433 KEY_PROG1 # *
0x80340432 KEY_PROG2 # #
0x80348432 KEY_PROG2 # #
0x8034043a KEY_PROG3 # CLEAR
0x8034843a KEY_PROG3 # CLEAR
0x8034042f KEY_TEXT
0x8034842f KEY_TEXT
0x8034043e KEY_PROG4
0x8034843e KEY_PROG4
0x80340434 KEY_PVR # ENTER
0x80348434 KEY_PVR # ENTER
0x8034046d KEY_RED
0x8034846d KEY_RED
0x8034046e KEY_GREEN
0x8034846e KEY_GREEN
0x8034046f KEY_YELLOW
0x8034846f KEY_YELLOW
0x80340470 KEY_BLUE
0x80348470 KEY_BLUE
I am not really sure why all the codes need to be in there twice, but that's how it works and how I found it on the vdr-portal forums (and I tested it with each key listed only once... this causes problems).
Next step is to include this keymap in "
/etc/rc_maps.cfg". There seem to be some small differences to the rc-6 maps.
Open the rc_maps.cfg file and search for "rc-rc6-mce". Besides the "table" the "file" rc6_mce should be referenced.
Exchange rc6_mce with "zotac_mce" (or comment the rc5_mce line and add the identical line with zotac_mce exchanged again :-))
Next step is to load the keytable. This can be done using ir-keytable and the two commands (have to be executed in order):
Code:
sudo ir-keytable -a /etc/rc_maps.cfg
Now the keytable can be tested with
You now should see events generated for every keypress on your remote, but the most important part here is to check for events like "EV_KEY(0x01) key_up: KEY_RIGHT(0x0001)" (when the key "right" is pressed)
Now copy these settings to your
/etc/lirc/hardware.conf. Note that the "load_modules" has to be set to false for the remote to work.
Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Linux input layer (/dev/input/eventX)"
REMOTE_MODULES="lirc_dev nuvoton-cir"
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/event4"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""
#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
#Disable kernel support.
#Typically, lirc will disable in-kernel support for ir devices in order to
#handle them internally. Set to false to prevent lirc from disabling this
#in-kernel support.
#DISABLE_KERNEL_SUPPORT="true"
#Enable lircd
START_LIRCD="true"
#Don't start lircmd even if there seems to be a good config file
START_LIRCMD="false"
#Try to load appropriate kernel modules
LOAD_MODULES="false"
# Default configuration files for your hardware if any
LIRCMD_CONF=""
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
#START_LIRCMD=""
The
/etc/lirc/lircd.conf also has to be modified to match the following snippet
Code:
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"
After these changes things should work.
To test for a working remote the lirc service has to be restarted:
Code:
sudo /etc/init.d/lirc stop
sudo /etc/init.d/lirc start
After that the program
irw can be used for testing.
Each keypress on the remote should generate a matching entry while irw is running
EDIT: Changes keycodes of number keys (from KEY_1 to KEY_NUMERIC_1), so they work with kodi out of the box