Haiku:How to receive information about pressing/releasing a key on the keyboard? lazarus / 66-Unix ---------------------------------------------------------------------- CandyMan30 · 2022-01-06 20:26 How to receive information about pressing/releasing a key on the keyboard in Haiku OS? My code is: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  {$PACKRECORDS C}  TRawKeyInfo = record    TimeStamp : Int64;    KeyCode   : DWord;    IsKeyDown : Boolean;  end; const  KB_READ = 9999; var  fd:LongInt;  S:TRawKeyInfo;begin  fd:=fpopen('/dev/input/keyboard/at/0',O_RDWR);  if fd>=0 then  repeat    if LnxIoCtl(fd,KB_READ,@S)=0 then      WriteLn(S.TimeStamp,' ',S.IsKeyDown,' ',S.KeyCode)  until False;end.My code is not working. What am I doing wrong? [Edited title to add Haiku.] ---------------------------------------------------------------------- Handoko · 2022-01-07 12:38 Do you need to use it in console mode? If no, that can be done easily using Lazarus. Here has a demo: https://forum.lazarus.freepascal.org/index.php/topic,57229.msg425440.h tml#msg425440