# input_key_label.ludic — the name a player sees for a key. Letters, digits and # punctuation are physical positions named for the US layout; headless the label is that # character upper case, and the named keys and arrows are words. An unnamed code is "". # # Deterministic; a full run prints: W A ; 1 Space Esc Shift Left Right 0 1 program InputKeyLabel { function bi(b: bool) -> int { if b { return 1 }; return 0 } entry { print(Input.key_label('w')) print(Input.key_label('a')) print(Input.key_label(';')) print(Input.key_label('1')) print(Input.key_label(32)) print(Input.key_label(27)) print(Input.key_label(16)) print(Input.key_label(Key.Left)) print(Input.key_label(Key.Right)) print(len(Input.key_label(200))) Input.press('a') Input.poll() print(bi(Input.key_down('a'))) # the held set is unchanged by naming } }