mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Peter Mamonov <pmamonov@gmail.com>
To: barebox@lists.infradead.org, s.hauer@pengutronix.de
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Peter Mamonov <pmamonov@gmail.com>,
	Trent Piepho <tpiepho@kymetacorp.com>
Subject: [PATCH v3] input: usb keyboard: fix CTRL+ combinations
Date: Thu, 25 Feb 2016 13:05:18 +0300	[thread overview]
Message-ID: <1456394718-12182-1-git-send-email-pmamonov@gmail.com> (raw)
In-Reply-To: <1456310925-1057-1-git-send-email-pmamonov@gmail.com>

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
---
 drivers/input/input.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-02-25 10:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-20 14:27 [PATCH 1/2] input: usb keyboard: fix BACKSPACE Peter Mamonov
2016-02-20 14:27 ` [PATCH 2/2] input: usb keyboard: fix CTRL+C Peter Mamonov
2016-02-20 16:51   ` Sam Ravnborg
2016-02-23  7:55   ` Sascha Hauer
2016-02-24 10:48   ` [PATCH v2] " Peter Mamonov
2016-02-24 14:21     ` Antony Pavlov
2016-02-24 15:07       ` Peter Mamonov
2016-02-24 18:12         ` Sascha Hauer
2016-02-24 18:53           ` Trent Piepho
2016-02-25  6:05             ` Sascha Hauer
2016-02-25 10:15           ` Peter Mamonov
2016-02-25 10:05     ` Peter Mamonov [this message]
2016-02-26  6:52       ` [PATCH v3] input: usb keyboard: fix CTRL+ combinations Sascha Hauer
2016-02-23  7:50 ` [PATCH 1/2] input: usb keyboard: fix BACKSPACE Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456394718-12182-1-git-send-email-pmamonov@gmail.com \
    --to=pmamonov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sam@ravnborg.org \
    --cc=tpiepho@kymetacorp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox