- Add ctrl support to (most) keyboard layouts. Only tested for kbdus, added
[reactos.git] / reactos / lib / keyboard / kbdda / kbdda.c
index 53b9522..409f7f3 100644 (file)
@@ -173,35 +173,7 @@ ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
   { '1',           NOCAPS, {'1',      '!'} },
   /* Ctrl-2 generates NUL */
   { VK_OEM_PLUS,   NOCAPS, {'+',      '?'} },
-  /* First letter row */
-  { 'Q',           CAPS,   {'q',      'Q'} },
-  { 'W',           CAPS,   {'w',      'W'} },
-  { 'R',           CAPS,   {'r',      'R'} },
-  { 'T',           CAPS,   {'t',      'T'} },
-  { 'Y',           CAPS,   {'y',      'Y'} },
-  { 'U',           CAPS,   {'u',      'U'} },
-  { 'I',           CAPS,   {'i',      'I'} },
-  { 'O',           CAPS,   {'o',      'O'} },
-  { 'P',           CAPS,   {'p',      'P'} },
   { VK_OEM_6,      CAPS,   {0xe5,     0xc5} }, /* Å */
-  /* Second letter row */
-  { 'A',           CAPS,   {'a',      'A'} },
-  { 'S',           CAPS,   {'s',      'S'} },
-  { 'D',           CAPS,   {'d',      'D'} },
-  { 'F',           CAPS,   {'f',      'F'} },
-  { 'G',           CAPS,   {'g',      'G'} },
-  { 'H',           CAPS,   {'h',      'H'} },
-  { 'J',           CAPS,   {'j',      'J'} },
-  { 'K',           CAPS,   {'k',      'K'} },
-  { 'L',           CAPS,   {'l',      'L'} },
-  
-  /* Third letter row */
-  { 'Z',           CAPS,   {'z',      'Z'} },
-  { 'X',           CAPS,   {'x',      'X'} },
-  { 'C',           CAPS,   {'c',      'C'} },
-  { 'V',           CAPS,   {'v',      'V'} },
-  { 'B',           CAPS,   {'b',      'B'} },
-  { 'N',           CAPS,   {'n',      'N'} },
 
   /* Specials */
   { VK_OEM_7,       CAPS,   {0xf8,     0xd8} }, /* Ø */
@@ -222,6 +194,34 @@ ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
 
 ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
   /* Normal, Shifted, Ctrl */
+
+  /* The alphabet */
+  { 'A',         CAPS,   {'a', 'A', 0x01} },
+  { 'B',         CAPS,   {'b', 'B', 0x02} },
+  { 'C',         CAPS,   {'c', 'C', 0x03} },
+  { 'D',         CAPS,   {'d', 'D', 0x04} },
+  { 'F',         CAPS,   {'f', 'F', 0x06} },
+  { 'G',         CAPS,   {'g', 'G', 0x07} },
+  { 'H',         CAPS,   {'h', 'H', 0x08} },
+  { 'I',         CAPS,   {'i', 'I', 0x09} },
+  { 'J',         CAPS,   {'j', 'J', 0x0a} },
+  { 'K',         CAPS,   {'k', 'K', 0x0b} },
+  { 'L',         CAPS,   {'l', 'L', 0x0c} },
+  { 'M',         CAPS,   {'m', 'M', 0x0d} },
+  { 'N',         CAPS,   {'n', 'N', 0x0e} },
+  { 'O',         CAPS,   {'o', 'O', 0x0f} },
+  { 'P',         CAPS,   {'p', 'P', 0x10} },
+  { 'Q',         CAPS,   {'q', 'Q', 0x11} },
+  { 'R',         CAPS,   {'r', 'R', 0x12} },
+  { 'S',         CAPS,   {'s', 'S', 0x13} },
+  { 'T',         CAPS,   {'t', 'T', 0x14} },
+  { 'U',         CAPS,   {'u', 'U', 0x15} },
+  { 'V',         CAPS,   {'v', 'V', 0x16} },
+  { 'W',         CAPS,   {'w', 'W', 0x17} },
+  { 'X',         CAPS,   {'x', 'X', 0x18} },
+  { 'Y',         CAPS,   {'y', 'Y', 0x19} },
+  { 'Z',         CAPS,   {'z', 'Z', 0x1a} },
+
   /* Legacy (telnet-style) ascii escapes */
   { VK_OEM_MINUS, NOCAPS, {'-',      '_',      0x1f /* US */} },
   { VK_RETURN,    NOCAPS, {'\r',     '\r',     '\n'} },
@@ -248,11 +248,11 @@ ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
   { VK_OEM_4,    NOCAPS, {WCH_DEAD, WCH_DEAD, WCH_DEAD, '|'} },
   { VK_EMPTY ,   NOCAPS, {0xb4,     '`',      '|',      WCH_NONE} },
 
-  { 'E',         CAPS,   {'e',      'E',      WCH_NONE, 0x20ac} },
+  { 'E',         CAPS,   {'e',      'E',      0x05, 0x20ac} },
   { VK_OEM_1,    NOCAPS, {WCH_DEAD, WCH_DEAD, WCH_NONE, WCH_DEAD} },
   { VK_EMPTY ,   NOCAPS, {0xa8,     '^',      WCH_NONE, '~'} },
 
-  { 'M',         CAPS,   {'m',      'M',      WCH_NONE, 0x00b5} },
+  { 'M',         CAPS,   {'m',      'M',      0x0d, 0x00b5} },
   { VK_OEM_102,  NOCAPS, {'<',      '>',      0x001c,   '\\'} },
   { 0, 0 }
 };