[systemd-bugs] [Bug 62404] Fix 95-keymap.rules for MSI Wind U100

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Mar 26 09:13:26 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=62404

--- Comment #2 from maxtram95 at gmail.com ---
(In reply to comment #1)
> Just to clarify, pressing *one* key (Fn+F3) sends both a "touchpad off" and
> a "touchpad on" scan code with this patch, or the kernel driver already
> remembers the state and sends alternating codes of "off" and "on"? Which
> scan codes are these?

Okay, I will try to explain in details.

Before the mentioned commit in kernel the behavior was the following. When
Fn+F3 is pressed, scan code is generated. 'showkey -s' shows 0x74, 'showkey -k'
shows 191, and there is a mapping for this key in /lib/udev/keymaps/micro-star
- code 0xE4 to f21 (touchpad toggle key). I don't fully understand why 'showkey
-s' shows 0x74, and in udev it is 0xe4, but that mapping really works and maps
Fn+F3 to F21 key, which is touchpad toggle key. If I run '/lib/udev/keymap
input/event0 0xE4 reserved', the mapping disappears and Fn+F3 stops generating
F21 key code.

Fn+F3 on MSI Wind U100 toggles touchpad in hardware. The first press disables
touchpad and the second press enabled touchpad again. And msi-laptop driver is
only able to read current touchpad state. So it is not correct to send F21
(touchpad toggle key) key code, because F21 is intended to be processed by
desktop environment in case when hardware does not react on touchpad toggle key
press and when desktop environment should disable/enable touchpad in software.
But currently with that udev mapping we send F21 key code on Fn+F3 press and
that may lead to losing synchronization between hardware and software touchpad
states (switch to X11 session, press Fn+F3, touchpad is disabled both in
hardware and in software, then switch to VT1, press Fn+F3 again, touchpad is
enabled in hardware but still disabled in software in X11 session, so when you
switch again to X11 session, touchpad will be disabled forever, and pressing
Fn+F3 will not help, because touchpad will be disabled in software and enabled
in hardware or it will be disabled in hardware and enabled in software). So at
first, it's a bug, and we need to disable Fn+F3 -> F21 mapping for MSI Wind
U100, and the patch does that.

After the mentioned commit in kernel the support for MSI Wind U100 appeared in
msi-laptop driver. It means that this driver now handles Fn+F3 key presses,
reads the real touchpad state and sends either KEY_TOUCHPAD_ON or
KEY_TOUCHPAD_OFF depending on touchpad state. These codes are then mapped to
F22 and F23, which are used to inform desktop environment about current
touchpad state. Also, it is not correct to send both F21 and F22/F23 key codes
(F21 should be sent when hardware does not handle touchpad toggle key, and
F22/F23 should be send when it does), and it is another reason to disable Fn+F3
-> F21 mapping in udev.

So, after applying this patch, Fn+F3 key will not send F21 (touchpad toggle)
key code any more, and with fresh kernels separate F22/F23 (touchpad on/off)
key codes will be sent depending on current touchpad state (if touchpad is
turned on by Fn+F3 press, F22 code is sent, and if touchpad is turned off, F23
code is sent).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130326/16051b5e/attachment.html>


More information about the systemd-bugs mailing list