Skip to content

v0.5.1

Compare
Choose a tag to compare
@rhysd rhysd released this 12 Jul 14:51
· 63 commits to main since this release
  • Add serde optional feature. When it is enabled, some types support the serialization/deserialization with serde crate. See the document for more details. (#62, thanks @cestef)
    use tui_textarea::Input;
    
    let json = r#"
        {
            "key": { "Char": "a" },
            "ctrl": true,
            "alt": false,
            "shift": true
        }
    "#;
    
    let input: Input = serde_json::from_str(json).unwrap();
    println!("{input}");
    // Input {
    //     key: Key::Char('a'),
    //     ctrl: true,
    //     alt: false,
    //     shift: true,
    // }