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 ?
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.
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.
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) )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.