summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/libndsfpc/examples/input/keyboard/keyboard_async/keyboardAsync.pp
blob: a4b73671b8a6cb37805d4f15c4b08bd1c4e02d7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
program keyboardAsync;

{$mode objfpc}

uses
  ctypes, nds9;
  
var
  key: integer;

begin
  consoleDemoInit();  //setup the sub screen for printing
  
  keyboardDemoInit();
  
  keyboardShow();
  
  while true do
  begin
  
    key := keyboardUpdate();
  
    if (key > 0) then
      iprintf('%c', key);
  
    swiWaitForVBlank();
  end;

end.