KODI 16 longpress feature

Got it!

  • Apple A1156 Remote
  • removed eventlirc

OE7.0.0.0 Linux 4.4.2 Kodi 16.0 Feb 26 2016

autostart.sh

systemctl stop system-lircd.slice
 wait 100
 systemctl stop eventlircd.service
 /usr/sbin/lircd --uinput --driver=default --device=/dev/lirc0 --output=/run/lirc/lircd --pidfile=/run/lirc/lircd-lirc0.pid /storage/.config/lircd.conf

lircd.conf:

# this config file was automatically generated
 # using lirc-0.8.1(iguanaIR) on Fri Mar 30 19:20:40 2007
 #
 # contributed by Matthias Urlichs <matthias|urlichs.de>
 #
 # brand: Apple
 # model no. of remote control: A1156
 # devices being controlled by this remote: new (late 2006) MacBook
 #
 # This config files are for non-Apple receivers only.
 # Use the lircd.conf.macmini file when you are using the Apple receiver.
 #

begin remote
 name Apple_A1156
 bits 8
 flags SPACE_ENC
 eps 30
 aeps 100

header 9065 4484
 one 574 1668
 zero 574 547
 ptrail 567
 repeat 9031 2242
 pre_data_bits 16
 pre_data 0x77E1
 post_data_bits 8
 post_data 0xC5
 gap 37600
 toggle_bit 0
 ignore_mask 0x80ff

begin codes
 KEY_PLAYPAUSE 0x20 # Was: play
 KEY_UP 0xD0
 KEY_RIGHT 0xE0 # Was: ffwd
 KEY_LEFT 0x10
 KEY_DOWN 0xB0 # Was: minus
 KEY_MENU 0x40 # Was: menu
 end codes

end remote

.kodi/userdata/keymaps/keyboard.a1156.xml

kodi.log

KODI:~ # tail -f .kodi/temp/kodi.log | grep -i "lirc\|onkey"
 DEBUG: CButtonTranslator::Load - no userdata Lircmap.xml found, skipping
 DEBUG: OnKey: down (0xf081) pressed, action is Down
 DEBUG: OnKey: down (0xf081) pressed, action is Down
 DEBUG: OnKey: up (0xf080) pressed, action is Up
 DEBUG: OnKey: long-play_pause (0x100f0bd) pressed, action is Highlight
 DEBUG: OnKey: up (0xf080) pressed, action is Up
 DEBUG: OnKey: up (0xf080) pressed, action is Up
 DEBUG: OnKey: long-play_pause (0x100f0bd) pressed, action is Highlight

—————EDIT—————–

as of recent i tried using my instructable on a new LIBREELEC system but got doubled entries, so i had to remove the Lircmap.xml in my userdata directory.

KODI:~ # tail -f .kodi/temp/kodi.log | grep -i "lirc\|onkey"
 DEBUG: OnKey: down (0xf081) pressed, screen saver/dpms woken up
 DEBUG: LIRC: Update - NEW at 37660875:0000000077e1b0c5 00 KEY_DOWN Apple_A1156 (KEY_DOWN)
 DEBUG: OnKey: 167 (0xa7) pressed, action is ChapterOrBigStepBack
 DEBUG: OnKey: up (0xf080) pressed, action is VolumeUp
 DEBUG: LIRC: Update - NEW at 37661740:0000000077e1d0c5 00 KEY_UP Apple_A1156 (KEY_UP)
 DEBUG: OnKey: 166 (0xa6) pressed, action is ChapterOrBigStepForward
 DEBUG: OnKey: down (0xf081) pressed, action is VolumeDown
 DEBUG: LIRC: Update - NEW at 37663025:0000000077e1b0c5 00 KEY_DOWN Apple_A1156 (KEY_DOWN)
 DEBUG: OnKey: 167 (0xa7) pressed, action is ChapterOrBigStepBack
 DEBUG: OnKey: down (0xf081) pressed, action is VolumeDown

—————EDIT2017————-

when recording a new remote with irrecord, you have to delete the second coloum with Hex-Digit (likely 0x0 or 0x1)

[...]
      begin codes
          KEY_PAUSE                0x04000400000030 0x00000000000000
          KEY_1                    0x04000400000001 0x00000000000001
          KEY_2                    0x04000400000002 0x00000000000001
          KEY_3                    0x04000400000003 0x00000000000001
          KEY_4                    0x04000400000004 0x00000000000001
          KEY_5                    0x04000400000005 0x00000000000001
      end codes
[...]

[SOURCE]

Advertisements