keymaps 1.2.0

A rust crate which provides a standardized encoding for key codes
Documentation
// keymaps - A rust crate which provides a standardized encoding for key codes
//
// Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
// SPDX-License-Identifier: LGPL-3.0-or-later
//
// This file is part of the keymaps crate.
//
// You should have received a copy of the License along with this program.
// If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.

use pretty_assertions as _;
use serde_json as _;
use thiserror as _;

#[cfg(feature = "serde")]
use serde as _;

#[cfg(feature = "crossterm")]
use crossterm as _;

use keymaps::{
    key_repr::{Key, Keys},
    map_tree::Trie,
};

fn main() {
    let mut tree = Trie::<Key, &str>::new();

    let keys: Vec<Key> = Key::parse_multiple("<C-c>ab").unwrap();
    tree.insert(&keys, "first").unwrap();

    let keys: Vec<Key> = Key::parse_multiple("<CA-B>ac").unwrap();
    tree.insert(&keys, "second").unwrap();

    let keys: Keys = ("<AMC-0>d").parse().unwrap();
    tree.insert(&keys, "third").unwrap();

    println!("Got value: '{}'", tree.get(&keys).unwrap().value().unwrap());

    println!("Tree is: \n{tree}");
}