Add ability to create character sequences as Input
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user