linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbd: (#7063) make CapsLock work as expected even for non-ASCII
@ 2009-11-16 13:51 Alexey Dobriyan
  2009-11-16 14:40 ` Alan Cox
  2009-11-16 19:07 ` Samuel Thibault
  0 siblings, 2 replies; 22+ messages in thread
From: Alexey Dobriyan @ 2009-11-16 13:51 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, hpa, alan, mgarski

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, &param) == 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;
 	}
 

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-02-23 16:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16 13:51 [PATCH] kbd: (#7063) make CapsLock work as expected even for non-ASCII Alexey Dobriyan
2009-11-16 14:40 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).