[PATCH v3] input: usb keyboard: fix CTRL+ combinations

Sascha Hauer s.hauer at pengutronix.de
Thu Feb 25 22:52:33 PST 2016


On Thu, Feb 25, 2016 at 01:05:18PM +0300, Peter Mamonov wrote:
> Signed-off-by: Peter Mamonov <pmamonov at gmail.com>
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Signed-off-by: Trent Piepho <tpiepho at kymetacorp.com>
> ---
>  drivers/input/input.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index ad7400f..31a9c22 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -18,6 +18,7 @@
>  #include <linux/bitmap.h>
>  #include <input/keyboard.h>
>  #include <dt-bindings/input/linux-event-codes.h>
> +#include <readkey.h>
>  
>  static LIST_HEAD(input_consumers);
>  
> @@ -164,7 +165,10 @@ static void input_console_notify(struct input_notifier *in,
>  	if (ic->modstate[4] || ic->modstate[5])
>  		modstate |= 1 << 2;
>  
> -	if (modstate & (1 << 0))
> +	if (modstate & (1 << 1)) {
> +		ascii = keycode_bb_keys[ev->code];
> +		ascii = ascii >= 'a' ? CTL_CH(ascii) : 0;
> +	} else if (modstate & (1 << 0))
>  		ascii = keycode_bb_shift_keys[ev->code];
>  	else
>  		ascii = keycode_bb_keys[ev->code];
> -- 
> 2.1.4
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list