Add ability to create character sequences as Input

This commit is contained in:
Alexander Heldt
2025-11-16 20:37:34 +01:00
parent 78cc3647c7
commit fee776b352
3 changed files with 50 additions and 17 deletions

View File

@@ -2,13 +2,14 @@ import gleam/json
import gleam/result
import gleam/string
import input/key.{type Key, Char}
import input/key.{type Key}
import mpv/internal/control as internal_control
import tcp/reason.{type Reason}
import tcp/tcp.{type Socket}
pub type Control {
TogglePlayPause
Exit
}
@@ -18,7 +19,7 @@ pub type ControlError {
pub fn from_key(key: Key) -> Result(Control, Nil) {
case key {
Char(char) -> char_control(char)
key.Char(char) -> char_control(char)
_ -> Error(Nil)
}
}