keyboardAsync.pp 345 B

1234567891011121314151617181920212223242526272829
  1. program keyboardAsync;
  2. {$mode objfpc}
  3. uses
  4. ctypes, nds9;
  5. var
  6. key: integer;
  7. begin
  8. consoleDemoInit(); //setup the sub screen for printing
  9. keyboardDemoInit();
  10. keyboardShow();
  11. while true do
  12. begin
  13. key := keyboardUpdate();
  14. if (key > 0) then
  15. iprintf('%c', key);
  16. swiWaitForVBlank();
  17. end;
  18. end.