inkferro-core 0.1.0

Layout, text measurement, ANSI render, and frame-diff engine for inkferro — a Rust-backed, byte-for-byte drop-in for the ink terminal UI library.
Documentation
//! Kitty keyboard protocol modifier bits, ported from
//! [`kitty-keyboard.ts`](../../../ink/src/kitty-keyboard.ts).
//!
//! Only the `kittyModifiers` table is needed for input parsing; the flag
//! table and the terminal-negotiation/auto-detection machinery in
//! `kitty-keyboard.ts` are I/O and render-lifecycle concerns that are out of
//! scope for this pure parser (see the module-level docs in [`super`]).

/// Kitty keyboard modifier bits used in the modifier parameter of CSI-u
/// sequences. The actual modifier value is `(modifiers - 1)` per the protocol.
pub struct KittyModifierBits {
    pub shift: u32,
    pub alt: u32,
    pub ctrl: u32,
    pub super_key: u32,
    pub hyper: u32,
    pub meta: u32,
    pub caps_lock: u32,
    pub num_lock: u32,
}

/// 1:1 with `kittyModifiers` in `kitty-keyboard.ts`.
pub const KITTY_MODIFIERS: KittyModifierBits = KittyModifierBits {
    shift: 1,
    alt: 2,
    ctrl: 4,
    super_key: 8,
    hyper: 16,
    meta: 32,
    caps_lock: 64,
    num_lock: 128,
};