3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- qt-2.3.9-snapshot-20050114/src/kernel/qkeyboard_qws.cpp~kernel-keymap-tosa
7 +++ qt-2.3.9-snapshot-20050114/src/kernel/qkeyboard_qws.cpp
9 { Qt::Key_CapsLock, 0xffff , 0xffff , 0xffff }, // 3c 60
10 { Qt::Key_At, '@' , 's' , 'S'-64 }, // 3d
11 { Qt::Key_Question, '?' , '?' , 0xffff }, // 3e
13 + { Qt::Key_Comma, ',' , ';' , 0xffff }, // 3f
14 + { Qt::Key_Period, '.' , ':' , 0xffff }, // 40
16 { Qt::Key_Comma, ',' , ',' , 0xffff }, // 3f
17 { Qt::Key_Period, '.' , '.' , 0xffff }, // 40
19 { Qt::Key_Tab, 9 , '\\' , 0xffff }, // 41
20 { Qt::Key_X, 0xffff , 'x' , 'X'-64 }, // 42
21 { Qt::Key_C, 0xffff , 'c' , 'C'-64 }, // 43
22 { Qt::Key_V, 0xffff , 'v' , 'V'-64 }, // 44
24 + { Qt::Key_Slash, '/' , '?' , 0xffff }, // 45
25 + { Qt::Key_Apostrophe, '\'' , '"' , 0xffff }, // 46 70
27 { Qt::Key_Slash, '/' , '/' , 0xffff }, // 45
28 { Qt::Key_Apostrophe, '\'' , '\'' , 0xffff }, // 46 70
30 { Qt::Key_Semicolon, ';' , ';' , 0xffff }, // 47
31 { Qt::Key_QuoteDbl, '\"' , '\"' , 0xffff }, // 48
32 { Qt::Key_Colon, ':' , ':' , 0xffff }, // 49
34 static const int keyMSize = sizeof(keyM)/sizeof(QWSServer::KeyMap)-1;
35 static QIntDict<QWSServer::KeyMap> *overrideMap = 0;
37 +#if defined(QT_QWS_SL6000)
38 +/* Translation table to obtain a 'legacy' keycode corresponding to
40 + Other devices obviously send different keycodes while Fn is down, tosa sends
41 + the same keys as usual bracketed by Fn-down/Fn-up.
42 + This table is used while Fn is down to obtain the key-code the SL-5xxx would
43 + send, so the rest of keyboard processing does not need to be adjusted. */
44 +static const uchar sl6kFnTrans[] = { 0x00,
45 + 0x5e, 0x3a, 0x43, 0x4a, 0x2b, 0x4b, 0x4c, 0x4d, 0x30, 0x4e, 0x4f, 0x50,
46 + // !, -, cpy, #, 3, $, %, _, 8, &, *, (,
47 + 0x53, 0x3b, 0x31, 0x32, 0x29, 0x2c, 0x3d, 0x2d, 0x2f, 0x44, 0x2a, 0x42,
48 + // =, +, 9, 0, 1, 4, @, 5, 7, pste, 2, cut,
49 + // padding for keycodes which don't ever get directly sent on tosa
50 + // except for y->6, ret->'>', BS->DEL
51 + 0x2e, 0x00, 0x00, 0x57, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00,
52 + // 6, _Z, shft, ret, F11, fn, BS?, F31, lght, cncl, lft, up,
53 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
54 + // dn, rght, OK, home, 1, 2, 3, 4, 5, 6, 7, 8,
55 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
56 + // 9, 0, UNK, UNK, UNK, UNK, UNK, UNK, UNK, -, +, caps,
57 + // here are a few translatable codes again...
58 + 0x00, 0x00, 0x54, 0x56, 0x3c, 0x00, 0x00, 0x00, 0x70, 0x55 };
59 + // @, ?, ,, ., tab, cut, cpy, pste, /, '
60 +static const int sl6kFnSize = sizeof(sl6kFnTrans);
64 Changes the mapping of the keyboard; adding the scancode to Unicode
65 mappings from \a map. The server takes over ownership of \a map
69 #ifndef QT_QWS_USE_KEYCODES
70 +#if defined(QT_QWS_SL6000)
71 + qDebug("Key pressed: %x", code);
73 + if (code < sl6kFnSize) {
74 + code = sl6kFnTrans[code];
75 + qDebug("Translated Fn: %x", code);
77 + qDebug("Untranslatable Fn: %x", code);
79 #if defined(QT_QWS_IPAQ)
80 // map ipaq 'action' key (0x60, 0xe0)
81 if ((code & 0x7f) == 0x60) {