about summary refs log blame commit diff stats
path: root/cpp/keyboard.mu
blob: d6f728f64df705405562a45070eddd831eb37dba (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                           
# example 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
]