Signed-off-by: Keng-Yu Lin <[email protected]>
---
drivers/platform/x86/eeepc-wmi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
https://bugs.freedesktop.org/show_bug.cgi?id=31333
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index d399775..da00cbc 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -113,7 +113,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
{ KE_KEY, 0x32, { KEY_MUTE } },
{ KE_KEY, 0x5c, { KEY_F15 } }, /* Power Gear key */
{ KE_KEY, 0x5d, { KEY_WLAN } },
- { KE_KEY, 0x6b, { KEY_F13 } }, /* Disable Touchpad */
+ { KE_KEY, 0x6b, { KEY_F21 } }, /* Disable Touchpad */
{ KE_KEY, 0x82, { KEY_CAMERA } },
{ KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
{ KE_KEY, 0x88, { KEY_WLAN } },
--
1.7.1
On Fri, Feb 25, 2011 at 6:19 AM, Keng-Yu Lin <[email protected]> wrote:
> Signed-off-by: Keng-Yu Lin <[email protected]>
> ---
> drivers/platform/x86/eeepc-wmi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> https://bugs.freedesktop.org/show_bug.cgi?id=31333
>
> diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
> index d399775..da00cbc 100644
> --- a/drivers/platform/x86/eeepc-wmi.c
> +++ b/drivers/platform/x86/eeepc-wmi.c
> @@ -113,7 +113,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
> { KE_KEY, 0x32, { KEY_MUTE } },
> { KE_KEY, 0x5c, { KEY_F15 } }, /* Power Gear key */
> { KE_KEY, 0x5d, { KEY_WLAN } },
> - { KE_KEY, 0x6b, { KEY_F13 } }, /* Disable Touchpad */
> + { KE_KEY, 0x6b, { KEY_F21 } }, /* Disable Touchpad */
> { KE_KEY, 0x82, { KEY_CAMERA } },
> { KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
> { KE_KEY, 0x88, { KEY_WLAN } },
Hum, I'm not very comfortable with this patch now that we got
KEY_TOUCHPAD_TOGGLE.
I know, it doesn't work with current Xorg, but if we continue to
workaround that, it'll never be fixed.
Dmitry, Matthew, any advice ?
--
Corentin Chary
http://xf.iksaif.net
On Fri, Feb 25, 2011 at 07:52:11AM +0100, Corentin Chary wrote:
> On Fri, Feb 25, 2011 at 6:19 AM, Keng-Yu Lin <[email protected]> wrote:
> > Signed-off-by: Keng-Yu Lin <[email protected]>
> > ---
> > ?drivers/platform/x86/eeepc-wmi.c | ? ?2 +-
> > ?1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > https://bugs.freedesktop.org/show_bug.cgi?id=31333
> >
> > diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
> > index d399775..da00cbc 100644
> > --- a/drivers/platform/x86/eeepc-wmi.c
> > +++ b/drivers/platform/x86/eeepc-wmi.c
> > @@ -113,7 +113,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
> > ? ? ? ?{ KE_KEY, 0x32, { KEY_MUTE } },
> > ? ? ? ?{ KE_KEY, 0x5c, { KEY_F15 } }, /* Power Gear key */
> > ? ? ? ?{ KE_KEY, 0x5d, { KEY_WLAN } },
> > - ? ? ? { KE_KEY, 0x6b, { KEY_F13 } }, /* Disable Touchpad */
> > + ? ? ? { KE_KEY, 0x6b, { KEY_F21 } }, /* Disable Touchpad */
> > ? ? ? ?{ KE_KEY, 0x82, { KEY_CAMERA } },
> > ? ? ? ?{ KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
> > ? ? ? ?{ KE_KEY, 0x88, { KEY_WLAN } },
>
> Hum, I'm not very comfortable with this patch now that we got
> KEY_TOUCHPAD_TOGGLE.
> I know, it doesn't work with current Xorg, but if we continue to
> workaround that, it'll never be fixed.
>
> Dmitry, Matthew, any advice ?
I believe that the kernel should use KEY_TOUCHPAD_TOGGLE and userspace
should use udev's key re-mapping facilities while X is unable to process
keycodes above 255 to adjust to the keycode du jour. If all kernel
drivers were to use KEY_TOUCHPAD_TOGGLE then remapping would be much
easier (the utility would simply check capabilities for
KEY_TOUCHPAD_TOGGLE and do the remap).
Thanks.
--
Dmitry
On Fri, Feb 25, 2011 at 3:18 PM, Dmitry Torokhov
<[email protected]> wrote:
> I believe that the kernel should use KEY_TOUCHPAD_TOGGLE and userspace
> should use udev's key re-mapping facilities while X is unable to process
> keycodes above 255 to adjust to the keycode du jour. If all kernel
> drivers were to use KEY_TOUCHPAD_TOGGLE then remapping would be much
> easier (the utility would simply check capabilities for
> KEY_TOUCHPAD_TOGGLE and do the remap).
Can udev re-map a key code to another?
Am I correct that udev can only re-map a scan code to a specified key code.
On Fri, Feb 25, 2011 at 05:22:43PM +0800, Keng-Y? Lin wrote:
> On Fri, Feb 25, 2011 at 3:18 PM, Dmitry Torokhov
> <[email protected]> wrote:
> > I believe that the kernel should use KEY_TOUCHPAD_TOGGLE and userspace
> > should use udev's key re-mapping facilities while X is unable to process
> > keycodes above 255 to adjust to the keycode du jour. If all kernel
> > drivers were to use KEY_TOUCHPAD_TOGGLE then remapping would be much
> > easier (the utility would simply check capabilities for
> > KEY_TOUCHPAD_TOGGLE and do the remap).
>
> Can udev re-map a key code to another?
Not directly.
>
> Am I correct that udev can only re-map a scan code to a specified key code.
Right, so once you determined via capabilities that device emits
KEY_TOUCHPAD_TOGGLE you query the keymap (using EVIOCGKEYCODE2; by
index) and replace all entries that are mapped to KEY_TOUCHPAD_TOGGLE to
whatever you want.
Thanks.
--
Dmitry
Keng-Y? Lin [2011-02-25 17:22 +0800]:
> Can udev re-map a key code to another?
Not directly, as udev itself doesn't actually process the input
events. It just pokes the scan code -> keycode map into the kernel.
What it can do is to re-map an existing key (scan code) to a different
key code, which provides the same effect in most cases.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (http://www.ubuntu.com) | Debian Developer (http://www.debian.org)
On Fri, Feb 25, 2011 at 07:52:11AM +0100, Corentin Chary wrote:
> Hum, I'm not very comfortable with this patch now that we got
> KEY_TOUCHPAD_TOGGLE.
> I know, it doesn't work with current Xorg, but if we continue to
> workaround that, it'll never be fixed.
>
> Dmitry, Matthew, any advice ?
Yeah, I'd go with Dmitry's idea for now.
--
Matthew Garrett | [email protected]
On Fri, Feb 25, 2011 at 1:18 AM, Dmitry Torokhov
<[email protected]> wrote:
> On Fri, Feb 25, 2011 at 07:52:11AM +0100, Corentin Chary wrote:
>> On Fri, Feb 25, 2011 at 6:19 AM, Keng-Yu Lin <[email protected]> wrote:
>> > Signed-off-by: Keng-Yu Lin <[email protected]>
>> > ---
>> > ?drivers/platform/x86/eeepc-wmi.c | ? ?2 +-
>> > ?1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > https://bugs.freedesktop.org/show_bug.cgi?id=31333
>> >
>> > diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
>> > index d399775..da00cbc 100644
>> > --- a/drivers/platform/x86/eeepc-wmi.c
>> > +++ b/drivers/platform/x86/eeepc-wmi.c
>> > @@ -113,7 +113,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
>> > ? ? ? ?{ KE_KEY, 0x32, { KEY_MUTE } },
>> > ? ? ? ?{ KE_KEY, 0x5c, { KEY_F15 } }, /* Power Gear key */
>> > ? ? ? ?{ KE_KEY, 0x5d, { KEY_WLAN } },
>> > - ? ? ? { KE_KEY, 0x6b, { KEY_F13 } }, /* Disable Touchpad */
>> > + ? ? ? { KE_KEY, 0x6b, { KEY_F21 } }, /* Disable Touchpad */
>> > ? ? ? ?{ KE_KEY, 0x82, { KEY_CAMERA } },
>> > ? ? ? ?{ KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
>> > ? ? ? ?{ KE_KEY, 0x88, { KEY_WLAN } },
>>
>> Hum, I'm not very comfortable with this patch now that we got
>> KEY_TOUCHPAD_TOGGLE.
>> I know, it doesn't work with current Xorg, but if we continue to
>> workaround that, it'll never be fixed.
>>
>> Dmitry, Matthew, any advice ?
>
> I believe that the kernel should use KEY_TOUCHPAD_TOGGLE and userspace
> should use udev's key re-mapping facilities while X is unable to process
> keycodes above 255 to adjust to the keycode du jour. If all kernel
> drivers were to use KEY_TOUCHPAD_TOGGLE then remapping would be much
> easier (the utility would simply check capabilities for
> KEY_TOUCHPAD_TOGGLE and do the remap).
I submitted last month a patch to udev to do the scancode-to-F21
mapping. So that part should be covered for near term.
I also agree if we are going to change kernel side, we should change
to KEY_TOUCHPAD_TOGGLE in both eeepc-laptop and eeepc-wmi.
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=0d8b6be5f5238360d2d8e220d6da280f842c5358
Chris
於 五,2011-02-25 於 09:14 -0600,Chris Bagwell 提到:
> On Fri, Feb 25, 2011 at 1:18 AM, Dmitry Torokhov
> <[email protected]> wrote:
> > On Fri, Feb 25, 2011 at 07:52:11AM +0100, Corentin Chary wrote:
> >> On Fri, Feb 25, 2011 at 6:19 AM, Keng-Yu Lin <[email protected]> wrote:
> >> > Signed-off-by: Keng-Yu Lin <[email protected]>
> >> > ---
> >> > drivers/platform/x86/eeepc-wmi.c | 2 +-
> >> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >> >
> >> > https://bugs.freedesktop.org/show_bug.cgi?id=31333
> >> >
> >> > diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
> >> > index d399775..da00cbc 100644
> >> > --- a/drivers/platform/x86/eeepc-wmi.c
> >> > +++ b/drivers/platform/x86/eeepc-wmi.c
> >> > @@ -113,7 +113,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
> >> > { KE_KEY, 0x32, { KEY_MUTE } },
> >> > { KE_KEY, 0x5c, { KEY_F15 } }, /* Power Gear key */
> >> > { KE_KEY, 0x5d, { KEY_WLAN } },
> >> > - { KE_KEY, 0x6b, { KEY_F13 } }, /* Disable Touchpad */
> >> > + { KE_KEY, 0x6b, { KEY_F21 } }, /* Disable Touchpad */
> >> > { KE_KEY, 0x82, { KEY_CAMERA } },
> >> > { KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
> >> > { KE_KEY, 0x88, { KEY_WLAN } },
> >>
> >> Hum, I'm not very comfortable with this patch now that we got
> >> KEY_TOUCHPAD_TOGGLE.
> >> I know, it doesn't work with current Xorg, but if we continue to
> >> workaround that, it'll never be fixed.
> >>
> >> Dmitry, Matthew, any advice ?
> >
> > I believe that the kernel should use KEY_TOUCHPAD_TOGGLE and userspace
> > should use udev's key re-mapping facilities while X is unable to process
> > keycodes above 255 to adjust to the keycode du jour. If all kernel
> > drivers were to use KEY_TOUCHPAD_TOGGLE then remapping would be much
> > easier (the utility would simply check capabilities for
> > KEY_TOUCHPAD_TOGGLE and do the remap).
>
> I submitted last month a patch to udev to do the scancode-to-F21
> mapping. So that part should be covered for near term.
>
> I also agree if we are going to change kernel side, we should change
> to KEY_TOUCHPAD_TOGGLE in both eeepc-laptop and eeepc-wmi.
>
> http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=0d8b6be5f5238360d2d8e220d6da280f842c5358
>
Found acer-wmi also have Touchpad toggle but mapping to F22
{KE_KEY, 0x82, {KEY_F22} }, /* Touch Pad On/Off */
Will also send patch to udev keymap first, then change the wmi driver
mapping to KEY_TOUCHPAD_TOGGLE.
Thank's
Joey Lee
On Fri, Feb 25, 2011 at 11:14 PM, Chris Bagwell <[email protected]> wrote:
>
> I submitted last month a patch to udev to do the scancode-to-F21
> mapping. So that part should be covered for near term.
>
> I also agree if we are going to change kernel side, we should change
> to KEY_TOUCHPAD_TOGGLE in both eeepc-laptop and eeepc-wmi.
>
> http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=0d8b6be5f5238360d2d8e220d6da280f842c5358
>
> Chris
>
Thanks Chris for the information. I also tested; it works.
I will re-send a eeepc-wmi patch with KEY_TOUCHPAD_TOGGLE.
Signed-off-by: Keng-Yu Lin <[email protected]>
---
drivers/platform/x86/eeepc-wmi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index d399775..a9f75e2 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -113,7 +113,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
{ KE_KEY, 0x32, { KEY_MUTE } },
{ KE_KEY, 0x5c, { KEY_F15 } }, /* Power Gear key */
{ KE_KEY, 0x5d, { KEY_WLAN } },
- { KE_KEY, 0x6b, { KEY_F13 } }, /* Disable Touchpad */
+ { KE_KEY, 0x6b, { KEY_TOUCHPAD_TOGGLE } }, /* Toggle Touchpad */
{ KE_KEY, 0x82, { KEY_CAMERA } },
{ KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
{ KE_KEY, 0x88, { KEY_WLAN } },
--
1.7.1
Applied, thanks.
--
Matthew Garrett | [email protected]