Function xkbcommon::xkb::keysym_from_name [−][src]
pub fn keysym_from_name(name: &str, flags: KeysymFlags) -> Keysym
Get a keysym from its name.
name The name of a keysym. See remarks in xkb_keysym_get_name(); this function will accept any name returned by that function. flags A set of flags controlling how the search is done. If invalid flags are passed, this will fail with xkb::KEY_NoSymbol.
If you use the xkb::KEYSYM_CASE_INSENSITIVE flag and two keysym names differ only by case, then the lower-case keysym is returned. For instance, for KEY_a and KEY_A, this function would return KEY_a for the case-insensitive search. If this functionality is needed, it is recommended to first call this function without this flag; and if that fails, only then to try with this flag, while possibly warning the user he had misspelled the name, and might get wrong results.
Returns The keysym. If the name is invalid, returns xkb::KEY_NoSymbol.