indigo_term/event.rs
1use crate::{
2 ModeSetting,
3 key::{Key, KeyboardEnhancementFlags},
4};
5use tinyvec::TinyVec;
6
7#[derive(Debug, PartialEq)]
8pub enum Event {
9 KeyPress(Key),
10 KeyRepeat(Key),
11 KeyRelease(Key),
12 Resize {
13 height: u16,
14 width: u16,
15 },
16 /// Kitty keyboard protocol progressive enhancement flags
17 ///
18 /// <https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement>
19 KeyboardEnhancementFlags(KeyboardEnhancementFlags),
20 /// Primary device attributes
21 ///
22 /// <https://vt100.net/docs/vt510-rm/DA1.html>
23 Da1,
24 /// Report mode
25 ///
26 /// <https://vt100.net/docs/vt510-rm/DECRPM.html>
27 Decrpm {
28 mode: u16,
29 setting: ModeSetting,
30 },
31 /// Control Sequence Introducer
32 ///
33 /// <https://ghostty.org/docs/vt/concepts/sequences#csi>
34 UnknownCsi {
35 parameter_bytes: TinyVec<[u8; 32]>,
36 intermediate_bytes: TinyVec<[u8; 2]>,
37 final_byte: u8,
38 },
39 /// Operating System Command
40 ///
41 /// <https://ghostty.org/docs/vt/concepts/sequences#osc>
42 UnknownOsc {
43 data_bytes: TinyVec<[u8; 32]>,
44 },
45}