# Re: \[PATCH v2 3/3\] HID: asus: change mapping from KEY\_WLAN to KEY\_RFKILL

- From: Benjamin Tissoires \<hidden\>
- Date: 2017-03-13 13:17:43 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2017/03/8929460
- Thread: https://ratatoskr.run/linux-input/2017/03/8929421/t.md

```text
On Mar 09 2017 or thereabouts, Matjaz Hegedic wrote:
> The input mapping code incorrectly maps the Airplane Mode button to
> KEY_WLAN, which stands for WiFi toggle, but doesn't affect Bluetooth
> (and other active radios) which is expected behavior for Airplane
> Mode.
> 
> The fix replaces KEY_WLAN with the more appropriate KEY_RFKILL.
> 
> The declared usage code 0x88 corresponds to Airplane Mode button on
> all keyboards handled by hid-asus (I2C netbook keyboards and USB
> RoG series keyboards), so the fix doesn't introduce any
> inconsistencies across different models.
> 
> Signed-off-by: Matjaz Hegedic <redacted>
> ---

The series is:
Reviewed-by: Benjamin Tissoires <redacted>

>  drivers/hid/hid-asus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index e0de54b..bacba97 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -226,7 +226,7 @@ static int asus_input_mapping(struct hid_device *hdev,
>  		case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF);		break;
>  		case 0x6c: asus_map_key_clear(KEY_SLEEP);		break;
>  		case 0x82: asus_map_key_clear(KEY_CAMERA);		break;
> -		case 0x88: asus_map_key_clear(KEY_WLAN);			break;
> +		case 0x88: asus_map_key_clear(KEY_RFKILL);			break;
>  		case 0xb5: asus_map_key_clear(KEY_CALC);			break;
>  		case 0xc4: asus_map_key_clear(KEY_KBDILLUMUP);		break;
>  		case 0xc5: asus_map_key_clear(KEY_KBDILLUMDOWN);		break;
> -- 
> 2.7.4
> 
```
