(use-modules (oop goops) (terminal)) (define terminal (make #:port (fdopen (port->fdes (current-output-port)) "r+0b"))) (define (test-dispatcher key-code) (case key-code ((#\esc) (cursor-home) (erase-display terminal) (tty-sane-mode terminal) (quit)) ((home) (cursor-home terminal)) ((up) (cursor-up terminal)) ((down) (cursor-down terminal)) (else (display ".")))) (define (start) (tty-raw-mode terminal) (start-event-loop terminal test-dispatcher))