1 /************************************************************
2 * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
4 * Permission to use, copy, modify, and distribute this
5 * software and its documentation for any purpose and without
6 * fee is hereby granted, provided that the above copyright
7 * notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting
9 * documentation, and that the name of Silicon Graphics not be
10 * used in advertising or publicity pertaining to distribution
11 * of the software without specific prior written permission.
12 * Silicon Graphics makes no representation about the suitability
13 * of this software for any purpose. It is provided "as is"
14 * without any express or implied warranty.
16 * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19 * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
23 * THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 ********************************************************/
27 #include "xkbcomp-priv.h"
29 #include "parseutils.h"
31 typedef struct _AliasInfo {
32 enum merge_mode merge;
36 char alias[XkbKeyNameLength + 1];
37 char real[XkbKeyNameLength + 1];
40 typedef struct _IndicatorNameInfo {
41 enum merge_mode merge;
50 typedef struct _KeyNamesInfo {
51 char *name; /* e.g. evdev+aliases(qwerty) */
54 enum merge_mode merge;
55 xkb_keycode_t computedMin; /* lowest keycode stored */
56 xkb_keycode_t computedMax; /* highest keycode stored */
57 xkb_keycode_t explicitMin;
58 xkb_keycode_t explicitMax;
59 darray(unsigned long) names;
60 darray(unsigned int) files;
66 HandleKeycodesFile(XkbFile *file, struct xkb_keymap *keymap,
67 enum merge_mode merge,
71 ResizeKeyNameArrays(KeyNamesInfo *info, int newMax)
73 if (newMax < darray_size(info->names))
76 darray_resize0(info->names, newMax + 1);
77 darray_resize0(info->files, newMax + 1);
81 InitAliasInfo(AliasInfo *info, enum merge_mode merge, unsigned file_id,
82 char *alias, char *real)
84 memset(info, 0, sizeof(*info));
86 info->file_id = file_id;
87 strncpy(info->alias, alias, XkbKeyNameLength);
88 strncpy(info->real, real, XkbKeyNameLength);
92 InitIndicatorNameInfo(IndicatorNameInfo * ii, KeyNamesInfo * info)
94 ii->merge = info->merge;
95 ii->file_id = info->file_id;
97 ii->name = XKB_ATOM_NONE;
101 static IndicatorNameInfo *
102 NextIndicatorName(KeyNamesInfo * info)
104 IndicatorNameInfo *ii;
106 ii = malloc(sizeof(*ii));
110 InitIndicatorNameInfo(ii, info);
111 list_append(&ii->entry, &info->leds);
116 static IndicatorNameInfo *
117 FindIndicatorByIndex(KeyNamesInfo * info, int ndx)
119 IndicatorNameInfo *old;
121 list_foreach(old, &info->leds, entry)
128 static IndicatorNameInfo *
129 FindIndicatorByName(KeyNamesInfo * info, xkb_atom_t name)
131 IndicatorNameInfo *old;
133 list_foreach(old, &info->leds, entry)
134 if (old->name == name)
141 AddIndicatorName(KeyNamesInfo *info, struct xkb_keymap *keymap,
142 enum merge_mode merge,
143 IndicatorNameInfo *new)
145 IndicatorNameInfo *old;
148 replace = (merge == MERGE_REPLACE) || (merge == MERGE_OVERRIDE);
150 old = FindIndicatorByName(info, new->name);
152 if ((old->file_id == new->file_id && warningLevel > 0) ||
154 WARN("Multiple indicators named %s\n",
155 xkb_atom_text(keymap->ctx, new->name));
156 if (old->ndx == new->ndx) {
157 if (old->virtual != new->virtual) {
159 old->virtual = new->virtual;
160 ACTION("Using %s instead of %s\n",
161 (old->virtual ? "virtual" : "real"),
162 (old->virtual ? "real" : "virtual"));
165 ACTION("Identical definitions ignored\n");
171 ACTION("Ignoring %d, using %d\n", old->ndx, new->ndx);
173 ACTION("Using %d, ignoring %d\n", old->ndx, new->ndx);
177 list_del(&old->entry);
183 old = FindIndicatorByIndex(info, new->ndx);
185 if ((old->file_id == new->file_id && warningLevel > 0) ||
187 WARN("Multiple names for indicator %d\n", new->ndx);
188 if ((old->name == new->name) && (old->virtual == new->virtual))
189 ACTION("Identical definitions ignored\n");
191 const char *oldType, *newType;
192 xkb_atom_t using, ignoring;
194 oldType = "virtual indicator";
196 oldType = "real indicator";
198 newType = "virtual indicator";
200 newType = "real indicator";
203 ignoring = old->name;
207 ignoring = new->name;
209 ACTION("Using %s %s, ignoring %s %s\n",
210 oldType, xkb_atom_text(keymap->ctx, using),
211 newType, xkb_atom_text(keymap->ctx, ignoring));
215 old->name = new->name;
216 old->virtual = new->virtual;
221 new = NextIndicatorName(info);
223 WSGO("Couldn't allocate name for indicator %d\n", old->ndx);
227 new->name = old->name;
229 new->virtual = old->virtual;
234 ClearKeyNamesInfo(KeyNamesInfo * info)
236 AliasInfo *alias, *next_alias;
237 IndicatorNameInfo *ii, *next_ii;
241 info->computedMax = info->explicitMax = info->explicitMin = 0;
242 info->computedMin = XKB_KEYCODE_MAX;
243 darray_free(info->names);
244 darray_free(info->files);
245 list_foreach_safe(ii, next_ii, &info->leds, entry)
247 list_foreach_safe(alias, next_alias, &info->aliases, entry)
249 list_init(&info->aliases);
253 InitKeyNamesInfo(KeyNamesInfo * info, unsigned file_id)
256 list_init(&info->leds);
257 list_init(&info->aliases);
258 info->file_id = file_id;
259 darray_init(info->names);
260 darray_init(info->files);
261 ClearKeyNamesInfo(info);
262 info->errorCount = 0;
266 FindKeyByLong(KeyNamesInfo * info, unsigned long name)
270 for (i = info->computedMin; i <= info->computedMax; i++)
271 if (darray_item(info->names, i) == name)
278 * Store the name of the key as a long in the info struct under the given
279 * keycode. If the same keys is referred to twice, print a warning.
280 * Note that the key's name is stored as a long, the keycode is the index.
283 AddKeyName(KeyNamesInfo * info,
284 xkb_keycode_t kc, char *name, enum merge_mode merge,
285 unsigned file_id, bool reportCollisions)
290 ResizeKeyNameArrays(info, kc);
292 if (kc < info->computedMin)
293 info->computedMin = kc;
294 if (kc > info->computedMax)
295 info->computedMax = kc;
296 lval = KeyNameToLong(name);
298 if (reportCollisions) {
299 reportCollisions = (warningLevel > 7 ||
301 file_id == darray_item(info->files, kc)));
304 if (darray_item(info->names, kc) != 0) {
307 LongToKeyName(darray_item(info->names, kc), buf);
309 if (darray_item(info->names, kc) == lval && reportCollisions) {
310 WARN("Multiple identical key name definitions\n");
311 ACTION("Later occurences of \"<%s> = %d\" ignored\n",
315 if (merge == MERGE_AUGMENT) {
316 if (reportCollisions) {
317 WARN("Multiple names for keycode %d\n", kc);
318 ACTION("Using <%s>, ignoring <%s>\n", buf, name);
323 if (reportCollisions) {
324 WARN("Multiple names for keycode %d\n", kc);
325 ACTION("Using <%s>, ignoring <%s>\n", name, buf);
327 darray_item(info->names, kc) = 0;
328 darray_item(info->files, kc) = 0;
331 old = FindKeyByLong(info, lval);
332 if ((old != 0) && (old != kc)) {
333 if (merge == MERGE_OVERRIDE) {
334 darray_item(info->names, old) = 0;
335 darray_item(info->files, old) = 0;
336 if (reportCollisions) {
337 WARN("Key name <%s> assigned to multiple keys\n", name);
338 ACTION("Using %d, ignoring %d\n", kc, old);
342 if ((reportCollisions) && (warningLevel > 3)) {
343 WARN("Key name <%s> assigned to multiple keys\n", name);
344 ACTION("Using %d, ignoring %d\n", old, kc);
349 darray_item(info->names, kc) = lval;
350 darray_item(info->files, kc) = file_id;
354 /***====================================================================***/
357 HandleAliasDef(KeyAliasDef *def, enum merge_mode merge, unsigned file_id,
361 MergeAliases(KeyNamesInfo *into, KeyNamesInfo *from, enum merge_mode merge)
363 AliasInfo *alias, *next;
366 if (list_empty(&from->aliases))
369 if (list_empty(&into->aliases)) {
370 list_replace(&from->aliases, &into->aliases);
371 list_init(&from->aliases);
375 memset(&def, 0, sizeof(def));
377 list_foreach_safe(alias, next, &from->aliases, entry) {
378 def.merge = (merge == MERGE_DEFAULT) ? alias->merge : merge;
379 memcpy(def.alias, alias->alias, XkbKeyNameLength);
380 memcpy(def.real, alias->real, XkbKeyNameLength);
382 if (!HandleAliasDef(&def, def.merge, alias->file_id, into))
390 MergeIncludedKeycodes(KeyNamesInfo *into, struct xkb_keymap *keymap,
391 KeyNamesInfo *from, enum merge_mode merge)
395 IndicatorNameInfo *led;
397 if (from->errorCount > 0) {
398 into->errorCount += from->errorCount;
401 if (into->name == NULL) {
402 into->name = from->name;
406 ResizeKeyNameArrays(into, from->computedMax);
408 for (i = from->computedMin; i <= from->computedMax; i++) {
409 if (darray_item(from->names, i) == 0)
411 LongToKeyName(darray_item(from->names, i), buf);
413 if (!AddKeyName(into, i, buf, merge, from->file_id, false))
417 list_foreach(led, &from->leds, entry) {
418 led->merge = (merge == MERGE_DEFAULT ? led->merge : merge);
419 if (!AddIndicatorName(into, keymap, led->merge, led))
423 if (!MergeAliases(into, from, merge))
425 if (from->explicitMin != 0) {
426 if ((into->explicitMin == 0)
427 || (into->explicitMin > from->explicitMin))
428 into->explicitMin = from->explicitMin;
430 if (from->explicitMax > 0) {
431 if ((into->explicitMax == 0)
432 || (into->explicitMax < from->explicitMax))
433 into->explicitMax = from->explicitMax;
438 * Handle the given include statement (e.g. "include "evdev+aliases(qwerty)").
440 * @param stmt The include statement from the keymap file.
441 * @param keymap Unused for all but the keymap->flags.
442 * @param info Struct to store the key info in.
445 HandleIncludeKeycodes(IncludeStmt *stmt, struct xkb_keymap *keymap,
448 enum merge_mode newMerge;
450 KeyNamesInfo included;
452 /* XXX: What's that? */
453 if (stmt->file && strcmp(stmt->file, "computed") == 0) {
454 keymap->flags |= AutoKeyNames;
455 info->explicitMin = 0;
456 info->explicitMax = XKB_KEYCODE_MAX;
457 return (info->errorCount == 0);
460 if (!ProcessIncludeFile(keymap->ctx, stmt, FILE_TYPE_KEYCODES, &rtrn,
462 info->errorCount += 10;
466 InitKeyNamesInfo(&included, rtrn->id);
467 HandleKeycodesFile(rtrn, keymap, MERGE_OVERRIDE, &included);
470 included.name = stmt->stmt;
475 if (stmt->next && included.errorCount < 1) {
478 KeyNamesInfo next_incl;
480 for (next = stmt->next; next != NULL; next = next->next) {
481 if (!ProcessIncludeFile(keymap->ctx, next, FILE_TYPE_KEYCODES,
483 info->errorCount += 10;
484 ClearKeyNamesInfo(&included);
488 InitKeyNamesInfo(&next_incl, rtrn->id);
489 HandleKeycodesFile(rtrn, keymap, MERGE_OVERRIDE, &next_incl);
490 MergeIncludedKeycodes(&included, keymap, &next_incl, op);
491 ClearKeyNamesInfo(&next_incl);
496 MergeIncludedKeycodes(info, keymap, &included, newMerge);
497 ClearKeyNamesInfo(&included);
499 return (info->errorCount == 0);
503 * Parse the given statement and store the output in the info struct.
507 HandleKeycodeDef(KeycodeDef *stmt, enum merge_mode merge, KeyNamesInfo *info)
509 if ((info->explicitMin != 0 && stmt->value < info->explicitMin) ||
510 (info->explicitMax != 0 && stmt->value > info->explicitMax)) {
511 ERROR("Illegal keycode %lu for name <%s>\n", stmt->value, stmt->name);
512 ACTION("Must be in the range %d-%d inclusive\n",
514 info->explicitMax ? info->explicitMax : XKB_KEYCODE_MAX);
517 if (stmt->merge != MERGE_DEFAULT) {
518 if (stmt->merge == MERGE_REPLACE)
519 merge = MERGE_OVERRIDE;
523 return AddKeyName(info, stmt->value, stmt->name, merge, info->file_id,
528 HandleAliasCollision(AliasInfo *old, AliasInfo *new)
530 if (strncmp(new->real, old->real, XkbKeyNameLength) == 0) {
531 if ((new->file_id == old->file_id && warningLevel > 0) ||
533 WARN("Alias of %s for %s declared more than once\n",
534 XkbcKeyNameText(new->alias), XkbcKeyNameText(new->real));
535 ACTION("First definition ignored\n");
541 if (new->merge == MERGE_AUGMENT) {
550 if ((old->file_id == new->file_id && warningLevel > 0) ||
552 WARN("Multiple definitions for alias %s\n",
553 XkbcKeyNameText(old->alias));
554 ACTION("Using %s, ignoring %s\n",
555 XkbcKeyNameText(use), XkbcKeyNameText(ignore));
558 if (use != old->real)
559 memcpy(old->real, use, XkbKeyNameLength);
562 old->file_id = new->file_id;
563 old->merge = new->merge;
567 HandleAliasDef(KeyAliasDef *def, enum merge_mode merge, unsigned file_id,
572 list_foreach(alias, &info->aliases, entry) {
573 if (strncmp(alias->alias, def->alias, XkbKeyNameLength) == 0) {
575 InitAliasInfo(&new, merge, file_id, def->alias, def->real);
576 HandleAliasCollision(alias, &new);
581 alias = calloc(1, sizeof(*alias));
583 WSGO("Allocation failure in HandleAliasDef\n");
587 alias->file_id = file_id;
588 alias->merge = merge;
589 memcpy(alias->alias, def->alias, XkbKeyNameLength);
590 memcpy(alias->real, def->real, XkbKeyNameLength);
591 list_append(&alias->entry, &info->aliases);
596 #define MIN_KEYCODE_DEF 0
597 #define MAX_KEYCODE_DEF 1
600 * Handle the minimum/maximum statement of the xkb file.
601 * Sets explicitMin/Max of the info struct.
603 * @return 1 on success, 0 otherwise.
606 HandleKeyNameVar(VarDef *stmt, struct xkb_keymap *keymap, KeyNamesInfo *info)
608 ExprResult tmp, field;
612 if (ExprResolveLhs(keymap, stmt->name, &tmp, &field, &arrayNdx) == 0)
613 return 0; /* internal error, already reported */
615 if (tmp.str != NULL) {
616 ERROR("Unknown element %s encountered\n", tmp.str);
617 ACTION("Default for field %s ignored\n", field.str);
620 if (strcasecmp(field.str, "minimum") == 0)
621 which = MIN_KEYCODE_DEF;
622 else if (strcasecmp(field.str, "maximum") == 0)
623 which = MAX_KEYCODE_DEF;
625 ERROR("Unknown field encountered\n");
626 ACTION("Assigment to field %s ignored\n", field.str);
629 if (arrayNdx != NULL) {
630 ERROR("The %s setting is not an array\n", field.str);
631 ACTION("Illegal array reference ignored\n");
635 if (ExprResolveKeyCode(keymap->ctx, stmt->value, &tmp) == 0) {
636 ACTION("Assignment to field %s ignored\n", field.str);
639 if (tmp.uval > XKB_KEYCODE_MAX) {
641 ("Illegal keycode %d (must be in the range %d-%d inclusive)\n",
642 tmp.uval, 0, XKB_KEYCODE_MAX);
643 ACTION("Value of \"%s\" not changed\n", field.str);
646 if (which == MIN_KEYCODE_DEF) {
647 if ((info->explicitMax > 0) && (info->explicitMax < tmp.uval)) {
649 ("Minimum key code (%d) must be <= maximum key code (%d)\n",
650 tmp.uval, info->explicitMax);
651 ACTION("Minimum key code value not changed\n");
654 if ((info->computedMax > 0) && (info->computedMin < tmp.uval)) {
656 ("Minimum key code (%d) must be <= lowest defined key (%d)\n",
657 tmp.uval, info->computedMin);
658 ACTION("Minimum key code value not changed\n");
661 info->explicitMin = tmp.uval;
663 if (which == MAX_KEYCODE_DEF) {
664 if ((info->explicitMin > 0) && (info->explicitMin > tmp.uval)) {
665 ERROR("Maximum code (%d) must be >= minimum key code (%d)\n",
666 tmp.uval, info->explicitMin);
667 ACTION("Maximum code value not changed\n");
670 if ((info->computedMax > 0) && (info->computedMax > tmp.uval)) {
672 ("Maximum code (%d) must be >= highest defined key (%d)\n",
673 tmp.uval, info->computedMax);
674 ACTION("Maximum code value not changed\n");
677 info->explicitMax = tmp.uval;
689 HandleIndicatorNameDef(IndicatorNameDef *def, struct xkb_keymap *keymap,
690 enum merge_mode merge, KeyNamesInfo *info)
692 IndicatorNameInfo ii;
695 if ((def->ndx < 1) || (def->ndx > XkbNumIndicators)) {
697 ERROR("Name specified for illegal indicator index %d\n", def->ndx);
701 InitIndicatorNameInfo(&ii, info);
703 if (!ExprResolveString(keymap->ctx, def->name, &tmp)) {
705 snprintf(buf, sizeof(buf), "%d", def->ndx);
707 return ReportBadType("indicator", "name", buf, "string");
709 ii.name = xkb_atom_intern(keymap->ctx, tmp.str);
711 ii.virtual = def->virtual;
712 if (!AddIndicatorName(info, keymap, merge, &ii))
718 * Handle the xkb_keycodes section of a xkb file.
719 * All information about parsed keys is stored in the info struct.
721 * Such a section may have include statements, in which case this function is
722 * semi-recursive (it calls HandleIncludeKeycodes, which may call
723 * HandleKeycodesFile again).
725 * @param file The input file (parsed xkb_keycodes section)
726 * @param xkb Necessary to pass down, may have flags changed.
727 * @param merge Merge strategy (MERGE_OVERRIDE, etc.)
728 * @param info Struct to contain the fully parsed key information.
731 HandleKeycodesFile(XkbFile *file, struct xkb_keymap *keymap,
732 enum merge_mode merge, KeyNamesInfo *info)
737 info->name = uDupString(file->name);
741 switch (stmt->stmtType) {
742 case StmtInclude: /* e.g. include "evdev+aliases(qwerty)" */
743 if (!HandleIncludeKeycodes((IncludeStmt *) stmt, keymap, info))
746 case StmtKeycodeDef: /* e.g. <ESC> = 9; */
747 if (!HandleKeycodeDef((KeycodeDef *) stmt, merge, info))
750 case StmtKeyAliasDef: /* e.g. alias <MENU> = <COMP>; */
751 if (!HandleAliasDef((KeyAliasDef *) stmt, merge, info->file_id,
755 case StmtVarDef: /* e.g. minimum, maximum */
756 if (!HandleKeyNameVar((VarDef *) stmt, keymap, info))
759 case StmtIndicatorNameDef: /* e.g. indicator 1 = "Caps Lock"; */
760 if (!HandleIndicatorNameDef((IndicatorNameDef *) stmt, keymap,
766 ERROR("Keycode files may define key and indicator names only\n");
767 ACTION("Ignoring definition of %s\n",
769 StmtInterpDef) ? "a symbol interpretation" :
770 "virtual modifiers"));
774 WSGO("Unexpected statement type %d in HandleKeycodesFile\n",
779 if (info->errorCount > 10) {
781 ERROR("Too many errors\n");
783 ACTION("Abandoning keycodes file \"%s\"\n", file->topName);
790 ApplyAliases(struct xkb_keymap *keymap, KeyNamesInfo *info)
794 struct xkb_key_alias *old, *a;
795 AliasInfo *alias, *next;
798 nOld = darray_size(keymap->key_aliases);
799 old = &darray_item(keymap->key_aliases, 0);
801 list_foreach(alias, &info->aliases, entry) {
804 lname = KeyNameToLong(alias->real);
805 key = FindNamedKey(keymap, lname, false, CreateKeyNames(keymap), 0);
807 if (warningLevel > 4) {
808 WARN("Attempt to alias %s to non-existent key %s\n",
809 XkbcKeyNameText(alias->alias),
810 XkbcKeyNameText(alias->real));
813 alias->alias[0] = '\0';
817 lname = KeyNameToLong(alias->alias);
818 key = FindNamedKey(keymap, lname, false, false, 0);
820 if (warningLevel > 4) {
821 WARN("Attempt to create alias with the name of a real key\n");
822 ACTION("Alias \"%s = %s\" ignored\n",
823 XkbcKeyNameText(alias->alias),
824 XkbcKeyNameText(alias->real));
826 alias->alias[0] = '\0';
835 for (i = 0, a = old; i < nOld; i++, a++) {
838 if (strncmp(a->alias, alias->alias, XkbKeyNameLength) != 0)
841 InitAliasInfo(&old_alias, MERGE_AUGMENT, 0, a->alias, a->real);
842 HandleAliasCollision(&old_alias, alias);
843 memcpy(old_alias.real, a->real, XkbKeyNameLength);
844 alias->alias[0] = '\0';
853 darray_resize0(keymap->key_aliases, nOld + nNew);
855 a = &darray_item(keymap->key_aliases, nOld);
856 list_foreach(alias, &info->aliases, entry) {
857 if (alias->alias[0] != '\0') {
858 strncpy(a->alias, alias->alias, XkbKeyNameLength);
859 strncpy(a->real, alias->real, XkbKeyNameLength);
865 list_foreach_safe(alias, next, &info->aliases, entry)
867 list_init(&info->aliases);
872 * Compile the xkb_keycodes section, parse it's output, return the results.
874 * @param file The parsed XKB file (may have include statements requiring
876 * @param result The effective keycodes, as gathered from the file.
877 * @param merge Merge strategy.
879 * @return true on success, false otherwise.
882 CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap,
883 enum merge_mode merge)
886 KeyNamesInfo info; /* contains all the info after parsing */
887 IndicatorNameInfo *ii;
889 InitKeyNamesInfo(&info, file->id);
891 HandleKeycodesFile(file, keymap, merge, &info);
893 /* all the keys are now stored in info */
895 if (info.errorCount != 0)
898 if (info.explicitMin > 0) /* if "minimum" statement was present */
899 keymap->min_key_code = info.explicitMin;
901 keymap->min_key_code = info.computedMin;
903 if (info.explicitMax > 0) /* if "maximum" statement was present */
904 keymap->max_key_code = info.explicitMax;
906 keymap->max_key_code = info.computedMax;
908 darray_resize0(keymap->keys, keymap->max_key_code + 1);
909 for (kc = info.computedMin; kc <= info.computedMax; kc++)
910 LongToKeyName(darray_item(info.names, kc),
911 XkbKey(keymap, kc)->name);
914 keymap->keycodes_section_name = strdup(info.name);
916 list_foreach(ii, &info.leds, entry) {
917 free(keymap->indicator_names[ii->ndx - 1]);
918 keymap->indicator_names[ii->ndx - 1] =
919 xkb_atom_strdup(keymap->ctx, ii->name);
922 ApplyAliases(keymap, &info);
924 ClearKeyNamesInfo(&info);
928 ClearKeyNamesInfo(&info);