fn kitty_function_code()

in crates/figterm/src/input/mod.rs [280:391]


    fn kitty_function_code(self) -> Option<u32> {
        use KeyCode::{
            Add,
            ApplicationDownArrow,
            ApplicationLeftArrow,
            ApplicationRightArrow,
            ApplicationUpArrow,
            Backspace,
            CapsLock,
            Decimal,
            Divide,
            End,
            Enter,
            Escape,
            Function,
            Home,
            Insert,
            LeftAlt,
            LeftControl,
            LeftShift,
            LeftWindows,
            MediaNextTrack,
            MediaPlayPause,
            MediaPrevTrack,
            MediaStop,
            Menu,
            Multiply,
            NumLock,
            Numpad0,
            Numpad1,
            Numpad2,
            Numpad3,
            Numpad4,
            Numpad5,
            Numpad6,
            Numpad7,
            Numpad8,
            Numpad9,
            PageDown,
            PageUp,
            Pause,
            PrintScreen,
            RightAlt,
            RightControl,
            RightShift,
            RightWindows,
            ScrollLock,
            Separator,
            Subtract,
            Tab,
            VolumeDown,
            VolumeMute,
            VolumeUp,
        };
        Some(match self {
            Escape => 27,
            Enter => 13,
            Tab => 9,
            Backspace => 127,
            CapsLock => 57358,
            ScrollLock => 57359,
            NumLock => 57360,
            PrintScreen => 57361,
            Pause => 57362,
            Menu => 57363,
            Function(n) if (13..=35).contains(&n) => 57376 + n as u32 - 13,
            Numpad0 => 57399,
            Numpad1 => 57400,
            Numpad2 => 57401,
            Numpad3 => 57402,
            Numpad4 => 57403,
            Numpad5 => 57404,
            Numpad6 => 57405,
            Numpad7 => 57406,
            Numpad8 => 57407,
            Numpad9 => 57408,
            Decimal => 57409,
            Divide => 57410,
            Multiply => 57411,
            Subtract => 57412,
            Add => 57413,
            // KeypadEnter => 57414,
            // KeypadEquals => 57415,
            Separator => 57416,
            ApplicationLeftArrow => 57417,
            ApplicationRightArrow => 57418,
            ApplicationUpArrow => 57419,
            ApplicationDownArrow => 57420,
            PageUp => 57421,
            PageDown => 57422,
            Home => 57423,
            End => 57424,
            Insert => 57425,
            // KeypadDelete => 57426,
            MediaPlayPause => 57430,
            MediaStop => 57432,
            MediaNextTrack => 57435,
            MediaPrevTrack => 57436,
            VolumeDown => 57436,
            VolumeUp => 57439,
            VolumeMute => 57440,
            LeftShift => 57441,
            LeftControl => 57442,
            LeftAlt => 57443,
            LeftWindows => 57444,
            RightShift => 57447,
            RightControl => 57448,
            RightAlt => 57449,
            RightWindows => 57450,
            _ => return None,
        })
    }