Simplify input capture

Instead of "injecting" characters into the input stream, the input
stream is now forwarded to the `musicplayer`. It has will have to
decide what to do with the stream, e.g. by setting the "mode" to
something that captures the input stream and acts upon it
This commit is contained in:
Alexander Heldt
2025-11-28 23:32:45 +01:00
parent 35d331a753
commit dd9468938d
7 changed files with 98 additions and 105 deletions

View File

@@ -8,15 +8,13 @@ import musicplayer/ui/ui
pub fn main() -> Nil {
let input_keys_name: Name(Key) = process.new_name("input_keys")
let input_inject_name: Name(Key) = process.new_name("input_inject_keys")
input.new(input_keys_name, input_inject_name)
input.new(input_keys_name)
let assert Ok(ui) = ui.new()
let assert Ok(mpv) = mpv.new()
let exit = process.new_subject()
let assert Ok(_) =
musicplayer.new(ui, mpv, input_keys_name, input_inject_name, exit)
let assert Ok(_) = musicplayer.new(ui, mpv, input_keys_name, exit)
process.receive_forever(exit)
}