New Remote - Longpress Modifier?

Hey,
just got my vero4k and i love it.
I also like the small remote tho im missing 2 or 3 functions i would like to change or add.

I have my custom keymap working besides any longpress modifiers. Those wont work at all.
Is this not supported with the latest official remote?

Thanks!

There are some changes I’d like to make, but I haven’t received enough testing yet.

Will check this out tomorrow and test it on my device.
Im wondering tho cause i am using the usb dongle for the remote and not the externel IR Adapter. Is this still relevant? i guess yes because lirc is showing up in debugging even with this setup, just wanted to make sure :slight_smile:

The patch is for eventlircd.
OSMC’s RF remote uses eventlircd for processing signals.

Sam

hi sam
Had some time to do more testing

First i just removed the --repeat-filter param and not installed any other version of eventlircd
This made the remote much more responsive (as expected), maybe a bit to responsive but i would still prefer it vs the standard osmc setting.

This didnt change anything for my longpress setting tho.

After that i installed the version from the TESTING thread. in my opinion it was slower than the current default and no change to the current version without the param (as expected i guess). No changes to my longpress problems.

But i didnt want to give up yet so i created my own stripped down Lircmap.xml and remote.xml.

Lircmap.xml

<lircmap>

        <remote device="linux-input-layer">
                <altname>cx23885_remote</altname>
		<menu>KEY_HOME</menu>
		<info>KEY_INFO</info>
                <left>KEY_LEFT</left>
                <right>KEY_RIGHT</right>
                <up>KEY_UP</up>
                <down>KEY_DOWN</down>
                <select>KEY_OK</select>
                <back>KEY_BACK</back>
                <title>KEY_TITLE</title>
                <play>KEY_PLAY</play>
                <stop>KEY_STOP</stop>
                <volumeplus>KEY_VOLUMEUP</volumeplus>
                <volumeminus>KEY_VOLUMEDOWN</volumeminus>
        </remote>
</lircmap>

remote.xml

<keymap>
	<global>
        <remote>
			<menu>Notification(OSMC Remote, Home, 3)</menu>
			<menu mod="longpress">Notification(OSMC Remote, Home - Longpress, 3)</menu>
			<info>Notification(OSMC Remote, Info, 3)</info>
			<info mod="longpress">Notification(OSMC Remote, Info - Longpress, 3)</info>
			<select>Notification(OSMC Remote, OK, 3)</select>
			<select mod="longpress">Notification(OSMC Remote, OK - Longpress, 3)</select>
		</remote>
	</global>
	<fullscreenvideo>
		<remote>
			<key id="37">XBMC.ActivateWindow(Home)</key>
		</remote>
	</fullscreenvideo>
</keymap>

The files seem to be read correctly but with those i now have the problem that my buttons get always detected as longpress.
The repeat-flag param doesnt change this.

This is the kodi debug output of this. TEST1 is a single button press and TEST2 is a long press.

TEST
13:29:27.671 T:4081373776   DEBUG: LIRC: Update - NEW at 126873:66 0 KEY_HOME linux-input-layer (KEY_HOME)
13:29:27.671 T:4081373776   DEBUG: OnKey: 247 (0xf7, obc8) pressed, action is Notification(OSMC Remote, Home - Longpress, 3)
13:29:27.687 T:4081373776   DEBUG: LIRC: Update - NEW at 126889:66 0 KEY_HOME_UP linux-input-layer (KEY_HOME_UP)
TEST2
13:29:52.504 T:4081373776   DEBUG: LIRC: Update - NEW at 151706:66 0 KEY_HOME linux-input-layer (KEY_HOME)
13:29:52.505 T:4081373776   DEBUG: OnKey: 247 (0xf7, obc8) pressed, action is Notification(OSMC Remote, Home - Longpress, 3)
13:29:54.938 T:4081373776   DEBUG: Previous line repeats 52 times.
13:29:54.938 T:4081373776   DEBUG: LIRC: Update - NEW at 154139:66 0 KEY_HOME_UP linux-input-layer (KEY_HOME_UP)
13:30:02.077 T:3658285824   DEBUG: script.module.osmcsetting.updates :  - blurp 763 - Home.xml

After a bit more researching i stumbled over this:

So its seems this is a kodi limitation at the moment. Is the workaround, described in post , possible on the vero 4k?

Yes, in theory that workaround is possible

Ok after shutting down eventlircd (sudo systemctl stop eventlircd) the remote now works in keyboard mode i guess and the longpress modifiers works now fine. As i dont need to connect any IR remotes right now this works for me.

What would be the best solution to disable eventlircd at boot up? (update save perhaps as well? )

sudo systemctl disable eventlircd will probably do the trick.

We use eventlircd to remap a couple of buttons however; so the keycap may not behave as expected unless you modify the presses.

Can you post your keymap? Maybe we should bypass eventlircd and fix it up via Kodi.

Sam

i have not completely configured my remote yet but here are the key id (collected with the keymapper addon)

OSMC Remote - without eventlircd
Key IDs:
	Home: 	61576 
	Info:	61513
	UP:	61568
	DOWN:	61569
	LEFT:	61570
	RIGHT:	61571
	OK:	61453
	BACK:	61448
	MENU:	61507
	PLAY:	not recognized
	STOP:	61628
	VOL+:	61501
	VOL-:	61485

Play Button doesnt register in the addon for some reason but it is mapped to playpause by default.
In general default keymap works quite well

Here is my temp keyboard.xml with some mods:

<keymap>
	<home>
		<keyboard>
			<!-- Home -->
			<key id="61576">fullscreen</key>
		</keyboard>
	</home>
	<global>
        <keyboard>
			<!-- Home -->
			<key id="61576">fullscreen</key>
			<key id="61576" mod="longpress">activatewindow(home)</key>
		</keyboard>
	</global>
	<fullscreenvideo>
		<keyboard>
			<!-- Home -->
			<key id="61576">activatewindow(home)</key>
			<!-- Home Longpress -->
			<key id="61576" mod="longpress">activatewindow(home)</key>
			<!-- Menu -->
			<key id="61507">OSD</key>
			<!-- Menu Longpress -->
			<key id="61507" mod="longpress">ActivateWindow(MyVideoPlaylist) </key>
			<!-- Info Longpress -->
			<key id="61513" mod="longpress">CodecInfo</key>
			<!-- Up Longpress -->
			<key id="61568" mod="longpress">NextSubtitle</key>
			<!-- Down Longpress -->
			<key id="61569" mod="longpress">AudioNextLanguage</key>
		</keyboard>
	</fullscreenvideo>
</keymap>

I added quick switching for subtitles and audio tracks for example and plan to add some more needed features for me in the future like turning off the tv using long home press.

@sam_nazarko
Would be interested in longpress modifier for the OSMC remote as well. Are you planning any official short-term modifications or should I try using the approach by @ntuseracc for now?

I’m not planning on making any changes just yet

Sam

Maybe an option to the myosmc app could be added in the future to disable eventlircd in case you only want to use supplied remote or another bluetooth/keyboard remote with a dongle.

@boehan:
if you are only using the osmc default remote with the usb dongle (and no other IR remote) you can follow this:

Stop evenlircd:
sudo systemctl stop eventlircd

and test if the the remote is still working in kodi, if yes you can disable the service completely using:

sudo systemctl disable eventlircd

But i guess an update could revert this?

Then use the keymapper addon to create a custom profile for the remote or do it manually using the key ids i posted above. Im not sure right now if the keymapper addon supports longpress so maybe you have to edit it manually anyway, the file is located at “~/.kodi/userdata/keymaps/gen.xml”
To test you keymap after a manual edit just restart kodi using:
sudo systemctl restart mediacenter

Keep in mind that you may need some buttons to be pressed continuously in certain KODI Views (Volume and directional controls)

Currently, eventlircd is still needed for the OSMC RF remote buttons to work fully and as expected. If this wasn’t necessary, we wouldn’t include an evmap and the remote would skip this pathway.

@sam_nazarko:
but why is it working then for me without eventlircd running?
Ok the default keymap is not perfect imo but every button works or is this something that could easily change with another update.

As it seems right now i would only add a custom keymap that configures basic functions and allows user to customize it further if they want to.

Dont want to critize or anything :wink: maybe im missing something i dont fully understand but im eager to learn more about this little box!

eventlircd is used for key adjust, so it’s necessary at this time

I’m having the same problem with my new Vero 4K. Longpress doesn’t work out of the box, which is something I’d expect to.

Disabling eventlircd doesn’t stick after a reboot - I guess something has dependencies on it and systemd starts it regardless of it being disabled.

Using systemctl mask eventlircd does work.

@panni:
Thanks for the Tip.

1 Like

This method still works with Leia 18.2-RC.

Although it seems like some key IDs have changed. Stop is now 61952.

@sam_nazarko has the longpress support been included by now? (this ticket is over a year old)

I have no issue with manually disabling eventlircd and creating my own keymap. Just curious.