[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091116135114.GA2719@x200>
Date: Mon, 16 Nov 2009 16:51:15 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com,
alan@...rguk.ukuu.org.uk, mgarski@...t.pl
Subject: [PATCH] kbd: (#7063) make CapsLock work as expected even for
non-ASCII
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@...il.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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists