symbols: remove mention of keycodes in CopySymbolsDef Since now we only use the keycode in this function for logging, it's better not to mention the keycode at all because the XkbKeyGetKeycode macro is implemented using a dirty hack 0_0 The key name is sufficient to determine uniquely where to look. Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index a9879ec..ff089e7 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -1494,7 +1494,6 @@ static bool
CopySymbolsDef(SymbolsInfo *info, KeyInfo *keyi)
{
struct xkb_keymap *keymap = info->keymap;
- xkb_keycode_t kc;
struct xkb_key *key;
unsigned int sizeSyms = 0;
xkb_group_index_t i, nGroups;
@@ -1511,7 +1510,6 @@ CopySymbolsDef(SymbolsInfo *info, KeyInfo *keyi)
LongKeyNameText(keyi->name));
return false;
}
- kc = XkbKeyGetKeycode(keymap, key);
haveActions = false;
width = 0;
@@ -1543,10 +1541,10 @@ CopySymbolsDef(SymbolsInfo *info, KeyInfo *keyi)
else
log_vrb(info->keymap->ctx, 5,
"No automatic type for %d levels; "
- "Using %s for the %s key (keycode %d)\n",
+ "Using %s for the %s key\n",
darray_size(groupi->levels),
xkb_atom_text(keymap->ctx, groupi->type),
- LongKeyNameText(keyi->name), kc);
+ LongKeyNameText(keyi->name));
}
if (FindNamedType(keymap, groupi->type, &types[i])) {
@@ -1556,9 +1554,9 @@ CopySymbolsDef(SymbolsInfo *info, KeyInfo *keyi)
else {
log_vrb(info->keymap->ctx, 3,
"Type \"%s\" is not defined; "
- "Using default type for the %s key (keycode %d)\n",
+ "Using default type for the %s key\n",
xkb_atom_text(keymap->ctx, groupi->type),
- LongKeyNameText(keyi->name), kc);
+ LongKeyNameText(keyi->name));
/*
* Index 0 is guaranteed to contain something, usually
* ONE_LEVEL or at least some default one-level type.
@@ -1740,9 +1738,8 @@ CompileSymbols(XkbFile *file, struct xkb_keymap *keymap,
if (key->num_groups < 1)
log_info(info.keymap->ctx,
- "No symbols defined for %s (keycode %d)\n",
- KeyNameText(key->name),
- XkbKeyGetKeycode(keymap, key));
+ "No symbols defined for %s\n",
+ KeyNameText(key->name));
}
}