Re: [PATCH] Input: Add keycodes for touchpad on/off keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 08, 2010 at 12:42:10PM +0000, Bastien Nocera wrote:
> Some laptops will have a "touchpad toggle" soft button, which
> expects user-space to turn off the touchpad themselves, some
> other devices will do this in hardware, but send key events telling
> us that the touchpad has been turned off/on.
> 
> KEY_TOUCHPAD_ON/KEY_TOUCHPAD_OFF will be used by user-space to
> show a popup with the status of the touchpad.
> 
> Signed-Off-By: Bastien Nocera <hadess@xxxxxxxxxx>
> ---
>  include/linux/input.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/input.h b/include/linux/input.h
> index 896a922..46dca75 100644
> --- a/include/linux/input.h
> +++ b/include/linux/input.h
> @@ -545,6 +545,10 @@ struct input_absinfo {
>  #define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
>  #define KEY_MEDIA_REPEAT	0x1b7	/* Consumer - transport control */
>  
> +#define KEY_TOUCHPAD_TOGGLE	0x1b8	/* Ask user-space to switch the touchpad off */

Just off or is it true toggle?

> +#define KEY_TOUCHPAD_ON		0x1b9	/* Tell user-space touchpad is now on */
> +#define KEY_TOUCHPAD_OFF	0x1ba	/* As above but off */

I do not like the idea that keycodes are limited to signalling the
state. Either they can also request the transition to given state or we
need to find some other way to communicate the state.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux