Explorar el Código

+ Now actually demonstrates GetKeyEventCode

michael hace 24 años
padre
commit
6ff1f9d092
Se han modificado 1 ficheros con 4 adiciones y 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.