about summary refs log blame commit diff stats
path: root/keyboard.mu
blob: 530275cab8ab6260655f4416666a50d9e8823665 (plain) (tree)
1
2
3
4
5
                                             


                                                                           
 









                                                         
# example program: reading keys from keyboard
#
# Keeps printing 'a' until you press a key. Then prints the key you pressed
# and exits.

recipe main [
  switch-to-display
  {
    c:character, found?:boolean <- read-key-from-keyboard
    break-if found?:boolean
    print-character-to-display 97:literal
    loop
  }
  return-to-console
]