I've recently started using a media-center running OSMC (debian + kodi) on a Raspberry Pi 3. To control it, I use a remote from a different media center that emulates a keyboard. It works great for the most part, except some of the keys are non-repeating, which means they don't support long-press in kodi, since this is detected by key repetition within 250ms or something on that order.It makes perfect sense that these keys aren't repeating, we're talking power, mute, play/pause and home, but long-press would be nice on a remote with few buttons.As a solution, I'm thinking either Enabling repetition for these keys somehow. It has to be deep enough to effect kodi though.Remapping the keys to something else that is repeating. Kodi can easily handle remapping internally, so any unused letter or such could work.I've pursued the second solution so far, and it seems the best solution would be to use udev's hwdb-files. I've hit a bit of a snag there, though, as only two of the keys produce scancodes in showkey and both of these produce two keys (power produces 0x74 0xf4, mute 0x71 0xf1) and I'm not sure how to correctly input this in a hwdb-file. This is my attempt so far, treating the two codes as down/up. Neither this nor KEYBOARD_KEY_74f4 seems to work.evdev:input:b0003v2252p0120* KEYBOARD_KEY_74=y KEYBOARD_KEY_71=uThe other keys produce keycodes when checking those, but no scancodes. Another thread mentioned checking dmsg, which had logged:[ 2804.839920] keyboard: can't emulate rawmode for keycode 164[ 3319.596577] keyboard: can't emulate rawmode for keycode 172So the keys work and produce keycodes, but somehow no scancodes?To wrap up: What is wrong with my hwdb-file? Why can't I find the scancodes of the last two keys? Is what I'm attempting even possible or is there some easier way to accomplish it that I'm missing?
Make non-repeating keys repeating
debian;udev;input