Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Detecting input of function keys Posted by pascalbeginner on 1 May 2006 at 5:57 AM
Hello all,

Can you please help me in trying to detect the input of function keys such as F2 F3... Home End and arrow keys in pascal please?

Thank you very much
Chris.
Report
Re: Detecting input of function keys Posted by zibadian on 1 May 2006 at 7:14 AM
: Hello all,
:
: Can you please help me in trying to detect the input of function keys such as F2 F3... Home End and arrow keys in pascal please?
:
: Thank you very much
: Chris.
:
You need the ReadKey() function for that. It can read any key press and returns 1 byte of the key-code for it. Function keys have 2 byte key codes, so you need to have 2 calls to ReadKey(). The first byte will always be #0, while the other is non-zero.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.