Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keysend

Status
Not open for further replies.

mathmax

Programmer
Apr 21, 2006
22
FR
Hello,

Keysend(chr(0)+chr(60)) correspond to F1 wich key code is -1. I would like to know why. Is there some logical formula to go from chr(0)+chr(60) to -1 ?

Regards,

mathmax
 
mathmax,

Actually F1 = 28 and F2 = -1. Not sure where the "0" & "60" are coming into play. Norton Guides will have the break down on the keys and there values if you want to check them out.

Jim C.
 
I cannot see any explanation in the Norton Guides. In which .ng file should I look ?
 
mathmax,

Sorry I thought it was in there. I have a few books and it's an appendix in the back of the books. I thought that the Guides had all of that stuff as well.

The normal value for F1 is 28 as I mentioned and F2 is -1. But these can be reset within your program. So they could actually be any value for you're purpose.

Jim C.
 
KeySend is a CA-Tools 3 function, that is based on Windows Keyboard Scancodes, not on the terrible Nantucket-designed table of Keyboard codes, which have never been very complete or comprehensible in the first place.

The scancodes you can use with KeySend are documented in ctscan.ch, (in your Clipper include directory) and keyscan also has an extra optional parameter lAdditiveMode, allowing to put several keystrokes into the buffer when true. The boolean returnvalue of this function indicates success or failure when putting the character into the buffer.

If you had added #include 'ctscan.ch' to your code you could have written KeySend(KS_F2) (KS_F2 is defined as chr(0)+chr(60) )

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top