Function mods_prefix_string

Source
pub fn mods_prefix_string(
    shift: bool,
    ctrl: bool,
    alt: bool,
    logo: bool,
) -> String
Expand description

Returns a string representing modifiers using the OS’s conventional names and ordering. For example, on Windows this function might produce “Ctrl + Shift + Alt + Win + “ while on macOS it might produce “Ctrl + Option + Shift

  • Cmd + “.
Examples found in repository?
examples/all_keys.rs (line 10)
3
4
5
6
7
8
9
10
11
12
fn main() {
    for &key in ALL_KEYS {
        println!("{:>30} -> {:?}", format!("{:?}", key), key_name(key));
    }
    println!();
    println!(
        "Modifiers: {}<key>",
        mods_prefix_string(true, true, true, true),
    );
}