Kodi Community Forum

Full Version: devinput remote & virtual keyboard/numpad window problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I've switched from LIRC to kernel event dev input, using ir_keytables stuff.

When I use the PVR plugin ( vnsi ), while watching a channel, I can't input multiple digit channels number. It only keeps the first keypress and then zap to this channel.
Using LIRC was working ok.
'remote sends keypresses'. is enabled.

Multiple numeric keys input seems to work on other places, I can type correctly any digit values while watching a movie to jump in time.

I use up to date Frodo & vnsi plugins:
Quote: XBMC (12.3 Git:20131212-9ed3e58), Platform: Linux (Debian GNU/Linux testing (jessie), 3.9-1-686-pae i686)

Remote is Microsoft MCE RC6 type with Soundgraph Imon module.

Here is the log when I try to switch to channel number 41, but it switch to channel 4.


Quote:20:07:37 T:3006638656 DEBUG: Keyboard: scancode: 53, sym: 0104, unicode: 0000, modifier: 0
[20:07:37 T:3006638656 DEBUG: OnKey: numpadfour (f074) pressed, action is Number4

20:07:37 T:3006638656 DEBUG: ------ Window Init (DialogNumeric.xml) ------
20:07:37 T:3006638656 DEBUG: Window DialogNumeric.xml was already loaded
20:07:37 T:3006638656 DEBUG: Alloc resources: 14.29m
20:07:37 T:3006638656 DEBUG: CAnnouncementManager - Announcement: OnInputRequested from xbmc
20:07:37 T:3006638656 DEBUG: GOT ANNOUNCEMENT, type: 128, from xbmc, message OnInputRequested
20:07:37 T:2515573568 DEBUG: CPullupCorrection: pattern lost on diff 60000.000000
20:07:37 T:3006638656 DEBUG: Keyboard: scancode: 57, sym: 0101, unicode: 0000, modifier: 0
20:07:37 T:3006638656 DEBUG: OnKey: numpadone (f071) pressed, trying keyboard action 61553

20:07:37 T:2618071872 DEBUG: CDVDPlayer::CheckContinuity - resync backward :2, prev:94183453630.000000, curr:94183053630.000000, diff:-400000.000000
20:07:38 T:3006638656 DEBUG: ------ Window Deinit (DialogNumeric.xml) ------
20:07:38 T:3006638656 DEBUG: CAnnouncementManager - Announcement: OnInputFinished from xbmc
20:07:38 T:3006638656 DEBUG: GOT ANNOUNCEMENT, type: 128, from xbmc, message OnInputFinished
20:07:38 T:3006638656 DEBUG: ------ Window Init (DialogSeekBar.xml) ------
20:07:38 T:3006638656 DEBUG: Window DialogSeekBar.xml was already loaded
20:07:38 T:3006638656 DEBUG: Alloc resources: 0.02m
20:07:38 T:2507180864 DEBUG: CDVDPlayerAudio:: Discontinuity2 - was:94182035596.843338, should be:94182055596.843338, error:20000.000000
20:07:38 T:2507180864 DEBUG: CSoftAEStream::Flush
20:07:38 T:2507180864 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
20:07:38 T:2515573568 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
20:07:38 T:2618071872 DEBUG: CDVDPlayer::SetCaching - caching state 3
20:07:38 T:2618071872 DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'FRANCE 4'
20:07:38 T:2618071872 DEBUG: PVR - SaveCurrentChannelSettings - no custom channel settings for channel 'FRANCE 2'
20:07:38 T:2618071872 DEBUG: AddOnLog: VDR VNSI Client: changing to channel 4

20:07:38 T:2939333440 DEBUG: CSoftAE::Run - Sink restart flagged
20:07:38 T:2939333440 INFO: CSoftAE::InternalOpenSink - keeping old sink with : AE_FMT_FLOAT, FL,FR, 48000hz
20:07:38 T:2939333440 DEBUG: CSoftAE::InternalOpenSink - Using speaker layout: 5.1
20:07:38 T:2939333440 DEBUG: CSoftAE::InternalOpenSink - Internal Buffer Size: 16384
20:07:38 T:2618071872 NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'FRANCE 4'

I've searched a lot on the net, but haven't found anybody having the same issue.

Thanks.
In addition to previous post, I've investigated a bit more and found it's not related to PVR but it does happened in all popup window with virtual keyboard/numpad in XBMC.
I've changed the title of the thread accordingly.

There's no key control, but only the Return/OK & arrows one:

Here's an example in a network port setting pop-up window setting:

Quote:00:45:18 T:3006593600 DEBUG: OnKey: numpadthree (f073) pressed, trying keyboard action 61555
00:45:19 T:3006593600 DEBUG: Keyboard: scancode: 53, sym: 0104, unicode: 0000, modifier: 0
00:45:19 T:3006593600 DEBUG: OnKey: numpadfour (f074) pressed, trying keyboard action 61556
00:45:19 T:3006593600 DEBUG: Keyboard: scancode: 54, sym: 0105, unicode: 0000, modifier: 0
00:45:19 T:3006593600 DEBUG: OnKey: numpadfive (f075) pressed, trying keyboard action 61557
00:45:23 T:3006593600 DEBUG: Keyboard: scancode: 71, sym: 0114, unicode: 0000, modifier: 0: 0
00:47:01 T:3006593600 DEBUG: OnKey: return (f00d) pressed, trying keyboard action 61453
00:47:01 T:3006593600 DEBUG: ------ Window Deinit (DialogNumeric.xml) ------
00:47:01 T:3006593600 DEBUG: CAnnouncementManager - Announcement: OnInputFinished from xbmc
00:47:01 T:3006593600 DEBUG: GOT ANNOUNCEMENT, type: 128, from xbmc, message OnInputFinished


but it works ok if I enter the port number wthout opening the pop-up window ( from the Settings page directly ) :

Quote:00:55:33 T:3006593600 DEBUG: Keyboard: scancode: 57, sym: 0101, unicode: 0000, modifier: 0
00:55:33 T:3006593600 DEBUG: OnKey: numpadone (f071) pressed, trying keyboard action 61553
00:55:33 T:3006593600 DEBUG: OnKey: numpadone (f071) pressed, action is Number1
00:55:34 T:3006593600 DEBUG: Keyboard: scancode: 58, sym: 0102, unicode: 0000, modifier: 0
00:55:34 T:3006593600 DEBUG: OnKey: numpadtwo (f072) pressed, trying keyboard action 61554
00:55:34 T:3006593600 DEBUG: OnKey: numpadtwo (f072) pressed, action is Number2
00:55:36 T:2939288384 DEBUG: Suspended the Sink
The problem is that unicode is zero in your case. should look like this:

Code:
11:07:06 T:140167661762432   DEBUG: Keyboard: scancode: 0x53, sym: 0x0104, unicode: 0x0034, modifier: 0x1000
11:07:06 T:140167661762432   DEBUG: OnKey: numpadfour (0xf074) pressed, trying keyboard action f134

Note the modifier. Your remote sends the scancodes of the numeric keypad but without numlock. Make your remote send the numbers: KEY_1, not KEY_NUMERIC_1
Thanks for taking the time to give a look FernetMenta.

This sounds quiet logical. I'm still a bit lost, cause if I check with ir_keytable -t it gives KEY_KP1 KEY_KP2, etc.. :
Quote:1389351783.019471: event type EV_MSC(0x04): scancode = 0x200001e
1389351783.019471: event type EV_KEY(0x01) key_down: KEY_KP1(0x0001)
1389351783.019471: event type EV_SYN(0x00).
1389351783.115468: event type EV_MSC(0x04): scancode = 0x200001e
1389351783.115468: event type EV_SYN(0x00).
1389351783.227468: event type EV_MSC(0x04): scancode = 0x200001e
1389351783.227468: event type EV_SYN(0x00).
1389351783.323470: event type EV_KEY(0x01) key_up: KEY_KP1(0x0001)
1389351783.323470: event type EV_SYN(0x00).
1389351784.379485: event type EV_MSC(0x04): scancode = 0x200001f
1389351784.379485: event type EV_KEY(0x01) key_down: KEY_KP2(0x0001)
1389351784.379485: event type EV_SYN(0x00).
1389351784.475486: event type EV_MSC(0x04): scancode = 0x200001f
1389351784.475486: event type EV_SYN(0x00).
1389351784.579486: event type EV_MSC(0x04): scancode = 0x200001f
1389351784.579486: event type EV_SYN(0x00).
1389351784.683488: event type EV_KEY(0x01) key_up: KEY_KP2(0x0001)
1389351784.683488: event type EV_SYN(0x00).
1389351785.571502: event type EV_MSC(0x04): scancode = 0x2000020
1389351785.571502: event type EV_KEY(0x01) key_down: KEY_KP3(0x0001)
1389351785.571502: event type EV_SYN(0x00).
1389351785.667498: event type EV_MSC(0x04): scancode = 0x2000020
1389351785.667498: event type EV_SYN(0x00).
1389351785.779503: event type EV_MSC(0x04): scancode = 0x2000020
1389351785.779503: event type EV_SYN(0x00).
1389351785.875503: event type EV_KEY(0x01) key_up: KEY_KP3(0x0001)


Ive tried to edit the ir-keytable keymap replacing KEY_KP1 by KEY_1 , etc
But then xbmc detect other characters ( typing 1, 2 3 here) :

Quote:12:08:39 T:3005974336 DEBUG: Keyboard: scancode: 0a, sym: 0026, unicode: 0026, modifier: 0
12:08:39 T:3005974336 DEBUG: OnKey: ampersand (f026) pressed, action is
12:08:40 T:3005974336 DEBUG: Keyboard: scancode: 0b, sym: 00e9, unicode: 00e9, modifier: 0
12:08:40 T:3005974336 DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
12:08:40 T:3005974336 DEBUG: Previous line repeats 3 times.
12:08:40 T:3005974336 DEBUG: OnKey: 0 (f200) pressed, action is
12:08:40 T:3005974336 DEBUG: Keyboard: scancode: 0c, sym: 0022, unicode: 0022, modifier: 0
12:08:40 T:3005974336 DEBUG: OnKey: doublequote (f022) pressed, action is


Where am I supposed to change this numlock thing ?
Something doesn't sounds logical to me Smile

Cheers.
This is not XBMC related. It's easiest to test with xev, XBMC sees the same thing.

Quote:Where am I supposed to change this numlock thing ?

What do you want to change? Pushing KP_4 on a real keyboard without numlock won't print number 4 either. I have a remote configured to send KEY_1 and it works as expected on Ubuntu Saucy.

evdev interprets the keys as given by the ir table
evdev events are translated into x11 keys, allowing user maps in .Xmodmap

Something must go wrong on your system during those stages.
I can't change the IR code of my remote, it's a default Microsoft MCE remote, I use with the imon ir receiver from my Zalman case.
There's no num_lock key on it either.

and changing the imon ir-keytable keymap from KEY_KP1 to KEY_1 send then "&" character as if there's no num_lock too ( french keyboard map here ) . Same problm.

I'd like to understand what's wrong anyway, but for now it's a mess.


The thing I've done so far to make it work is using LIRC with devinput driver. This is a dirty tweak , but I can map what I want this way.
(2014-01-09, 21:15)hotlobster Wrote: [ -> ]Hi

I've switched from LIRC to kernel event dev input, using ir_keytables stuff.

<snip stuff about it being now broken>

Using LIRC was working ok.

So you tried to fix something that was working as it should?
checkout X11/xkb/keycodes/evdev. this maps evdev codes to symbolic keys: 10 (0xa) to <AE01>. <AE01> in general is "1" but depends on the keyboard layout chosen by X11. you might want to change the keyboard layout. see setxkbmap

Quote:So you tried to fix something that was working as it should?

devinput driver for lirc is ugly and you need to ignore input by X11.