[fpc-pascal]SVGALib keyboard handler problem

Vit Kavan vit.kavan at usa.net
Thu Jun 21 01:54:28 CEST 2001


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





More information about the fpc-pascal mailing list