New Remote - Longpress Modifier?

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.

No – I don’t think it will ever come to eventlircd.
Working on something slightly different

Sam

Sam, what’s the status of this? Is there a way to map a long press of the Vero remote?

It’s still a work in progress.

Hey @sam_nazarko, I wonder If you could help. I’ve implemented a custom keymap based on this thread to get longpress working before the latest March update.

I’m now trying to unwind my customisations.

I disabled eventlircd using systemctl mask eventlircd so it’s not running anymore. Do I need to restart it?

I’ve got a custom keymap at ~/.kodi/userdata/keymaps/osmc-remote.xml, but after the March update there’s nothing else in that folder. I understand as per this guide there should be a file called gen.xml which includes the new config. How do I get that file?

Also the key ids I’ve used are different to what’s mentioned in the guide. My remote seems to be playing up now. Should I be using the ids from the guide?

Thanks

The new remote keymap does not utilise eventlircd at all, so there’s no need to disable it.
The osmc-remote.xml will be installed under system keymaps and not the local userdata directory.

The OSMC remotes no longer use eventlircd so it doesn’t really matter what is going on with that. That keymap file you have will load from that location and there is no issue with that. The gen.xml file is what keymap editor makes. If you never installed and opened that add-on then you will not have that file. I just referenced it in my guide to keep things simple. As for the Key id’s you will need to change them if you want to keep using your custom keymap. To work around some language issues and provide uniformity we have changed some of the layout at the system level. If you look at the last section of that guide in “technical” the first section lists the names or id’s that you would need to use.

Also note that this new keymap is quite a bit more complex than what you normally see (over 500 lines) so you might find that disabling the new custom keymap may be favorable if you are happy with the one you made (otherwise they load on top of each other). Otherwise if you want help integrating the two you could post what your using and let me take a look and I may be able to help.