Bug 7063 - Missing support for non-ASCII capital letters using Caps Lock in UTF-8 mode
Summary: Missing support for non-ASCII capital letters using Caps Lock in UTF-8 mode
Status: CLOSED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Alexey Dobriyan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-27 07:12 UTC by Marcin Garski
Modified: 2012-05-12 01:30 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.24-4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
make CapsLock work as expected even for non-ASCII characters (631 bytes, patch)
2009-11-16 02:57 UTC, Alexey Dobriyan
Details | Diff

Description Marcin Garski 2006-08-27 07:12:51 UTC
As you can read on:
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Unicode-HOWTO.html#ss2.1
Linux console don't support non-ASCII capital letters using Caps Lock in UTF-8
mode. On that site you will even find patch (for kernel 2.3.12) which add such
support.

Steps to reproduce:
1. Log into Linux console (i.e with polish keytable)
2. Turn on Caps Lock
3. Press Alt+l

You should get: Ł (Lstroke), but you will get ł (lstroke)

Note: Shift+Alt+l works fine.
Comment 1 Antonino Daplas 2007-02-21 21:51:27 UTC
Reclassify under Drivers/Input.
Comment 2 Natalie Protasevich 2008-03-29 22:16:03 UTC
Marcin, can you confirm this bugwith latest kernel?
Thanks.
Comment 3 Marcin Garski 2008-04-06 08:11:01 UTC
Still valid for 2.6.24.4 (on Fedora 8).
Comment 4 Alexey Dobriyan 2009-11-16 00:23:41 UTC
Still valid under 2.6.32-rc7

linux-2.3.12-keyboard.diff mysteriously dissapears
*sniff*
Comment 5 Alexey Dobriyan 2009-11-16 02:32:58 UTC
OK, something like that properly done need discussion on linux-kernel:

diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 737be95..86ab400 100644
--- 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)) {
+				/* CYRILLIC SMALL LETTER => CYRILLIC CAPITAL LETTER */
+				if (0x0430 <= keysym && keysym <= 0x044f)
+					keysym -= 0x20;
+			}
 			to_utf8(vc, keysym);
+		}
 		return;
 	}
Comment 6 Alexey Dobriyan 2009-11-16 02:57:48 UTC
Created attachment 23794 [details]
make CapsLock work as expected even for non-ASCII characters
Comment 7 Samuel Thibault 2009-11-16 19:18:03 UTC
Nacked.  That makes the caps lock a shift lock, which is not the same
and would surprise the user.  If you really want a shift lock, set
the capslock key to the shiftlock keysym.  The keyboard capslock led
won't lit, but that's another concern and should probably be improved
instead of breaking the existing caps lock behavior.  Such led
interface would be useful for e.g. showing keyboard layout changes when
loading several keymaps like console-setup does.

Also, note that the caps version of a non-ASCII character is not always
available as the shifted position.  On a French keyboard, for instance,
É is obtained by pressing altgr+shift+é.

The console-setup package correctly builds a keymap using another
modifier to have proper caps lock support, without the need to load
lower/upper case in yet another array of the kernel with yet another
interface.
Comment 8 Samuel Thibault 2009-11-16 22:26:03 UTC
7746 is probably a dupe now.

Note You need to log in before you can comment on or make changes to this bug.