oblitum / Interception

The Interception API aims to build a portable programming interface that allows one to intercept and control a range of input devices.
http://oblita.com/interception
1.32k stars 271 forks source link

Incorrect keyboard key code correspondence ,Up, down, left ,right,=,- ,Delete,End,PageUp,Home #142

Open YangZhiBoGreenHand opened 2 years ago

YangZhiBoGreenHand commented 2 years ago

MapVirtualKey(37,MAPVK_VK_TO_VSC) —> 4 , but 37 actually is the left Can you give me your keyboard code?

s0bes commented 1 year ago

For CTRL key example

InterceptionKeyStroke ctrl_down_left = { 0x1D,INTERCEPTION_KEY_DOWN };
InterceptionKeyStroke ctrl_down_right = { 0x1D,INTERCEPTION_KEY_DOWN | INTERCEPTION_KEY_E0 };
InterceptionKeyStroke ctrl_up_left = { 0x1D,INTERCEPTION_KEY_UP };
InterceptionKeyStroke ctrl_up_right = { 0x1D,INTERCEPTION_KEY_UP | INTERCEPTION_KEY_E0 };

for left ctrl key you only need INTERCEPTION_KEY_DOWN with code 0x1d for right ctrl key you have same code but two flags: INTERCEPTION_KEY_DOWN | INTERCEPTION_KEY_E0