[fpc-pascal] Re: KeyPressed

Michael Van Canneyt michael at freepascal.org
Mon Aug 22 21:45:05 CEST 2005

On Mon, 22 Aug 2005, Lowell C. Savage wrote:

> Some, perhaps....I ran into this problem when I was still compiling the
> program as a pure Pascal program.  (I had the interfaces to other languages
> commented out.)
> I'm using: CRT, IO, DOS, Video, Printer, Graph, and Drivers.  

This is the problem. You can't use the Drivers, CRT and Video unit together. 
Each of them tries to catch keystrokes, and they will randomly receive them.
(depending on thread usage).

You should use only Video or only CRT or only Drivers 
(though it can be that drivers and video work together)

> It's only one or
> two modules that need Video, Printer, Graph and Drivers (not necessarily the
> same ones).  But, of course when it all gets linked together, you only need
> one reference to cause trouble, right?
> And I don't care about multi-platform, so the C library DLL looks kind of like
> the way to go.

It will still cause problems, because the C library also will interfere with the 
Video and CRT units...

It's planned to base the CRT unit on the video unit (so they would work together), 
but until now no-one had time.


More information about the fpc-pascal mailing list