Re: [PATCH] Dead keys
* At 2001-05-02T01:12+0200, [EMAIL PROTECTED] wrote: : | The first line makes unadorned [no Shift, Ctrl, Alt] slash | (on my keyboard the key with keytop / has keycode 53 as showkey tells me) | into a dead ASCII slash. The 0d part is for "dead". Well, if I had known this, I could've saved us all some time. Sorry about that, ignore the patch -- doesn't matter that the default is weird when I can change it. :) Thanks for the info. -- Stian Sletner, gets to work on his keymap again - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Dead keys
> The issue here is that the dead keys themselves > are producing the wrong characters. No. If someone without diaeresis key uses the double quote, and attaches dead_diaeresis to it, she probably wants that double quote when it is followed by a space. When programming one needs quotes etc. When writing text one needs a-umlaut and c-cedilla etc. Very few people need a lone diaeresis. I do not mind if most people would need an additional keystroke to obtain that. > the dead_* are wrong, and I can't change them with a keymap, afaik? Yes, you can. Linux keyboard handling is very flexible. You can change the table of compose definitions with loadkeys, and there is no restriction of what is combined with what. You can also make any symbol into a dead symbol. Example: % loadkeys plain keycode 53 = 0x0d2f compose '/' 'o' to '\370' % This makes the slash (on my keyboard) into a dead slash: when followed by an o I get the Danish oslash (ø), and otherwise it remains a slash. Explanation of the loadkeys input: The first line makes unadorned [no Shift, Ctrl, Alt] slash (on my keyboard the key with keytop / has keycode 53 as showkey tells me) into a dead ASCII slash. The 0d part is for "dead". The 2f part is hex for the ASCII slash (octal 057). The combine statement adds a combination to the compose table. (Maybe it was there already - didnt check.) For 2f and 370, see ascii(7) and iso_8859-1(7). Andries [Yes, a very small example, and the input contains numbers in decimal, octal and hexadecimal.] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Dead keys
* At 2001-05-01T21:20+0200, [EMAIL PROTECTED] wrote: : | I think the main reason why it shouldn't be applied is that it changes | something. This keyboard stuff is unbelievably complicated. Many people | and distributions have wrestled with it and have got it working for them. | When you change stuff, you force people to start worrying about this again. | | [In other words, a global rewrite may be allowed, but non-compatible changes | in a few details only is really a bad idea.] Won't comment on this argument, it might outweigh my point (but that's not for me to say). | But there are other reasons why your patch is a bad idea. Everybody has | a double quote in his keymap, so using that to create umlauts is easy. | Only few people have a diaeresis in their keymap, so requiring a diaeresis | makes life more difficult for most people. It doesn't require anyone to use the ISO characters. The defkeymap.map still contains compose rules for the ASCII sequences. | (In other words, composing ASCII to make ISO 8859-1 is better than composing | ISO 8859-1 to make ISO 8859-1.) This is just a matter of adding compose rules. The issue here is that the dead keys themselves are producing the wrong characters. | Finally, you have loadkeys. If you change your private keymap | you achieve what you desire for yourself without disturbing others. No, this doesn't seem to be the case, unless I've missed something important. Because the dead_* are wrong, and I can't change them with a keymap, afaik? If I'm wrong, shoot me, then the patch is pointless. -- Stian Sletner - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Dead keys
From [EMAIL PROTECTED] Tue May 1 20:05:26 2001 Normally, you wouldn't notice this too much, since the compose rules are set up in such a way that you can use the dead keys to compose what you would expect, anyway. However, if you were to press a dead key and then space, or some un-composable key (to get the dead key character by itself), you would get the wrong character. Instead of '¨' (ISO 8859-1 decimal 168: DIAERESIS), you would get '"' (ASCII decimal 34); instead of '´' (ISO 8859-1 decimal 180: ACUTE ACCENT), you would get '\'' (ASCII decimal 39); and instead of '¸' (ISO 8859-1 decimal 184: CEDILLA), you would get ',' (ASCII decimal 44). I took the liberty of creating a patch that changes this in keyboard.c, and also adds compose rules to defkeymap.map so they can be used properly. If there is some reason why this shouldn't be applied, I'd like to know what, since this makes my console life easier. :) I think the main reason why it shouldn't be applied is that it changes something. This keyboard stuff is unbelievably complicated. Many people and distributions have wrestled with it and have got it working for them. When you change stuff, you force people to start worrying about this again. [In other words, a global rewrite may be allowed, but non-compatible changes in a few details only is really a bad idea.] But there are other reasons why your patch is a bad idea. Everybody has a double quote in his keymap, so using that to create umlauts is easy. Only few people have a diaeresis in their keymap, so requiring a diaeresis makes life more difficult for most people. (In other words, composing ASCII to make ISO 8859-1 is better than composing ISO 8859-1 to make ISO 8859-1.) Finally, you have loadkeys. If you change your private keymap you achieve what you desire for yourself without disturbing others. Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Dead keys
Hello. I've long been bothered by the fact that 3 of the 6 "dead keys" in the kernel are actually mapped to the wrong characters. Now, I realize that there might be some deliberate reason for this, since it's such an obvious annoyance and since they all fit in US ASCII the way it is now. Also, I've noticed that it is the same way in X11, independent from this. I'd like to know the reasoning, if there is one. Normally, you wouldn't notice this too much, since the compose rules are set up in such a way that you can use the dead keys to compose what you would expect, anyway. However, if you were to press a dead key and then space, or some un-composable key (to get the dead key character by itself), you would get the wrong character. Instead of '¨' (ISO 8859-1 decimal 168: DIAERESIS), you would get '"' (ASCII decimal 34); instead of '´' (ISO 8859-1 decimal 180: ACUTE ACCENT), you would get '\'' (ASCII decimal 39); and instead of '¸' (ISO 8859-1 decimal 184: CEDILLA), you would get ',' (ASCII decimal 44). I took the liberty of creating a patch that changes this in keyboard.c, and also adds compose rules to defkeymap.map so they can be used properly. If there is some reason why this shouldn't be applied, I'd like to know what, since this makes my console life easier. :) Thanks. (Patched against 2.4.3, but it applies to 2.4.4 too. Just tested it.) diff -u linux/drivers/char/defkeymap.map linux-patched/drivers/char/defkeymap.map --- linux/drivers/char/defkeymap.mapFri Feb 24 20:38:27 1995 +++ linux-patched/drivers/char/defkeymap.mapThu Apr 26 22:09:13 2001 @@ -291,12 +291,16 @@ compose '`' 'a' to 'à' compose '\'' 'A' to 'Á' compose '\'' 'a' to 'á' +compose '´' 'A' to 'Á' +compose '´' 'a' to 'á' compose '^' 'A' to 'Â' compose '^' 'a' to 'â' compose '~' 'A' to 'Ã' compose '~' 'a' to 'ã' compose '"' 'A' to 'Ä' compose '"' 'a' to 'ä' +compose '¨' 'A' to 'Ä' +compose '¨' 'a' to 'ä' compose 'O' 'A' to 'Å' compose 'o' 'a' to 'å' compose '0' 'A' to 'Å' @@ -307,22 +311,32 @@ compose 'a' 'e' to 'æ' compose ',' 'C' to 'Ç' compose ',' 'c' to 'ç' +compose '¸' 'C' to 'Ç' +compose '¸' 'c' to 'ç' compose '`' 'E' to 'È' compose '`' 'e' to 'è' compose '\'' 'E' to 'É' compose '\'' 'e' to 'é' +compose '´' 'E' to 'É' +compose '´' 'e' to 'é' compose '^' 'E' to 'Ê' compose '^' 'e' to 'ê' compose '"' 'E' to 'Ë' compose '"' 'e' to 'ë' +compose '¨' 'E' to 'Ë' +compose '¨' 'e' to 'ë' compose '`' 'I' to 'Ì' compose '`' 'i' to 'ì' compose '\'' 'I' to 'Í' compose '\'' 'i' to 'í' +compose '´' 'I' to 'Í' +compose '´' 'i' to 'í' compose '^' 'I' to 'Î' compose '^' 'i' to 'î' compose '"' 'I' to 'Ï' compose '"' 'i' to 'ï' +compose '¨' 'I' to 'Ï' +compose '¨' 'i' to 'ï' compose '-' 'D' to 'Ð' compose '-' 'd' to 'ð' compose '~' 'N' to 'Ñ' @@ -331,27 +345,38 @@ compose '`' 'o' to 'ò' compose '\'' 'O' to 'Ó' compose '\'' 'o' to 'ó' +compose '´' 'O' to 'Ó' +compose '´' 'o' to 'ó' compose '^' 'O' to 'Ô' compose '^' 'o' to 'ô' compose '~' 'O' to 'Õ' compose '~' 'o' to 'õ' compose '"' 'O' to 'Ö' compose '"' 'o' to 'ö' +compose '¨' 'O' to 'Ö' +compose '¨' 'o' to 'ö' compose '/' 'O' to 'Ø' compose '/' 'o' to 'ø' compose '`' 'U' to 'Ù' compose '`' 'u' to 'ù' compose '\'' 'U' to 'Ú' compose '\'' 'u' to 'ú' +compose '´' 'U' to 'Ú' +compose '´' 'u' to 'ú' compose '^' 'U' to 'Û' compose '^' 'u' to 'û' compose '"' 'U' to 'Ü' compose '"' 'u' to 'ü' +compose '¨' 'U' to 'Ü' +compose '¨' 'u' to 'ü' compose '\'' 'Y' to 'Ý' compose '\'' 'y' to 'ý' +compose '´' 'Y' to 'Ý' +compose '´' 'y' to 'ý' compose 'T' 'H' to 'Þ' compose 't' 'h' to 'þ' compose 's' 's' to 'ß' compose '"' 'y' to 'ÿ' +compose '¨' 'y' to 'ÿ' compose 's' 'z' to 'ß' compose 'i' 'j' to 'ÿ' diff -u linux/drivers/char/keyboard.c linux-patched/drivers/char/keyboard.c --- linux/drivers/char/keyboard.c Mon Oct 16 21:58:51 2000 +++ linux-patched/drivers/char/keyboard.c Mon Apr 23 12:02:36 2001 @@ -557,11 +557,11 @@ } #define A_GRAVE '`' -#define A_ACUTE '\'' +#define A_ACUTE '\264' #define A_CFLEX '^' #define A_TILDE '~' -#define A_DIAER '"' -#define A_CEDIL ',' +#define A_DIAER '\250' +#define A_CEDIL '\270' static unsigned char ret_diacr[NR_DEAD] = {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER, A_CEDIL }; -- Stian Sletner - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/