
Originally Posted by
gerzhwin
@pcworld: I seem a little bit lost looking at the TABLETKEYMAPS. Is there some kind of documentation?
I also had some thought’s about a numpad and other things, so I am ready to play with VKB layouts …
No documetation. But have a look at de.h - there are several keyboard rows, e.g. DE_QWERTZ_NUMBERS_10, which represents the number row:
Code:
#define DE_QWERTZ_NUMBERS_10(w) { w, Qt::Key_1, Qt::Key_Exclam, sDeQwertz1_extended },\
{ w, Qt::Key_2, Qt::Key_QuoteDbl, sDeQwertz2_extended },\
// numbers 3-10 (see original source file linked above)
{ w, Qt::Key_Left, Qt::Key_Up, NULL },\
{ w, Qt::Key_Right, Qt::Key_Down, NULL }
The second argument (Qt::Key_1) is the letter which is printed when you press the key, a "1" in the case of the first defined key.
The third argument (Qt::Key_Exclam) is what is printed when you press the key with shift - in this case, when you press shift + 1, an exclamation point is printed.
The fourth argument (sDeQwertz1_extended) defines the letters which are displayed when you do a long-press on the key - this one is defined at the top of the file:
Code:
static TabletKeymap::constUKeyArray sDeQwertz1_extended = { Qt::Key_1, Qt::Key_Exclam, UKey(0x00B9) /* SUPERSCRIPT ONE ¹ */, UKey(0x00BC) /* VULGAR FRACTION ONE QUARTER ¼ */, UKey(0x00BD) /* VULGAR FRACTION ONE HALF ½ */, Qt::Key_exclamdown, cKey_None };
(some of the extended key arrays are found in common_keys.h)
At the end of the file, all the rows get combined into a single keyboard layout:
Code:
static TabletKeymap::Layout sDeQwertz = {
{ DE_QWERTZ_NUMBERS_10(1) },
{ DE_QWERTZ_TOP_10(1), KEY_1(1, Qt::Key_Backspace), NOKEY_1 },
{ KEY_2(-0.2, Qt::Key_A, Qt::Key_Less), DE_QWERTZ_MID_9(1), KEY_1(0.8, Qt::Key_Return), NOKEY_1 },
{ KEY_1(0.8, Qt::Key_Shift), DE_QWERTZ_LOW_9(1), KEY_1(2, Qt::Key_Shift), NOKEY_1 },
{ DE_QWERTZ_BOTTOM_ROW_DEFAULT },
};
Hope that gets you started! 
Edit: You're still welcome in the #webos-ports channel 
(Actually, this post should go into the WebOS Ports wiki...)