2009-12-03 09:22:10

by Corentin Chary

[permalink] [raw]
Subject: Re: [PATCH 32/33] input: add KEY_WIRELESS_CYCLE

On Thu, Dec 3, 2009 at 9:57 AM, Dmitry Torokhov
<[email protected]> wrote:
> On Thu, Dec 03, 2009 at 09:51:59AM +0100, Corentin Chary wrote:
>> On Thu, Dec 3, 2009 at 9:21 AM, Dmitry Torokhov
>> <[email protected]> wrote:
>> > On Thu, Dec 03, 2009 at 09:12:52AM +0100, Corentin Chary wrote:
>> >> On Thu, Dec 3, 2009 at 8:54 AM, Dmitry Torokhov
>> >> <[email protected]> wrote:
>> >> > On Thu, Dec 03, 2009 at 08:45:16AM +0100, Corentin Chary wrote:
>> >> >> This keycode could be used in a lot of platform specific drivers.
>> >> >> For example, on Asus laptops, Fn+F2 allow to cycle trought wireless
>> >> >> drivers (bt/wl: off/off, on/off, off/on, on/on).
>> >> >>
>> >> >> Currently, these key are mapped to KEY_WLAN, and KEY_BLUETOOTH/KEY_WIMAX
>> >> >> are rarely used.
>> >> >>
>> >> >
>> >> > Is there any application support for such cycling? IOW does anyone cares
>> >> > to do such cycling?
>> >>
>> >> On Asus laptops (both asus and eeepc) the Fn+F2 key cycle
>> >> (bluetooth/wlan: on/on, on/off, off/on, off/off) on windows.
>> >> On Linux, it only produces a KEY_WLAN keycode.
>> >>
>> >
>> > I understand this. I guess the question is whether people working on
>> > system infrastructure (dbus, Networkmanager, etc) care about having such
>> > functionality on Linux? The reason I am asking is that we added all
>> > KEY_WIMAX and so on defines but I am not usre if anyone wants them.
>>
>> KEY_WIMAX may not be used a lot because there is not a lot of device
>> with such a key,
>> I think this is not the case for KEY_WIRELESS_CYCLE.
>>
>> The bad thing is that we will need to patch X11 (and Qt, for
>> kde/solid) to make it works.
>>
>> Maybe we should Cc dbus/network manager/solid/linux-wireless ?
>>
>
> That would be a good idea.

Here it is.

Dear system infrastructure people,
Do you think a KEY_WIRELESS_CYCLE key would have any application ?

--
Corentin Chary
http://xf.iksaif.net


2009-12-03 09:44:09

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 32/33] input: add KEY_WIRELESS_CYCLE

On Thu, 2009-12-03 at 10:22 +0100, Corentin Chary wrote:

> >> > I understand this. I guess the question is whether people working on
> >> > system infrastructure (dbus, Networkmanager, etc) care about having such
> >> > functionality on Linux? The reason I am asking is that we added all
> >> > KEY_WIMAX and so on defines but I am not usre if anyone wants them.
> >>
> >> KEY_WIMAX may not be used a lot because there is not a lot of device
> >> with such a key,
> >> I think this is not the case for KEY_WIRELESS_CYCLE.
> >>
> >> The bad thing is that we will need to patch X11 (and Qt, for
> >> kde/solid) to make it works.
> >>
> >> Maybe we should Cc dbus/network manager/solid/linux-wireless ?
> >>
> >
> > That would be a good idea.
>
> Here it is.
>
> Dear system infrastructure people,
> Do you think a KEY_WIRELESS_CYCLE key would have any application ?

Not really.

The naming of the key ultimately will not matter one bit, because it'll
be misnamed on most platforms anyway, unless we want to do DMI matching
or something to name the key. And even then, if there's a wifi key but
no bluetooth key, users may prefer to have the wifi key act as a cycle
key instead.

Therefore, this ought to all be policy in the rfkill daemon.
rfkill-input will be going away as soon as somebody writes a simple
daemon that allows doing such things, I really don't see us adding
support for a cycle key to the kernel code, and for the userspace code
it doesn't matter since users will configure it independent of the key
code anyway.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-12-03 11:22:59

by Will Stephenson

[permalink] [raw]
Subject: Re: [Kde-hardware-devel] [PATCH 32/33] input: add KEY_WIRELESS_CYCLE

On Thursday 03 December 2009 10:43:32 Johannes Berg wrote:
> On Thu, 2009-12-03 at 10:22 +0100, Corentin Chary wrote:
> > Dear system infrastructure people,
> > Do you think a KEY_WIRELESS_CYCLE key would have any application ?
>
> Not really.
>
> The naming of the key ultimately will not matter one bit, because it'll
> be misnamed on most platforms anyway, unless we want to do DMI matching
> or something to name the key. And even then, if there's a wifi key but
> no bluetooth key, users may prefer to have the wifi key act as a cycle
> key instead.
>
> Therefore, this ought to all be policy in the rfkill daemon.
> rfkill-input will be going away as soon as somebody writes a simple
> daemon that allows doing such things, I really don't see us adding
> support for a cycle key to the kernel code, and for the userspace code
> it doesn't matter since users will configure it independent of the key
> code anyway.

This sounds reasonable to me, as the wireless guy in the KDE camp. I don't
want to have to handle these keypresses in a user session anyway - I prefer
that NetworkManager picks up on them and notifies the client of the state
change.

Will

2009-12-03 15:01:44

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH 32/33] input: add KEY_WIRELESS_CYCLE

On Thu, Dec 03, 2009 at 10:22:16AM +0100, Corentin Chary wrote:

> Dear system infrastructure people,
> Do you think a KEY_WIRELESS_CYCLE key would have any application ?

Not really. I've got a KEY_RFKILL patch queued, with the intended
semantics being for rfkill-input to just toggle all devices. If a
userspace rfkill daemon is running, it could use that to implement the
cycle policy you want. I don't think we need both.

--
Matthew Garrett | [email protected]