Read mouse positions (in an xterm)
This commit is contained in:
parent
3a5b457c7c
commit
33cca087ad
|
@ -5,6 +5,15 @@
|
||||||
|
|
||||||
(define (main)
|
(define (main)
|
||||||
(tty-raw!)
|
(tty-raw!)
|
||||||
|
|
||||||
|
(define old-exit-handler (exit-handler))
|
||||||
|
(exit-handler (lambda (v)
|
||||||
|
(display (reset-mode x11-any-event-mouse-tracking-mode))
|
||||||
|
(old-exit-handler v)))
|
||||||
|
|
||||||
|
(for-each display (list (set-mode x11-any-event-mouse-tracking-mode)))
|
||||||
|
(flush-output)
|
||||||
|
|
||||||
(let loop ()
|
(let loop ()
|
||||||
(define ch (read-byte))
|
(define ch (read-byte))
|
||||||
(display (select-graphic-rendition ch))
|
(display (select-graphic-rendition ch))
|
||||||
|
|
Loading…
Reference in New Issue