diff options
-rw-r--r-- | chessboard-cursor.mu | 2 | ||||
-rw-r--r-- | mu.arc | 3 | ||||
-rw-r--r-- | stdin.mu | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/chessboard-cursor.mu b/chessboard-cursor.mu index c23f738b..412a555a 100644 --- a/chessboard-cursor.mu +++ b/chessboard-cursor.mu @@ -218,7 +218,7 @@ (cursor-mode) ; hook up stdin (stdin:channel-address <- init-channel 1:literal) - (fork-helper send-keys-to-stdin:fn nil:literal/globals nil:literal/limit stdin:channel-address) + (fork-helper send-keys-to-stdin:fn nil:literal/globals nil:literal/limit nil:literal/keyboard stdin:channel-address) { begin ; print any stray characters from keyboard *before* clearing screen (clear-screen nil:literal/terminal) diff --git a/mu.arc b/mu.arc index 21c4fb53..24372408 100644 --- a/mu.arc +++ b/mu.arc @@ -1958,11 +1958,12 @@ (init-fn send-keys-to-stdin (default-space:space-address <- new space:literal 30:literal) + (k:keyboard-address <- next-input) (stdin:channel-address <- next-input) { begin ; keyboard input is infrequent; sleep at the start of each iteration (sleep for-some-cycles:literal 1:literal) - (c:character <- read-key) + (c:character <- read-key k:keyboard-address) (loop-unless c:character) (curr:tagged-value <- save-type c:character) (stdin:channel-address/deref <- write stdin:channel-address curr:tagged-value) diff --git a/stdin.mu b/stdin.mu index 803dd60c..a651ce1b 100644 --- a/stdin.mu +++ b/stdin.mu @@ -7,7 +7,7 @@ ;? (print-primitive-to-host (("main: stdin is " literal))) ;? (print-primitive-to-host stdin:channel-address) ;? (print-primitive-to-host (("\n" literal))) - (fork-helper send-keys-to-stdin:fn nil:literal/globals nil:literal/limit stdin:channel-address) + (fork-helper send-keys-to-stdin:fn nil:literal/globals nil:literal/limit nil:literal/keyboard stdin:channel-address) ; now read characters from stdin until a 'q' is typed (print-primitive-to-host (("? " literal))) { begin |