From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com,
alan@lxorguk.ukuu.org.uk, mgarski@post.pl
Subject: [PATCH] kbd: (#7063) make CapsLock work as expected even for non-ASCII
Date: Mon, 16 Nov 2009 16:51:15 +0300 [thread overview]
Message-ID: <20091116135114.GA2719@x200> (raw)
Steps to reproduce:
[log into console (not xterm)]
[load non-trivial keymap]
[turn on CapsLock]
[type something]
Symbols won't be capital despite CapsLock and despite Shift+* working
as expected.
Note: patch relies on keymap being consistent wrt SMALL/CAPITAL symbols.
Though extracting SMALL <=> CAPITAL mapping from unicode tables and
putting it into kernel may be more correct.
Fix long-standing http://bugzilla.kernel.org/show_bug.cgi?id=7063
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
drivers/char/keyboard.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -1261,8 +1261,14 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
param.value = keysym;
if (atomic_notifier_call_chain(&keyboard_notifier_list, KBD_UNICODE, ¶m) == NOTIFY_STOP)
return;
- if (down && !raw_mode)
+ if (down && !raw_mode) {
+ if (vc_kbd_led(kbd, VC_CAPSLOCK)) {
+ key_map = key_maps[shift_final ^ (1 << KG_SHIFT)];
+ if (key_map)
+ keysym = key_map[keycode];
+ }
to_utf8(vc, keysym);
+ }
return;
}
next reply other threads:[~2009-11-16 13:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 13:51 Alexey Dobriyan [this message]
2009-11-16 14:40 ` [PATCH] kbd: (#7063) make CapsLock work as expected even for non-ASCII Alan Cox
2009-11-16 19:08 ` Samuel Thibault
2009-11-16 19:07 ` Samuel Thibault
2009-11-16 19:53 ` Alexey Dobriyan
2009-11-16 22:27 ` Samuel Thibault
2009-11-16 22:53 ` Alexey Dobriyan
2009-11-16 23:04 ` Samuel Thibault
2009-11-16 22:54 ` Samuel Thibault
2009-11-16 23:05 ` Alexey Dobriyan
2009-11-16 23:15 ` Samuel Thibault
2009-11-17 11:55 ` Alexey Dobriyan
2009-11-17 13:23 ` Samuel Thibault
2009-11-19 13:18 ` Alexey Dobriyan
2009-11-19 13:28 ` Samuel Thibault
2009-11-19 13:37 ` Samuel Thibault
2009-11-19 15:07 ` H. Peter Anvin
2009-11-20 19:07 ` Pavel Machek
2009-11-20 20:46 ` Pavel Machek
2009-11-20 21:27 ` H. Peter Anvin
2010-02-21 5:01 ` [RFC,PATCH] Route kbd leds through the generic leds layer (Was: [PATCH] kbd: (#7063) make CapsLock work as expected even for non-ASCII) Samuel Thibault
2010-02-23 16:30 ` Pavel Machek
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=20091116135114.GA2719@x200 \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgarski@post.pl \
/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