about summary refs log tree commit diff stats
path: root/archive/1.vm.arc/charterm/test-charterm.rkt
blob: 04eb376ffa87b16c53b127fbfbffaf1f620b396f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#lang racket/base
;; For legal info, see file "charterm.rkt".

;; (require (planet neil/charterm:1))
(require "charterm.rkt")

(with-charterm
 (charterm-clear-screen)
 (charterm-cursor 10 5)
 (charterm-display "Hello, ")
 (charterm-bold)
 (charterm-display "you")
 (charterm-normal)
 (charterm-display ".")
 (charterm-cursor 1 1)
 (charterm-display "Press a key...")
 (let ((key (charterm-read-key)))
   (charterm-cursor 1 1)
   (charterm-clear-line)
   (printf "You pressed: ~S\r\n" key)))