Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
caderek opened this issue Sep 15, 2022 · 1 comment
Open

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

caderek opened this issue Sep 15, 2022 · 1 comment

Comments

@caderek
Copy link

caderek commented Sep 15, 2022

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.

@SnosMe
Copy link
Owner

SnosMe commented Sep 15, 2022

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants