Bug 52419 - [bug] weston-terminal doesn't accept input from keypad
Summary: [bug] weston-terminal doesn't accept input from keypad
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 23:08 UTC by Brian Lovin
Modified: 2012-11-27 23:08 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
handle keypad symbols in weston-terminal (2.23 KB, patch)
2012-07-24 01:44 UTC, Daniel Stone
Details | Splinter Review
inherit initial modifier state from xkb (3.63 KB, patch)
2012-08-18 12:23 UTC, Daniel Stone
Details | Splinter Review
inherit initial modifier state from xkb (not broken) (3.61 KB, patch)
2012-08-18 12:25 UTC, Daniel Stone
Details | Splinter Review

Description Brian Lovin 2012-07-23 23:08:53 UTC
System Environment:
--------------------------
Distro: Ubuntu 12.04
Arch: x86_64
glproto master ec1eec4355ee4a6c5134f2178192f10b6d28a87a
mesa master 82fc813ca870c4002502e098519bead7bec1a7e8
wayland master eadb68ec32df8ee54ccba175d19adcdedfaa5015
pixman master 56321eff65832791252c7c324930d14c44d4d5f7
weston master 2327d1f490a5362e6b6199ca68b14d11e2f13408
drm master ebd7904877d08525beb5039e4ea2f5b6c0a7c23f
cairo master 21e3f2e9034b64131075d82a4e34868dc72f2249
libX11 master 8042f88ace33573f9d0dfaa21ed54ac7cef266d5
macros master 0890e4003aacfa7113ab3f4e3ad7c5636f8e922a
libxkbcommon master fe4f990902c7cd8f395b9f3be14dc6e8cad7cae9
dri2proto master 4eeacce4c4a300b938b7e3fb78a8e443c491780b
kbproto master 391a1f6de6315fc0196d407d800597488315ccc

Detailed Description:
-----------------------------
Run weston-terminal, then attempt to input numbers or press enter by using the numpad on the keyboard. No characters will be entered into weston-terminal.

Steps to Reproduce:
----------------------------
1. start weston under X11 or DRM mode
2. ./weston-terminal
3. Use keypad to try and enter data into the weston-terminal
Comment 1 Kristian Høgsberg 2012-07-24 01:35:26 UTC
Oh, yea, I see that too... Daniel?
Comment 2 Daniel Stone 2012-07-24 01:44:24 UTC
Created attachment 64579 [details] [review]
handle keypad symbols in weston-terminal

This compiles and may even work, but I don't have anything with a keypad to hand, so.
Comment 3 Scott Moreau 2012-07-24 03:24:32 UTC
(In reply to comment #2)
> Created attachment 64579 [details] [review] [review]
> handle keypad symbols in weston-terminal
> 
> This compiles and may even work, but I don't have anything with a keypad to
> hand, so.

Hi Daniel,

I tested this patch and it seems that it works. However, there is a strange behavior where the keypad numbers act as arrow keys, even though numlock is toggled on. Toggling it off, they still behave as arrows. Toggling it back on then causes the numbers to show numbers as expected. Subsequent toggling behaves as expected thereafter. This is a per-weston instance problem, not per-terminal instance.
Comment 4 Philipp Brüschweiler 2012-08-18 11:42:43 UTC
http://lists.freedesktop.org/archives/wayland-devel/2012-August/004968.html

Does this work better?
Comment 5 Philipp Brüschweiler 2012-08-18 12:18:05 UTC
Hmm, my patch only works for printable characters, the others will have to be handled similarly as in Daniel's patch.

(In reply to comment #3)
> Hi Daniel,
> 
> I tested this patch and it seems that it works. However, there is a strange
> behavior where the keypad numbers act as arrow keys, even though numlock is
> toggled on. Toggling it off, they still behave as arrows. Toggling it back on
> then causes the numbers to show numbers as expected. Subsequent toggling
> behaves as expected thereafter. This is a per-weston instance problem, not
> per-terminal instance.

I could actually reproduce this issue in X. The first time I activate the numpad keys on my laptop keyboard in a new workspace, they work as arrow keys. Subsequent activation works as expected.
Comment 6 Daniel Stone 2012-08-18 12:22:59 UTC
(In reply to comment #3)
> I tested this patch and it seems that it works. However, there is a strange
> behavior where the keypad numbers act as arrow keys, even though numlock is
> toggled on. Toggling it off, they still behave as arrows. Toggling it back on
> then causes the numbers to show numbers as expected. Subsequent toggling
> behaves as expected thereafter. This is a per-weston instance problem, not
> per-terminal instance.

Hmm.  How is numlock getting set initially? Are you pressing it by hand, or is it getting inherited from the environment? Are you running DRM or X11? If using X11, it might just be a problem with getting the initial NumLock state - I'll attach a patch in a sec which might help with that.
Comment 7 Daniel Stone 2012-08-18 12:23:38 UTC
Created attachment 65734 [details] [review]
inherit initial modifier state from xkb

This requires XCB/XKB, but should hopefully fix things up a bit.
Comment 8 Daniel Stone 2012-08-18 12:25:18 UTC
Created attachment 65735 [details] [review]
inherit initial modifier state from xkb (not broken)

Aaaarrrrgggghhhhh.  Wrong version.
Comment 9 Kristian Høgsberg 2012-08-29 18:50:35 UTC
(In reply to comment #8)
> Created attachment 65735 [details] [review] [review]
> inherit initial modifier state from xkb (not broken)
> 
> Aaaarrrrgggghhhhh.  Wrong version.

Did this go to the list?
Comment 10 Kristian Høgsberg 2012-10-29 18:16:04 UTC
There's two issues in this bug.  One is that numlock keys didn't work in an earlier xkbcommon version (which I was able to reproduce in comment 1).  This is fixed now in xkbcommon 0.2.  The other issues was about not correctly inheriting the xkb modifier state, which is fixed by Daniels patch in comment 8.  I've rebased that patch on master and pushed it, so I'll close this bug now.
Comment 11 Brian Lovin 2012-11-27 23:08:54 UTC
Changing to verified.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.