argui-core 0.2.1

Geometry, color, identifiers and shared primitives for Argui
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use argui_core::{ImeInput, Key, KeyInput, KeyState, Modifiers};

#[test]
fn keyboard_and_ime_data_remain_platform_independent() {
    let input = KeyInput {
        key: Key::Character("v".into()),
        state: KeyState::Pressed,
        modifiers: Modifiers {
            control: true,
            ..Modifiers::default()
        },
        repeat: false,
        text: Some("v".into()),
    };
    assert!(input.modifiers.command());
    assert_eq!(ImeInput::Commit("é".into()), ImeInput::Commit("é".into()));
}