summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--symbols.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/symbols.c b/symbols.c
index e11ba85..47ad67b 100644
--- a/symbols.c
+++ b/symbols.c
@@ -2079,8 +2079,15 @@ CopySymbolsDef(XkbFileInfo * result, KeyInfo * key, int start_from)
xkb->map->key_sym_map[kc].width = width;
for (i = 0; i < nGroups; i++)
{
- /* assign kt_index[i] to the index of the type in map->types */
- xkb->map->key_sym_map[kc].kt_index[i] = types[i];
+ /* assign kt_index[i] to the index of the type in map->types.
+ * kt_index[i] may have been set by a previous run (if we have two
+ * layouts specified). Let's not overwrite it with the ONE_LEVEL
+ * default group if we dont even have keys for this group anyway.
+ *
+ * FIXME: There should be a better fix for this.
+ */
+ if (key->numLevels[i])
+ xkb->map->key_sym_map[kc].kt_index[i] = types[i];
if (key->syms[i] != NULL)
{
/* fill key to "width" symbols*/