help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'keyboard' (#rtl)

IsFunctionKey

Check whether a given event is a function key event.

Declaration

Source position: keybrdh.inc line 181

function IsFunctionKey(

  KeyEvent: TKeyEvent

):Boolean;

Description

IsFunctionKey returns True if the given key event in KeyEvent was a function key or not.

Errors

None.

See also

GetKeyEvent

  

Get the next raw key event, wait if needed.

Example

program example1;

{ This program demonstrates the GetKeyEvent function }

uses keyboard;

Var
  K : TKeyEvent;

begin
  InitKeyBoard;
  Writeln('Press keys, press "q" to end.');
  Repeat
    K:=GetKeyEvent;
    K:=TranslateKeyEvent(K);
    If IsFunctionKey(K) then
      Writeln('Got function key : ',KeyEventToString(K))
    else
      Writeln('not a function key.');
  Until (GetKeyEventChar(K)='q');
  DoneKeyBoard;
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505