moonbit-community/tty/input does not have a README file
pub(all) enum InputEvent {
Key(KeyEvent)
Mouse(MouseEvent)
Paste(String)
FocusIn
FocusOut
Unknown(Bytes)
} derive(Eq, Debug)pub(all) enum KeyCode {
Char(Char)
Text
Enter
Tab
Backspace
Delete
Escape
Up
Down
Left
Right
Home
End
PageUp
PageDown
Insert
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24
F25
F26
F27
F28
F29
F30
F31
F32
F33
F34
F35
CapsLock
ScrollLock
NumLock
PrintScreen
Pause
Menu
KeypadBegin
Keypad0
Keypad1
Keypad2
Keypad3
Keypad4
Keypad5
Keypad6
Keypad7
Keypad8
Keypad9
KeypadDecimal
KeypadDivide
KeypadMultiply
KeypadMinus
KeypadPlus
KeypadEnter
KeypadEqual
KeypadSeparator
Media(MediaKeyCode)
Modifier(ModifierKeyCode)
} derive(Eq, Debug)pub struct KeyEvent {
code : KeyCode
modifiers : KeyModifiers
kind : KeyEventKind
state : KeyEventState
text : String?
shifted_code : KeyCode?
base_code : KeyCode?
} derive(Eq, Debug)fn KeyEvent::new(code : KeyCode, modifiers? : KeyModifiers, text? : String, kind? : KeyEventKind, state? : KeyEventState, shifted_code? : KeyCode, base_code? : KeyCode) -> KeyEventfn KeyModifiers::new(shift? : Bool, alt? : Bool, ctrl? : Bool, meta? : Bool, super_? : Bool, hyper? : Bool) -> KeyModifierspub struct MouseEvent {
kind : MouseEventKind
row : Int
col : Int
modifiers : KeyModifiers
} derive(Eq, Debug)fn MouseEvent::new(kind : MouseEventKind, row : Int, col : Int, modifiers? : KeyModifiers) -> MouseEventpub(all) enum MouseEventKind {
Press(MouseButton)
Release(MouseButton)
Drag(MouseButton)
Move
Scroll(MouseScroll)
} derive(Eq, Debug)Low-level terminal primitives for MoonBit native targets, including tty state, platform stdio handles, VT command output, and host input decoding.
Dependencies