mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-27 07:49:00 +02:00
24 lines
446 B
ObjectPascal
24 lines
446 B
ObjectPascal
Program Example8;
|
|
|
|
{ Program to demonstrate the FunctionKeyName function. }
|
|
|
|
Uses keyboard;
|
|
|
|
Var
|
|
K : TkeyEvent;
|
|
|
|
begin
|
|
InitKeyboard;
|
|
Writeln('Press function keys, press "q" to end.');
|
|
Repeat
|
|
K:=GetKeyEvent;
|
|
K:=TranslateKeyEvent(K);
|
|
If IsFunctionKey(k) then
|
|
begin
|
|
Write('Got function key : ');
|
|
Writeln(FunctionKeyName(TkeyRecord(K).KeyCode));
|
|
end;
|
|
Until (GetKeyEventChar(K)='q');
|
|
DoneKeyboard;
|
|
end.
|