scancodes

OS and implementation independent access to the keyboard?

I made an FPS game with MSVC++ which is running very well on Windows. But now I am trying to make it portable (at least I want to create a linux and a Windows version), so I decided to change the IDE to Code::Blocks and the framework to wxWidgets. But it seems the virtual key codes and scan codes are different on different systems. Earl...

Scancode when I press a key is different. Is Microsoft specification wrong?

I am using Windows XP pro SP3. Standard english keyboard. I live in the USA; never touched the keyboard settings. Stock install. So, when I press check the scancodes my program is returning they are as follows: A = 30 S = 31 D = 32 F = 33 G = 34 When I check the microsoft specification (page 11 of the document:: http://download.micr...

SendInput() isn't "sending" the correct shifted characters?

void WriteChar(char c) { INPUT input = {0}; input.type = INPUT_KEYBOARD; input.ki.wVk= VkKeyScanEx(c, GetKeyboardLayout(0) ) ; SendInput(1,&input, sizeof(INPUT)); } VkKeyScanEx returns different key codes for '/' and '?'(same key), however if you try using this method to write a message containing '?', it will only w...