OpenSceneGraph
OpenSceneGraph copied to clipboard
Keyboard virtual code of osgGA::GUIEventAdapter are different betwwen laptop and Desktop computer
Today, I was debugging osgGA::AnimationPathManipulator on my laptop, in AnimationPathManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us),when I Press the p key, the ea.getKey() return 229;but on Desktop computer,when I Press the p key, the ea.getKey() return 112, 112 is correct,but 229 is incorrect!why this value is different ? is a bug? Can you tell me the reason?
notes: **- I not press the capsLock or shift key 。
- osg is 3.6.2**

The OSG doesn't do anything different on laptops vs desktop computers, the only difference is across different OS's, but they all should aim to map across to the same keycodes.
You don't mention anything about the OS on your different computers or the actual hardware. My guess is that you laptop hardware is doing something unusual..
The best I recommend is that you put break points in the OSG's event capture code to find out what the underlying OS specific Windowing library is passing to the OSG. This might give you a clue to the difference. Nobody has reported this issue and likely few have access to your specific combination of hardware and OS so you are the only one well placed to investigate the difference.
my laptop is windows 11, the desktop computer is window 10。I think what you're saying makes sense. I'll investigate again, thank you very much!