keybindings: Introduce resolve_special_key_combo()

Special keys are going to be represent by up to two combos. This
functions is able to handle them by adding all the keycodes that
these combos resolve to. Special keys don't have modifiers, so there
is no need to devirtualize them.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4050>
This commit is contained in:
Alessandro Bono 2024-09-26 00:20:35 +02:00 committed by Marge Bot
parent ea53865962
commit b48c7536ab

View File

@ -631,6 +631,22 @@ index_binding (MetaKeyBindingManager *keys,
}
}
static void
resolve_special_key_combo (MetaKeyBindingManager *keys,
MetaKeyCombo combos[2],
MetaResolvedKeyCombo *resolved_combo)
{
resolved_key_combo_reset (resolved_combo);
get_keycodes_for_combos (keys,
combos,
2,
&resolved_combo->keycodes,
&resolved_combo->len);
resolved_combo->mask = 0;
}
static void
resolve_key_combo (MetaKeyBindingManager *keys,
MetaKeyCombo *combo,