When NUMLOCK=ON then
Key ARROW_UP pressed:
data.keyboard.MakeCode = 42;
data.keyboard.VKey = 255;
data.keyboard.Flags = 2;
data.keyboard.Message = 256 (WM_KEYDOWN)
Key ARROW_DOWN pressed:
data.keyboard.MakeCode = 42;
data.keyboard.VKey = 255;
data.keyboard.Flags = 2;
data.keyboard.Message = 256 (WM_KEYDOWN)
Key ARROW_LEFT pressed:
data.keyboard.MakeCode = 42;
data.keyboard.VKey = 255;
data.keyboard.Flags = 2;
data.keyboard.Message = 256 (WM_KEYDOWN)
Key ARROW_RIGHT pressed:
data.keyboard.MakeCode = 42;
data.keyboard.VKey = 255;
data.keyboard.Flags = 2;
data.keyboard.Message = 256 (WM_KEYDOWN)
How to detect arrow keys when NUMLOCK=ON?
- When NUMLOCK=OFF then all working well;
- DirectInput (from DirectX 8.0) works well in both cases;
question from:
https://stackoverflow.com/questions/65848114/rawinput-keyboard-how-to-detect-arrow-keys-when-numlock-on 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…