Module i_slint_common::key_codes
source · Expand description
This module is meant to be included by different crate and each crate must define the macro for_each_keys
The key code comes from https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CORPCHAR.TXT the names comes should match with https://www.w3.org/TR/uievents-key/#named-key-attribute-values,
The format is a semicolon separated list of keys
<char code> # Slint name # Qt code # Winit code # xkb code
§Example
macro_rules! do_something_with_keys {
($($char:literal # $name:ident # $($qt:ident)|* # $($winit:ident $(($_pos:ident))?)|* # $($xkb:ident)|* ;)*) => {
//...
};
}
i_slint_common::for_each_special_keys!(do_something_with_keys);