Explorar o código

+ Now actually demonstrates GetKeyEventCode

michael %!s(int64=24) %!d(string=hai) anos
pai
achega
6ff1f9d092
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      docs/kbdex/ex2.pp

+ 4 - 1
docs/kbdex/ex2.pp

@@ -16,7 +16,10 @@ begin
     If (GetKeyEventFlags(K)<>KbfnKey) then
       Writeln('Not a function key')
     else  
-      Writeln('Got key : ',KeyEventToString(K));
+      begin
+      Write('Got key (',GetKeyEventCode(K));
+      Writeln(') : ',KeyEventToString(K));
+      end;
   Until (GetKeyEventChar(K)='q');
   DoneKeyboard;
 end.