? Keyboard.kbd
? am
? ar
? automatic-scanning.xam
? az
? be
? bn
? ca
? cs
? cy
? da
? de
? direct-selection.xam
? dwell-selection.xam
? el
? en_CA
? en_GB
? es
? fr
? ga
? gok-alpha-shift-fix.diff
? gok-alpha.diff
? gok.desktop
? hi
? hr
? hu
? inverse-scanning.xam
? it
? ja
? ko
? lt
? mk
? ml
? mn
? ms
? nl
? no
? omf.make
? pa
? pl
? pt
? pt_BR
? singlekey-automatic-scanning.xam
? singlekey-inverse-scanning.xam
? sk
? sl
? sq
? sr
? sr@Latn
? stamp-h1
? sv
? ta
? tr
? uk
? vi
? zh_CN
? zh_TW
? gok/GNOME_Gok.server
? gok/GNOME_Gok.server.in
? gok/keyboard-geometry
? gok/test-focus-reject
? gok/test-gok-wordcomplete
? help/gok/C/gok-C.omf.out
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gok/ChangeLog,v
retrieving revision 1.438
diff -u -r1.438 ChangeLog
--- ChangeLog	29 Mar 2004 17:21:17 -0000	1.438
+++ ChangeLog	30 Mar 2004 12:37:30 -0000
@@ -1,3 +1,23 @@
+2004-03-29  Bill Haneman <billh@gnome.org>
+
+	* gok/gok-keyboard.c:
+	(gok_keyboard_add_keys_from_charstrings): 
+	Fix broken use of groups + levels in alphabetic keyboards.
+	Add Shift/Level keys and Tab key to alpha keyboards.
+	(gok_keyboard_compose_create): Pass in a KeyboardLayouts argument
+	so that the layout type of the created compose keyboard may be
+	specified.
+
+	* gok/gok-key.c:
+	(gok_key_get_label): 
+	Calculate level for non-KEYCODE/KEYSYM output keys.
+	Fixes bug #133545.
+
+	* gok/gok-output.c:
+	(gok_output_update_predictions): Fix very broken KEYSTRING word completion input.
+
+	* gok/gok-output.h: Add OUTPUT_INVALID.
+	
 2004-03-29  David Bolter  <david.bolter@utoronto.ca>
 
 	on behalf of: d.binderman@virgin.net
Index: gok-controls.kbd
===================================================================
RCS file: /cvs/gnome/gok/gok-controls.kbd,v
retrieving revision 1.17
diff -u -r1.17 gok-controls.kbd
--- gok-controls.kbd	24 Mar 2004 11:08:14 -0000	1.17
+++ gok-controls.kbd	30 Mar 2004 12:37:30 -0000
@@ -44,6 +44,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="about" top="0" right="4" left="2">
 		<GOK:label>About</GOK:label>
@@ -77,6 +78,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="help" top="0" right="6" left="4">
 		<GOK:label>Help</GOK:label>
@@ -110,6 +113,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branchModal" top="1" right="2" target="move-resize" left="0">
 		<GOK:label>Window</GOK:label>
@@ -145,6 +150,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branch" top="1" right="4" target="quit" left="2">
 		<GOK:label>Quit GOK</GOK:label>
@@ -178,9 +184,13 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="settings" top="1" right="6" left="4">
 		<GOK:label>Preferences</GOK:label>
+		
+		
 		
 		
 		
Index: hide.kbd
===================================================================
RCS file: /cvs/gnome/gok/hide.kbd,v
retrieving revision 1.10
diff -u -r1.10 hide.kbd
--- hide.kbd	22 Mar 2004 17:37:11 -0000	1.10
+++ hide.kbd	30 Mar 2004 12:37:30 -0000
@@ -36,6 +36,7 @@
 		
 		
 		
+		
 	</GOK:key>
 </GOK:keyboard>
 </GOK:GokFile>
Index: launcher.kbd
===================================================================
RCS file: /cvs/gnome/gok/launcher.kbd,v
retrieving revision 1.15
diff -u -r1.15 launcher.kbd
--- launcher.kbd	22 Mar 2004 17:37:11 -0000	1.15
+++ launcher.kbd	30 Mar 2004 12:37:30 -0000
@@ -43,6 +43,7 @@
 		
 		
 		
+		
 		 
 	</GOK:key> 
 	<GOK:key bottom="1" type="normal" top="0" right="3" left="1"> 
@@ -78,6 +79,7 @@
 		
 		
 		
+		
 		 
 		<GOK:output type="exec">gnome-terminal</GOK:output>
 	</GOK:key> 
@@ -114,6 +116,7 @@
 		
 		
 		
+		
 		 
 		<GOK:output type="exec">mozilla</GOK:output>
 	</GOK:key> 
@@ -150,11 +153,13 @@
 		
 		
 		
+		
 		 
 		<GOK:output type="exec">gedit</GOK:output>
 	</GOK:key> 
 	<GOK:key bottom="2" type="normal" top="1" right="6" left="3"> 
 		<GOK:label>Help Browser</GOK:label>
+		
 		
 		
 		
Index: main.kbd
===================================================================
RCS file: /cvs/gnome/gok/main.kbd,v
retrieving revision 1.28
diff -u -r1.28 main.kbd
--- main.kbd	22 Mar 2004 17:37:11 -0000	1.28
+++ main.kbd	30 Mar 2004 12:37:30 -0000
@@ -46,6 +46,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="branch" top="0" right="2" target="Keyboard" left="0">
 		<GOK:label>Compose</GOK:label>
@@ -80,6 +81,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="branchModal" top="0" right="4" target="move-resize" left="2">
 		<GOK:label>Window</GOK:label>
@@ -115,6 +117,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="branch" top="0" right="6" target="mouse" left="4">
 		<GOK:label>Mouse</GOK:label>
@@ -150,6 +153,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branchWindows" top="1" right="4" left="2">
 		<GOK:label>Activate</GOK:label>
@@ -185,6 +189,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="branchToolbars" top="2" right="4" left="2">
 		<GOK:label>Toolbars</GOK:label>
@@ -218,6 +223,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branchSettings" top="1" right="6" target="gok-controls" left="4">
 		<GOK:label>GOK</GOK:label>
@@ -261,6 +267,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="branchGUI" top="2" right="6" left="4">
 		<GOK:label>UI Grab</GOK:label>
@@ -295,9 +302,11 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branch" top="1" right="2" target="launcher" left="0">
 		<GOK:label>Launcher</GOK:label>
+		
 		
 		
 		
Index: mouse.kbd
===================================================================
RCS file: /cvs/gnome/gok/mouse.kbd,v
retrieving revision 1.13
diff -u -r1.13 mouse.kbd
--- mouse.kbd	22 Mar 2004 17:37:11 -0000	1.13
+++ mouse.kbd	30 Mar 2004 12:37:30 -0000
@@ -44,6 +44,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="mousebutton" action="latch" top="0" right="2" left="1">
 		<GOK:label>Latch</GOK:label>
@@ -77,6 +78,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="pointer" top="0" right="4" left="2">
 		<GOK:label>Pointer</GOK:label>
@@ -112,6 +114,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="repeat-next" top="0" right="6" left="4">
 		<GOK:label>Repeat</GOK:label>
@@ -147,6 +150,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="northwest" bottom="2" type="mouse" top="1" right="1" left="0">
 		<GOK:label>NW</GOK:label>
@@ -182,6 +186,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="north" bottom="2" type="mouse" top="1" right="3" left="1">
 		<GOK:label>N</GOK:label>
@@ -217,6 +222,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="northeast" bottom="2" type="mouse" top="1" right="4" left="3">
 		<GOK:label>NE</GOK:label>
@@ -252,6 +258,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="mousebutton" action="button1" top="1" right="6" left="4">
 		<GOK:label>Button 1</GOK:label>
@@ -287,6 +294,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="west" bottom="3" type="mouse" top="2" right="1" left="0">
 		<GOK:label>W</GOK:label>
@@ -322,6 +330,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="mousebutton" action="double1" top="2" right="3" left="1">
 		<GOK:label>Dbl Click</GOK:label>
@@ -357,6 +366,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="east" bottom="3" type="mouse" top="2" right="4" left="3">
 		<GOK:label>E</GOK:label>
@@ -392,6 +402,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="mousebutton" action="button2" top="2" right="6" left="4">
 		<GOK:label>Button 2</GOK:label>
@@ -427,6 +438,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="southwest" bottom="4" type="mouse" top="3" right="1" left="0">
 		<GOK:label>SW</GOK:label>
@@ -462,6 +474,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="south" bottom="4" type="mouse" top="3" right="3" left="1">
 		<GOK:label>S</GOK:label>
@@ -497,6 +510,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="southeast" bottom="4" type="mouse" top="3" right="4" left="3">
 		<GOK:label>SE</GOK:label>
@@ -531,9 +545,11 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="4" type="mousebutton" action="button3" top="3" right="6" left="4">
 		<GOK:label>Button 3</GOK:label>
+		
 		
 		
 		
Index: move-resize.kbd
===================================================================
RCS file: /cvs/gnome/gok/move-resize.kbd,v
retrieving revision 1.19
diff -u -r1.19 move-resize.kbd
--- move-resize.kbd	22 Mar 2004 17:37:11 -0000	1.19
+++ move-resize.kbd	30 Mar 2004 12:37:30 -0000
@@ -44,6 +44,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="north" bottom="1" type="dock" top="0" right="3" left="1">
 		<GOK:label>Dock Top</GOK:label>
@@ -78,6 +79,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="south" bottom="1" type="dock" top="0" right="5" left="3">
 		<GOK:label>Dock Bottom</GOK:label>
@@ -112,6 +114,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="fillwidth" bottom="1" type="move-resize" top="0" right="6" left="5">
 		<GOK:label>Fill</GOK:label>
@@ -147,6 +150,7 @@
 		
 		
 		
+		
 	</GOK:key>
 
 	<GOK:key dir="northwest" bottom="2" type="move-resize" top="1" right="1" left="0">
@@ -190,6 +194,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="northeast" bottom="2" type="move-resize" top="1" right="4" left="3">
 		<GOK:image type="fixed:20,20" align="right" source="NE.png" />
@@ -227,6 +232,7 @@
 		
 		
 		
+		
 	</GOK:key>
 
 	<GOK:key dir="west" bottom="3" type="move-resize" top="2" right="1" left="0">
@@ -267,6 +273,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="none" bottom="3" type="dock" top="2" right="3" left="1">
 		<GOK:label>Float</GOK:label>
@@ -302,6 +309,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="east" bottom="3" type="move-resize" top="2" right="4" left="3">
 		<GOK:label>Right</GOK:label>
@@ -340,6 +348,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="wider" bottom="3" type="move-resize" top="2" right="6" left="4">
 		<GOK:label>Wider</GOK:label>
@@ -375,6 +384,7 @@
 		
 		
 		
+		
 	</GOK:key>
 
 	<GOK:key dir="southwest" bottom="4" type="move-resize" top="3" right="1" left="0">
@@ -417,6 +427,7 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key dir="southeast" bottom="4" type="move-resize" top="3" right="4" left="3">
 		<GOK:image type="fixed:20,20" align="right" source="SE.png" />
@@ -455,6 +466,7 @@
 		
 		
 		
+		
 	</GOK:key>
 
 	<GOK:key bottom="5" type="branch" top="4" right="1" target="hide" left="0">
@@ -491,6 +503,7 @@
 		
 		
 		
+		
 	</GOK:key>
         <GOK:key bottom="5" type="repeat-next" top="4" right="4" left="1">
                 <GOK:label>Repeat Next Key</GOK:label>
@@ -530,9 +543,11 @@
                 
                 
                 
+                
         </GOK:key>
 	<GOK:key dir="taller" bottom="5" type="move-resize" top="4" right="6" left="4">
 		<GOK:label>Taller</GOK:label>
+		
 		
 		
 		
Index: quit.kbd
===================================================================
RCS file: /cvs/gnome/gok/quit.kbd,v
retrieving revision 1.11
diff -u -r1.11 quit.kbd
--- quit.kbd	22 Mar 2004 17:37:11 -0000	1.11
+++ quit.kbd	30 Mar 2004 12:37:30 -0000
@@ -44,10 +44,12 @@
 		
 		
 		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="normal" top="0" right="5" left="2">
 		<GOK:output type="internal">quit</GOK:output>
 		<GOK:label>Really Quit!</GOK:label>
+		
 		
 		
 		
Index: gok/gok-key.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-key.c,v
retrieving revision 1.90
diff -u -r1.90 gok-key.c
--- gok/gok-key.c	7 Mar 2004 00:09:42 -0000	1.90
+++ gok/gok-key.c	30 Mar 2004 12:37:30 -0000
@@ -1163,7 +1163,11 @@
 * gok_keylabel_new
 * @pKey: Pointer to the key that gets the new label.
 * @pLabelText: Text string for this label.
-* @pModifierText: Modifier text string (e.g. "shift" or "ctrl").
+* @level: the level (see XKB spec) for which this label is valid.
+* @group: the group (see XKB spec) for which this label is valid.
+* @vmods: a delimited list of virtual modifier names which must be matched 
+*         in order for this label to be valid, or NULL if no virtual 
+*         modifiers are relevant to this label.
 *
 * Allocates memory for a new key label and initializes the GokKeyLabel structure.
 * Returns a pointer to the new key label, NULL if it can't be created.
@@ -1527,27 +1531,42 @@
 	guint level;
 	guint group = gok_key_get_effective_group ();
 	guint mods = gok_spy_get_modmask ();
-	XkbDescRec *xkb;
-
-	xkb = gok_keyboard_get_xkb_desc (),
-	keycode = gok_output_get_keycode (pKey->pOutput);
-	type = gok_key_get_xkb_type_index (xkb, keycode, group);
+	XkbDescRec *xkb = gok_keyboard_get_xkb_desc ();
+	GokOutputType output_type = OUTPUT_INVALID;
 
 #ifdef GOK_DEBUG
 	char *typename = XGetAtomName (gok_keyboard_get_display (), xkb->map->types[type].name);
-	fprintf (stderr, "keycode %d, group %d, type=%d [%s]\n", keycode, group, type, typename);
 #endif
-	level = gok_key_level_for_type (gok_keyboard_get_display (), 
-					xkb,
-					type, &mods);
 
+	if (pKey->pOutput) output_type = pKey->pOutput->Type;
+	switch (output_type)
+	{
+	    case OUTPUT_KEYCODE:
+	    case OUTPUT_KEYSYM:
+		keycode = gok_output_get_keycode (pKey->pOutput);
+		type = gok_key_get_xkb_type_index (xkb, keycode, group);
+		
+#ifdef GOK_DEBUG
+		fprintf (stderr, "keycode %d, group %d, type=%d [%s]\n", keycode, group, type, typename);
+#endif
+		level = gok_key_level_for_type (gok_keyboard_get_display (), 
+						xkb,
+						type, &mods);
 #ifdef GOK_DEBUG
-	if (pKey->pLabel) fprintf (stderr, "Key %s: type %d, level %d [mods %x, preserved %x]\n", 
-				pKey->pLabel->Text,
-				type, level, gok_spy_get_modmask (), mods);
+		if (pKey->pLabel) fprintf (stderr, "Key %s: type %d, level %d [mods %x, preserved %x]\n", 
+					   pKey->pLabel->Text,
+					   type, level, gok_spy_get_modmask (), mods);
 #endif
+		break;
+	    case OUTPUT_KEYSTRING:
+		level = gok_key_level_for_type (gok_keyboard_get_display (), xkb, XkbAlphabeticIndex, &mods);
+		break;
+	    default:
+		break;
+	}
+		
 	g_assert (pKey != NULL);
-	
+		
 	pTextReturned = m_TextEmpty;
 	
 	/* get the 'normal' label */
Index: gok/gok-keyboard.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-keyboard.c,v
retrieving revision 1.140
diff -u -r1.140 gok-keyboard.c
--- gok/gok-keyboard.c	12 Mar 2004 09:36:00 -0000	1.140
+++ gok/gok-keyboard.c	30 Mar 2004 12:37:31 -0000
@@ -532,6 +532,10 @@
 					gchar *level3_string)
 {
 	GokKey *pKey = pKeyboard->pKeyFirst;
+	gboolean has_level_1 = (level1_string && *level1_string && strlen (level1_string));
+	gboolean has_level_2 = (level2_string && *level2_string && strlen (level2_string));
+	gboolean has_level_3 = (level3_string && *level3_string && strlen (level3_string));
+
 	while (pKey->pKeyNext) 
 	{
 		pKey = pKey->pKeyNext;
@@ -550,19 +554,19 @@
 		return;
 	}
 
-	if (*level1_string) 
+	if (has_level_1) 
 	{
 		gok_modifier_add ("shift");
 	        level1_string = g_utf8_strchr (level1_string, -1, '|');
 		if (level1_string) ++level1_string; /* works because '|' is one byte */
 	}
-	if (*level2_string)
+	if (has_level_2)
 	{
 		gok_modifier_add ("level2");
 	        level2_string = g_utf8_strchr (level2_string, -1, '|');
 		if (level2_string) ++level2_string; /* works because '|' is one byte */
 	}
-	if (*level3_string)
+	if (has_level_3)
 	{
 		gok_modifier_add ("level3");
 	        level3_string = g_utf8_strchr (level3_string, -1, '|');
@@ -587,23 +591,82 @@
 		if (*level1_string)
 		{
 			utf8_char [g_unichar_to_utf8 (g_utf8_get_char (level1_string), utf8_char)] = '\0';
-			gok_keylabel_new (pKey, utf8_char, 1, 1, NULL);
+			gok_keylabel_new (pKey, utf8_char, 1, 0, NULL);
 			level1_string = g_utf8_find_next_char (level1_string, NULL);
 		}
 		if (*level2_string)
 		{
 		  /* FIXME: get the appropriate modifiers and mod masks! */
 			utf8_char [g_unichar_to_utf8 (g_utf8_get_char (level2_string), utf8_char)] = '\0';
-			gok_keylabel_new (pKey, utf8_char, 2, 2, NULL);
+			gok_keylabel_new (pKey, utf8_char, 2, 0, NULL);
 			level2_string = g_utf8_find_next_char (level2_string, NULL);
 		}
 		if (*level3_string)
 		{
 			utf8_char [g_unichar_to_utf8 (g_utf8_get_char (level3_string), utf8_char)] = '\0';
-			gok_keylabel_new (pKey, utf8_char, 3, 3, NULL);
+			gok_keylabel_new (pKey, utf8_char, 3, 0, NULL);
 			level3_string = g_utf8_find_next_char (level3_string, NULL);
 		}
 	}
+
+	if (has_level_1) {
+		pKey = gok_key_new (pKey, NULL, pKeyboard);
+		pKey->has_text = TRUE;
+		pKey->Type = KEYTYPE_MODIFIER;
+		pKey->is_repeatable = TRUE;
+		pKey->Style = KEYSTYLE_NORMAL;
+		pKey->FontSize = -1;
+		pKey->FontSizeGroup = FONT_SIZE_GROUP_GLYPH;
+		/* TODO: mark this string ('shift') for translation! */
+		gok_keylabel_new (pKey, "shift", 0, 0, NULL);
+		pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "Shift_L", SPI_KEY_PRESSRELEASE);
+	}
+	if (has_level_2) {
+		pKey = gok_key_new (pKey, NULL, pKeyboard);
+		pKey->has_text = TRUE;
+		pKey->Type = KEYTYPE_MODIFIER;
+		pKey->is_repeatable = TRUE;
+		pKey->Style = KEYSTYLE_NORMAL;
+		pKey->FontSize = -1;
+		pKey->FontSizeGroup = FONT_SIZE_GROUP_UNIQUE;
+		/* TODO: mark this string ('Level 2') for translation! */
+		gok_keylabel_new (pKey, "Level 2", 0, 0, NULL);
+		pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "ISO_Level2_Latch", SPI_KEY_PRESSRELEASE);
+	}
+	if (has_level_3) {
+		pKey = gok_key_new (pKey, NULL, pKeyboard);
+		pKey->has_text = TRUE;
+		pKey->Type = KEYTYPE_MODIFIER;
+		pKey->is_repeatable = TRUE;
+		pKey->Style = KEYSTYLE_NORMAL;
+		pKey->FontSize = -1;
+		pKey->FontSizeGroup = FONT_SIZE_GROUP_UNIQUE;
+		/* TODO: mark this string ('Level 3') for translation! */
+		gok_keylabel_new (pKey, "Level 3", 0, 0, NULL);
+		pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "ISO_Level3_Latch", SPI_KEY_PRESSRELEASE);
+	}
+
+	pKey = gok_key_new (pKey, NULL, pKeyboard);
+	pKey->has_text = TRUE;
+	pKey->Type = KEYTYPE_NORMAL;
+	pKey->is_repeatable = TRUE;
+	pKey->Style = KEYSTYLE_NORMAL;
+	pKey->FontSize = -1;
+	pKey->FontSizeGroup = FONT_SIZE_GROUP_UNIQUE;
+	/* TODO: mark this string ('Back\nSpace') for translation! */
+	gok_keylabel_new (pKey, "Back\nSpace", 0, 0, NULL);
+	pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "BackSpace", SPI_KEY_PRESSRELEASE);
+
+	pKey = gok_key_new (pKey, NULL, pKeyboard);
+	pKey->has_text = TRUE;
+	pKey->Type = KEYTYPE_NORMAL;
+	pKey->is_repeatable = TRUE;
+	pKey->Style = KEYSTYLE_NORMAL;
+	pKey->FontSize = -1;
+	pKey->FontSizeGroup = FONT_SIZE_GROUP_UNIQUE;
+	/* TODO: mark this string ('Tab') for translation! */
+	gok_keylabel_new (pKey, "Tab", 0, 0, NULL);
+	pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "Tab", SPI_KEY_PRESSRELEASE);
 }
 
 /**
@@ -614,7 +677,7 @@
  * appropriate in the current GOK context/configuration.
  **/
 static GokKeyboard*
-gok_keyboard_compose_create (gchar *keyboard_name)
+gok_keyboard_compose_create (gchar *keyboard_name, KeyboardLayouts layout_type)
 {
 	GokKeyboard *pKeyboard = gok_keyboard_new ();
 	GokKey *pKey;
@@ -624,6 +687,7 @@
 	pKeyboard->bLaidOut = TRUE;
 	pKeyboard->bSupportsWordCompletion = TRUE;
 	pKeyboard->bSupportsCommandPrediction = FALSE;
+	pKeyboard->LayoutType = layout_type;
 	gok_log("gok_main_get_login");
 
 	acc_with_text = gok_spy_get_accessibleWithText ();
@@ -676,7 +740,7 @@
 	GokKeyboard *pKeyboard;
 	GokKey *pKey;
 	gok_log_enter();
-	pKeyboard = gok_keyboard_compose_create (ALPHA_KEYBOARD);
+	pKeyboard = gok_keyboard_compose_create (ALPHA_KEYBOARD, KEYBOARD_LAYOUT_NORMAL);
 
 	/* The third string is not used in the C locale but corresponds to a shift
 	 * level of '2' which is often associated with the AltGr key on physical keyboards.
@@ -725,7 +789,8 @@
 						 * placed here and in 'level 3' as well. 
 						 */
 						_("level 2|"),
-						/* For locales which need an even larger character set, add them to 'level 3' */
+						/* For locales which need an even larger character set, or offer uppercase versions
+						 * of the 'level2' characters, add them to 'level 3' */
 						_("level 3|")); 
 
 	pKeyboard->bRequiresLayout = TRUE;
@@ -755,7 +820,7 @@
 	GokKeyboard *pKeyboard;
 	GokKey *pKey;
 	gok_log_enter();
-	pKeyboard = gok_keyboard_compose_create (ALPHA_KEYBOARD);
+	pKeyboard = gok_keyboard_compose_create (FREQ_KEYBOARD, KEYBOARD_LAYOUT_UPPERL);
 
 	gok_keyboard_add_keys_from_charstrings (pKeyboard, 
 	/*
@@ -797,7 +862,7 @@
 {
 	GokKeyboard *pKeyboard;
 	gok_log_enter();
-	pKeyboard = gok_keyboard_compose_create (CORE_KEYBOARD);
+	pKeyboard = gok_keyboard_compose_create (CORE_KEYBOARD, KEYBOARD_LAYOUT_NORMAL);
 	if (gok_keyboard_add_keys_from_xkb_geom (pKeyboard, 
 						  gok_keyboard_get_xkb_desc ()))
 	{
Index: gok/gok-output.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-output.c,v
retrieving revision 1.26
diff -u -r1.26 gok-output.c
--- gok/gok-output.c	11 Mar 2004 00:51:47 -0000	1.26
+++ gok/gok-output.c	30 Mar 2004 12:37:31 -0000
@@ -63,11 +63,11 @@
 						      prediction_list);
 			break;
 		case OUTPUT_KEYSTRING:
-			/* TODO: Test! */
 			string = (gchar *) data;
 			if (string && g_utf8_validate (string, -1, NULL)) 
 			{
-				while (string) 
+			        letter = g_utf8_get_char (string);
+				while (letter && string) 
 				{
 					if (prediction_list)
 					{
@@ -76,12 +76,13 @@
 							g_free (prediction_list[i]);
 						g_free (prediction_list);
 					}
-					letter = g_utf8_get_char (string);
+
 					prediction_list = gok_wordcomplete_process_and_predict (
 						gok_wordcomplete_get_default (),
 						letter,
 						gok_data_get_num_predictions ());
 					string = g_utf8_next_char (string);
+					letter = g_utf8_get_char (string);
 				}
 				gok_keyboard_set_predictions (gok_main_get_current_keyboard (), 
 							      prediction_list);
Index: gok/gok-output.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-output.h,v
retrieving revision 1.8
diff -u -r1.8 gok-output.h
--- gok/gok-output.h	4 Feb 2004 16:03:21 -0000	1.8
+++ gok/gok-output.h	30 Mar 2004 12:37:31 -0000
@@ -32,6 +32,7 @@
 #endif /* __cplusplus */
 
 typedef enum {
+        OUTPUT_INVALID,
 	OUTPUT_KEYSYM,
 	OUTPUT_KEYCODE,
 	OUTPUT_KEYSTRING,
Index: gok/main.c
===================================================================
RCS file: /cvs/gnome/gok/gok/main.c,v
retrieving revision 1.143
diff -u -r1.143 main.c
--- gok/main.c	6 Mar 2004 22:52:43 -0000	1.143
+++ gok/main.c	30 Mar 2004 12:37:31 -0000
@@ -1549,7 +1549,6 @@
 	/* create the default "core" keyboard (aka qwerty keyboard) */
 	if (gok_data_get_use_xkb_kbd ()) {
 		pKeyboard = pKeyboardFirst = gok_keyboard_get_core ();
-		/* pKeyboard = pKeyboardFirst = gok_keyboard_get_alpha_by_frequency (); *//* TESTING ONLY!!!! */
 		if (pKeyboard)
 			pKeyboard->pKeyboardPrevious = NULL;
 		else
