about summary refs log tree commit diff stats
path: root/console.mu
blob: 1b1d56548b14f3c9b3c1d19802d023f801beec8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# example program: reading events from keyboard or mouse
#
# Keeps printing 'a' until you press a key or click on the mouse.

recipe main [
  local-scope
  open-console
  {
    e:event, found?:boolean <- check-for-interaction
    break-if found?
    print-character-to-display 97, 7/white
    loop
  }
  close-console
  $print e, 10/newline
]