Longpress in kodi only works for keyboards, not remotes that reach kodi as lirc events.
You can disable the Linux event -> lirc event translation, eg by creating an empty eventlircd udev rule:
: > /storage/.config/udev.rules.d/98-eventlircd.rules
then the remote buttons/keys reach kodi like standard keyboard input.
There's one drawback though: kodi currently can't deal with a lot of keycodes used on remotes, eg KEY_OK, KEY_CHANNELUP/DOWN and a bunch of others won't work. So you'll have to use different keycodes in your keymap (eg KEY_ENTER instead of KEY_OK).
so long,
Hias