Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
underscore character
Name: Geohoffman48917 Date: September 18, 2003 at 16:53:15 Pacific OS: XP CPU/Ram: 256
Comment:
I use VC++ and windows XP. I need to know how to simulate the '_' character being pressed. I can do any other character besides that one with keybd_event(). I have tried simulating the shift key and minus key but that does not work. I can'f find a Virtual Key that represents that character. Please help me. I have been working on this project for like two days stright and I can not finish it without this info.
Name: Don Arnett Date: September 18, 2003 at 17:00:55 Pacific
Reply:
According to my ASCII chart, the value of the underscore character is 95 (0x5F).
The underscore is just a character like any others, so it would seem that however you are doing the others would work for underscore.
0
Response Number 2
Name: Geohoffman48917 Date: September 18, 2003 at 18:35:23 Pacific
Reply:
Unfortunately you do not pass ASCII characters to the keybd_event() function. You pass Virtual Key numbers. This allows you to pass the SHIFT and RETURN keys, and also the CAPSLOCK and TAB keys. 0x5F is undefined in the Virtual Key table. Is there any other way to simulate keyboard input that does not use Virtual Keys? Or is there a way to use keybd_event() and pass a scan code? And what is this KEYEVENTF_EXTENDEDKEY that I found in the VC++ documentation? It says it is for extended scan codes. I can't find a reference anywhere from google.
Summary: by DOS, you mean the cmd.exe prompt under XP? In that case it is possible, but requirements need to be made very specific. like - 1. is the word "folder" in folder is hardcoded? will it be changed to ...
Summary: In the small program described below, is there some kind of special 'null' character in C (NOT '\0' of course!) which I could pass as the 4th argument, in the 2nd call to 'printFunction()', to get the...