Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-06

SVGALib keyboard handler problem

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vit Kavan

Hi everybody,
is anyone here using SVGALib and its keyboard events? I've written something like this (sorry for the listing, it's pretty short):

{--SVGALib keyboard test source--}

{$linklib vga}
function  keyboard_init:int32;cdecl;external;
procedure keyboard_seteventhandler(handler:pointer);cdecl;external;
function  keyboard_close:int32;cdecl;external;
const GoDown : boolean = false;
procedure keyb_handler(scancode,keydown:int32);cdecl;
begin
 GoDown := true;
end;
begin
 keyboard_init;
 keyboard_seteventhandler(@keyb_handler);
 repeat
 until GoDown;
 keyboard_close;
end.

{--END--}

It doesn't work, it never ends. Any ideas, what did I wrong? (gfx related functions work normally for me)

Thanx in advance, VTech