[fpc-pascal]Readkey

Marco van de Voort marcov at stack.nl
Fri Aug 20 23:32:34 CEST 2004


> I'm using the following units on Linux.
> 
> USES ports, dos, crt, graph, printer;
> 
> readkey doesn't capture keystrokes as they're typed.  It reads them all 
> in sequence only after the user presses enter.  This is unlike the  way 
> TP reads the kbd buffer.
> 
> Am I doing something wrong?  And Linux terminates kbd strings with LF.  
>   So I guess I need to account for that.  I'm converting a program which 
> checks for CR to back up one level on a menu.  Pressing the enter key 
> returns LF instead.
> 
> But my main question is how to read the kbd buffer as keys are 
> typed.... not after the user presses enter.  readkey doesn't do the 
> job.

Multiple possibilities

- Both graph and crt might interfere both try to capture output. (graph via
linking in svgalib?)
- The console you use might also matter. Is it framebuffer, normal console,
    a terminal emulation under X?

Try to reproduce the problems with a small program using Crt only on a normal
(non X console).




More information about the fpc-pascal mailing list