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.
Earlier I experienced that the virtual keycodes may be different even on the same operating system but different computer (I got bug reports about they unable to control the character (depending on the numlock state, lol, not joke), which is fixed when change the code to use scancodes instead of virtkey codes) (edit: with wxWidgets both virtkey and scan codes on the numpad has different values depending on numlock state, bang!)
Now with wxWidgets it seems the wxKeyEvent::GetRawKeyCode and the code obtained earlier from WM_KEYDOWN's lParam are different. And I also get a completely different scan code on linux (ubuntu) from GetRawKeyCode.
Well I can make my own scan code table by pressing all the keys and seeing what code it gives, but the only problem that ubuntu runs on my laptop, and the laptop does not have a full keyboard... But I need all of them to make Control Settings work.
So the question: Is there a standard and cross-platform way to get the same code for the same key (the key at the same position to be more precise)? (at least on windows and linux)