[PATCH xkeyboard-config] Add evdev mappings for KEY_SOUND, KEY_UWB, KEY_WWAN and KEY_RFKILL

Bastien Nocera hadess at hadess.net
Mon May 15 06:50:20 UTC 2017


Hey,

Comments inline.

On Mon, 2017-05-15 at 08:36 +0200, Hans de Goede wrote:
> KEY_SOUND, KEY_WWAN and KEY_RFKILL are used on actual devices and
> current xproto master defines keysyms for these. Add mappings for
> these keys.
> 
> The XF86UWB keysm exists for quite a while now, as does the KEY_SOUND

"keysym has existed"

> evdev code for it, so lets adds a mapping for that too.

"let's add"

> Note that this replaces the I255 to XF86Hibernate mapping in
> xkb_symbols "evdev", I don't know where that came from, but it is
> wrong, I255 was until now not defined in keycodes/evdev and
> KEY_HIBERNATE is not defined in linux/input-event-codes.h .
> 
> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100970
> Cc: Bastien Nocera <hadess at hadess.net>
> Cc: Benjamin Berg <bberg at redhat.com>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  keycodes/evdev | 2 ++
>  symbols/inet   | 7 ++++---
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/keycodes/evdev b/keycodes/evdev
> index 624ac68..51a6e26 100644
> --- a/keycodes/evdev
> +++ b/keycodes/evdev
> @@ -281,6 +281,8 @@ default xkb_keycodes "evdev" {
>  	<I251> = 251;	// #define KEY_BRIGHTNESS_CYCLE    243
>  	<I252> = 252;	// #define KEY_BRIGHTNESS_ZERO     244
>  	<I253> = 253;	// #define KEY_DISPLAY_OFF         245
> +	<I254> = 254;	// #define KEY_WWAN                246
> +	<I255> = 255;	// #define KEY_RFKILL              247
>  
>  	// Fake keycodes for virtual keys
>  	<LVL3> =   92;
> diff --git a/symbols/inet b/symbols/inet
> index 5403e77..1e06aa9 100644
> --- a/symbols/inet
> +++ b/symbols/inet
> @@ -184,7 +184,7 @@ xkb_symbols "evdev" {
>      key <I218>   {      [ Print                 ]       };
>  //  key <I219>   {      [ ]       }; // KEY_HP
>      key <I220>   {      [ XF86WebCam            ]       };
> -//  key <I221>   {      [ ]       }; // KEY_SOUND
> +    key <I221>   {      [ XF86AudioPreset       ]       };

This is an existing keysym, but what does it correspond to?

>  //  key <I222>   {      [ ]       }; // KEY_QUESTION
>      key <I223>   {      [ XF86Mail              ]       };
>      key <I224>   {      [ XF86Messenger         ]       }; //
> KEY_CHAT
> @@ -210,13 +210,14 @@ xkb_symbols "evdev" {
>      key <I244>   {      [ XF86Battery           ]       };
>      key <I245>   {      [ XF86Bluetooth         ]       };
>      key <I246>   {      [ XF86WLAN              ]       };
> +    key <I247>   {      [ XF86UWB               ]       };

Feels weird using up a slot for a key that toggles an obsolete wireless
protocol...

>  //  key <I249>   {      [ ]       }; // KEY_VIDEO_NEXT  --  drive
> next video source
>  //  key <I250>   {      [ ]       }; // KEY_VIDEO_PREV  --  drive
> previous video source
>  //  key <I251>   {      [ ]       }; // KEY_BRIGHTNESS_CYCLE  
> --  bright up, max++ == min
>  //  key <I252>   {      [ ]       }; // KEY_BRIGHTNESS_ZERO  
> --  brightness off
>  //  key <I253>   {      [ ]       }; // KEY_DISPLAY_OFF  --  turn
> off display
> -//  key <I254>   {      [ ]       }; // KEY_WIMAX
> -    key <I255>   {      [ XF86Hibernate         ]       }; //
> KEY_HIBERNATE
> +    key <I254>   {      [ XF86WWAN              ]       }; //
> KEY_WWAN
> +    key <I255>   {      [ XF86RFKill            ]       }; //
> KEY_RFKILL
>  
>      key <FK13>   {      [ XF86Tools         ]       };
>      key <FK14>   {      [ XF86Launch5       ]       };

Cheers


More information about the xorg-devel mailing list