From: Douglas C. <dcl...@op...> - 2011-05-13 13:20:33
|
On 2011-05-13 16:51, Krister Hallergard wrote: > Hi, > Am very grateful for the help I got to get lircd to work, Jarod and > Douglas, but thought that the Lirc Mouse problem merits its own post. > Am applying three scripts, the first two to start lircd - which work, > and the third to start lircmd - which does not work: > > #! /bin/sh > sudo ir-keytable -c -w /lib/udev/rc_keymaps/haupp > sudo ir-keytable --protocol=RC-5 > sudo rm /var/run/lirc/lircd.pid > sudo /usr/sbin/lircd -H dev/input -d /dev/input/event6 -n > > #! /bin/sh > killall irexec > killall irxevent > irexec -d > irxevent -d > OK, so the assumption is that is all working, although you don't "killall lircd" and you do run it with the "-n" flag which I would expect to stop there, but hey. > #! /bin/sh > sudo modprobe uinput > sudo /usr/sbin/lircmd --uinput > > root@DESKTOP:/# dmesg |grep lirc > [ 24.381982] lirc_dev: IR Remote Control driver registered, major 250 > [ 24.586291] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) > registered at minor = 0 > [ 89.912147] input: lircmd as /devices/virtual/input/input7 > root@DESKTOP:/# ir-keytable > Found /sys/class/rc/rc0/ (/dev/input/event6) with: > Driver cx88xx, table rc-hauppauge-new > Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC > Enabled protocols: RC-5 > Repeat delay = 500 ms, repeat period = 33 ms > > Before the upgrade from 10.10 the lircmd --uinput worked but not > anymore. Have the same lircd.conf, lircmd.conf and .lircrc as before > the upgrade. Would very much appreciate advice. > > That all looks good, the assumption is that the kecodes from the keytable do not match the keycodes in the lircmd.conf file. So I thought that I would give it a try, after reading up on the lircmd stuff. In one window I run: # lircd -n -Hdevinput -d/dev/input/event2 /usr/share/lirc/remotes/devinput/lircd.conf.devinput In another window I run: $ irw and in a third I run: $ sudo lircmd -nu lircmd.conf So, what do I get? From the irw I get: 0000000080010200 00 KEY_NUMERIC_0 devinput 0000000080010200 00 KEY_NUMERIC_0 devinput 0000000080010191 00 KEY_BLUE devinput 0000000080010202 00 KEY_NUMERIC_2 devinput 0000000080010202 00 KEY_NUMERIC_2 devinput 0000000080010202 01 KEY_NUMERIC_2 devinput 0000000080010202 02 KEY_NUMERIC_2 devinput 0000000080010202 00 KEY_NUMERIC_2 devinput Then I look in my lircmd.conf file and see: MOVE_N * KEY_2 and finally see that "KEY_2" != "KEY_NUMERIC_2" is staring me in the face. I change the lircmd.conf /KEY_\(\d\)/KEY_NUMERIC_\1/ and restart lircmd as before. While I was in there I noticed that I had previously changed /ACTIVATE * KEY_BLUE/ACTIVATE * KEY_GREEN/ and so pressed KEY_GREEN and amazingly ... as I pressed the "2" key the cursor moved up the screen. So the whole file is: # # lircmd config file # PROTOCOL IntelliMouse #PROTOCOL MouseSystems # ACCELERATOR start max multiplier ACCELERATOR 2 30 5 ACTIVATE * KEY_GREEN MOVE_N * KEY_NUMERIC_2 MOVE_NE * KEY_NUMERIC_3 MOVE_E * KEY_NUMERIC_6 MOVE_SE * KEY_NUMERIC_9 MOVE_S * KEY_NUMERIC_8 MOVE_SW * KEY_NUMERIC_7 MOVE_W * KEY_NUMERIC_4 MOVE_NW * KEY_NUMERIC_1 #MOVE_N * ARROW_UP #MOVE_E * ARROW_RIGHT #MOVE_S * ARROW_DOWN #MOVE_W * ARROW_LEFT #MOVE_IN * CH_UP #MOVE_OUT * CH_DOWN BUTTON1_TOGGLE * KEY_NUMERIC_5 BUTTON2_TOGGLE * KEY_NUMERIC_0 BUTTON3_TOGGLE * KEY_STOP BUTTON1_CLICK * KEY_OK BUTTON1_CLICK * KEY_AUDIO BUTTON3_CLICK * KEY_VIDEO # BUTTONx_CLICK, BUTTONx_UP, BUTTONx_DOWN are also possible and all of those keys have to match the keys that irw is kicking out when the buttons are pressed. This is on Ubuntu 11.04 x86_64 with kernel 2.6.38-8-generic so it should work for you. Douglas |