Virtual Key codes

Joined
Jun 30, 2009
Messages
10
Reaction score
0
Hy,

i made an application that sends keystrokes (with SendInput) to another.

I have the KEYEVENTF_SCANCODE flag enabled.As far as i could understand, this flag uses directx key codes.

I've been searching for a few hours now, but cant find any example on how to send de SPACE key. Does anyone know how to do this?


Ive managed to figure out a few characters by trying a few codes:

("press" is a function, nevermind it )
Code:
    				press(125); 	   // FN key (laptop)
    				press(0xC); 	   // ' key
    				press(0xF); 	   // TAB key
    				
    				press(0xB); 	   // 0 key
    				press(0xA); 	   // 9 key
    				press(0x9); 	   // 8 key
    				press(0x8); 	   // 7 key
    				press(0x7); 	   // 6 key
    				press(0x6); 	   // 5 key
    				press(0x5); 	   // 4 key
    				press(0x4); 	   // 3 key


Regards,
Shan
 
Joined
Jun 30, 2009
Messages
10
Reaction score
0
indeed, the keyboard uses ASCII codes. I'm trying to use Scancodes.
The site you mentioned (http://www.motionnet.com/cgi-bin/search.exe?a=showlink&no=65) shows ASCII. These do not work on my app. For example the TAB key is, in this site, 0x09. In my app, 0x09 is "8". The TAB is 0x0F. The 3rd link has them ^^

I just remembered to check the wikipedia for info, and it was there...
This was the site where Ii found the codes "tranlated": http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html#ss1.4

Sorry for wasting your time.. kinda dumb not going straight for wikipedia...


Thanks anyway ^^
Shan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top