SnosMe/uiohook-napi

Right Alt seems to be replaced with Alt on tap / toggle

caderek opened this issue · 1 comments

Hi, thanks for a great lib.

I have one problem - when I send a right alt key, the lib seems to ignore the distinction between left and right alt and treat it as the same key (left alt). That's a problem, because it makes it impossible to type some special characters that work only with the right alt.

Am I missing something?

Example:

uIOhook.keyToggle(UiohookKey.AltRight, "down");
uIOhook.keyTap(UiohookKey[5]);
uIOhook.keyToggle(UiohookKey.AltRight, "up");

Should type a sign, but instead triggers whatever is assigned to LeftAlt+5 (for example, goes to the fifth the tab in a browser).

Please let me know if there is a way to achieve that in the current version.

Seems like a bug in https://github.com/kwhat/libuiohook


I pass keycodes without any modifications straight to lib

uiohook-napi/src/index.ts

Lines 188 to 189 in 63745a5

Alt: 0x0038, // Left
AltRight: 0x0E38,

uiohook_event event;
memset(&event, 0, sizeof(event));
event.data.keyboard.keycode = keycode;