Skip to contentSkip to conversation

Patch for atkbd.c from Ubuntu

PATCH Pete Zaitcev 4 participants 8 messages May 24, 2006 – Jun 12, 2006

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi, Dmitry:

What do you think about the attached? Apparently, this is needed to support Korean input keys. Please let me know if this can be included.

Here's a bug entry for reference:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=192637

Yours,
-- Pete

drivers/input/keyboard/atkbd.c +1 -1
diff -ruN linux-2.6.16.i686.orig/drivers/input/keyboard/atkbd.c linux-2.6.16.i686/drivers/input/keyboard/atkbd.c
@@ -85,7 +85,7 @@
 	  0, 56, 42, 93, 29, 16,  2,  0,  0,  0, 44, 31, 30, 17,  3,  0,
 	  0, 46, 45, 32, 18,  5,  4, 95,  0, 57, 47, 33, 20, 19,  6,183,
 	  0, 49, 48, 35, 34, 21,  7,184,  0,  0, 50, 36, 22,  8,  9,185,
-	  0, 51, 37, 23, 24, 11, 10,  0,  0, 52, 53, 38, 39, 25, 12,  0,
+	  0, 51, 37, 23, 24, 11, 10,122,123, 52, 53, 38, 39, 25, 12,  0,
 	  0, 89, 40,  0, 26, 13,  0,  0, 58, 54, 28, 27,  0, 43,  0, 85,
 	  0, 86, 91, 90, 92,  0, 14, 94,  0, 79,124, 75, 71,121,  0,  0,
 	 82, 83, 80, 76, 77, 72,  1, 69, 87, 78, 81, 74, 55, 73, 70, 99,

-- Pete

#1 lore raw
Quoted 8 lines · Pete Zaitcev

Hi, Dmitry:

What do you think about the attached? Apparently, this is needed to support Korean input keys. Please let me know if this can be included.

Here's a bug entry for reference:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=192637

Hi Pete,

Please look here:

	http://bugzilla.kernel.org/show_bug.cgi?id=2817#c4

"I will not accept this patch (or any similar patch) to extend the atkbd.c mapping table - only standard scancodes are allowed there. The table is easily modified from userspace, and that is the way to go.

In the past I tried to fill the table with all the entries, but found out that there are two or three keyboards competing for every position in the scancode table, with a different keycode."

I continue to agree with Vojtech's position here. Because kernel does not have ability to detect the kind of keyboard connected to a box (nor do we really want to store all this data in the kernel) all fine tuning of AT keymap should be done from userspace.

Signature · 1 line
Dmitry
#4 lore raw
Quoted 5 lines · Dmitry Torokhov

I am backpedaling on that problem. It seems that HANGUEL/HANJA scancodes are pretty well-defined an we need to make them work properly. Please look here for the proposed patch:

	http://bugzilla.kernel.org/show_bug.cgi?id=6642

Sounds good. Hangul is usually spelled without 'E' in the West, but I am not Korean, I can't know what is right.

-- Pete

maintainer
#6 lore raw
Quoted 12 lines · Jerome Pinot
Quoted 1 line · Pete Zaitcev

On Mon, 12 Jun 2006 00:49:13 -0400, Dmitry Torokhov <[email protected]> wrote:

[...]

Quoted 4 lines

Sounds good. Hangul is usually spelled without 'E' in the West, but I am not Korean, I can't know what is right.

-- Pete

Maybe a good time, at last, to correct this mispelling ?

http://lists.osdl.org/pipermail/kernel-janitors/2005-October/004970.html

Yep. Could you please resend me the patch?

Thanks!

Signature · 1 line
Dmitry
#7 lore raw
Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines · Jerome Pinot
Quoted 1 line · Pete Zaitcev

On Mon, 12 Jun 2006 00:49:13 -0400, Dmitry Torokhov <[email protected]> wrote:

[...]

Quoted 4 lines

Sounds good. Hangul is usually spelled without 'E' in the West, but I am not Korean, I can't know what is right.

-- Pete

Quoted 8 lines
Quoted 4 lines

Maybe a good time, at last, to correct this mispelling ?

http://lists.osdl.org/pipermail/kernel-janitors/2005-October/004970.html

Yep. Could you please resend me the patch?

Thanks!

Here it is. You may had the signed-off of Alexey Dobriyan.
If you can't read the attached patch (thanks to gmail), you can get it too from:
http://ngc891.blogdns.net/pub/projects/patches/linux-2.6-hangeul.diff

You're welcome,

Signature · 2 lines
Jerome Pinot
http://ngc891.blogdns.net/

Fix a mispell of the korean alphabet name in the atkbd subsystem.
See http://en.wikipedia.org/wiki/Hangeul#Names for more details. Will make some korean people happy.

Patch against linux-2.6 git 0e838b72d54ed189033939258a961f2a0cd59647

Signed-off-by: Jerome Pinot <ngc891 at gmail.com>
---

	wikipedia: Hangeul
	google: 286000 vs 794
	KEY_HANGUEL left to not break people

				--adobriyan
drivers/char/keyboard.c +1 -1
index 5755b7e..55704d3 100644
@@ -1073,7 +1073,7 @@ static int emulate_raw(struct vc_data *v
 			put_queue(vc, 0x1d | up_flag);
 			put_queue(vc, 0x45 | up_flag);
 			return 0;
-		case KEY_HANGUEL:
+		case KEY_HANGEUL:
 			if (!up_flag) put_queue(vc, 0xf1);
 			return 0;
 		case KEY_HANJA:
drivers/input/keyboard/atkbd.c +4 -4
index fad04b6..e48efdb 100644
@@ -150,7 +150,7 @@ #define ATKBD_RET_BAT		0xaa
 #define ATKBD_RET_EMUL0		0xe0
 #define ATKBD_RET_EMUL1		0xe1
 #define ATKBD_RET_RELEASE	0xf0
-#define ATKBD_RET_HANGUEL	0xf1
+#define ATKBD_RET_HANGEUL	0xf1
 #define ATKBD_RET_HANJA		0xf2
 #define ATKBD_RET_ERR		0xff
 
@@ -304,7 +304,7 @@ #endif
 
 		if (atkbd->emul ||
 		    (code != ATKBD_RET_EMUL0 && code != ATKBD_RET_EMUL1 &&
-		     code != ATKBD_RET_HANGUEL && code != ATKBD_RET_HANJA &&
+		     code != ATKBD_RET_HANGEUL && code != ATKBD_RET_HANJA &&
 		     (code != ATKBD_RET_ERR || atkbd->err_xl) &&
 	             (code != ATKBD_RET_BAT || atkbd->bat_xl))) {
 			atkbd->release = code >> 7;
@@ -333,8 +333,8 @@ #endif
 		case ATKBD_RET_RELEASE:
 			atkbd->release = 1;
 			goto out;
-		case ATKBD_RET_HANGUEL:
-			atkbd_report_key(atkbd->dev, regs, KEY_HANGUEL, 3);
+		case ATKBD_RET_HANGEUL:
+			atkbd_report_key(atkbd->dev, regs, KEY_HANGEUL, 3);
 			goto out;
 		case ATKBD_RET_HANJA:
 			atkbd_report_key(atkbd->dev, regs, KEY_HANJA, 3);
drivers/macintosh/adbhid.c +1 -1
index 394334e..3c9c970 100644
@@ -179,7 +179,7 @@ u8 adb_to_linux_keycodes[128] = {
 	/* 0x65 */ KEY_F9,		/*  67 */
 	/* 0x66 */ KEY_HANJA,		/* 123 */
 	/* 0x67 */ KEY_F11,		/*  87 */
-	/* 0x68 */ KEY_HANGUEL,		/* 122 */
+	/* 0x68 */ KEY_HANGEUL,		/* 122 */
 	/* 0x69 */ KEY_SYSRQ,		/*  99 */
 	/* 0x6a */ 0,
 	/* 0x6b */ KEY_SCROLLLOCK,	/*  70 */
drivers/usb/input/hid-debug.h +1 -1
index 702c48c..f04d6d7 100644
@@ -563,7 +563,7 @@ static char *keys[KEY_MAX + 1] = {
 	[KEY_VOLUMEUP] = "VolumeUp",		[KEY_POWER] = "Power",
 	[KEY_KPEQUAL] = "KPEqual",		[KEY_KPPLUSMINUS] = "KPPlusMinus",
 	[KEY_PAUSE] = "Pause",			[KEY_KPCOMMA] = "KPComma",
-	[KEY_HANGUEL] = "Hanguel",		[KEY_HANJA] = "Hanja",
+	[KEY_HANGUEL] = "Hangeul",		[KEY_HANJA] = "Hanja",
 	[KEY_YEN] = "Yen",			[KEY_LEFTMETA] = "LeftMeta",
 	[KEY_RIGHTMETA] = "RightMeta",		[KEY_COMPOSE] = "Compose",
 	[KEY_STOP] = "Stop",			[KEY_AGAIN] = "Again",
include/linux/input.h +2 -1
index ce1a756..2a53431 100644
@@ -231,7 +231,8 @@ #define KEY_KPPLUSMINUS		118
 #define KEY_PAUSE		119
 
 #define KEY_KPCOMMA		121
-#define KEY_HANGUEL		122
+#define KEY_HANGEUL		122
+#define KEY_HANGUEL		KEY_HANGEUL
 #define KEY_HANJA		123
 #define KEY_YEN			124
 #define KEY_LEFTMETA		125