You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I remapped my left alt key to left control and vice versa through Windows PowerToys. Now when using this project and pressing caps lock with other keys, it looks like alt is being registered instead of control.
Desired behavior: CTRL when pressed with other keys
Observed behavior: ALT when pressed with other keys
I've tried these configs, but all have the same result
Interesting. I haven't tested this configuration, so I assume that what happens depends on the order in which that different remapping softwares handle the keys. I can take a look.
// Per MS docs we should only act for HC_ACTION's
if (msg_code == HC_ACTION) {
KBDLLHOOKSTRUCT * data = (KBDLLHOOKSTRUCT *)l_param;
enum Direction direction = (w_param == WM_KEYDOWN || w_param == WM_SYSKEYDOWN)
? DOWN
: UP;
//int is_injected = data->dwExtraInfo == INJECTED_KEY_ID;
int is_injected = (data->dwExtraInfo == INJECTED_KEY_ID || data->dwExtraInfo == POWER_TOYS_INJECTED_KEY_ID);
....
}
or
Method 2 > just use key of PowerToys
#define INJECTED_KEY_ID 0x101 // 0xFFC3CED7
and recompile dual-key-remap !
Limitation:
Should excute dual-key-remap.exe AFTER PowerToys running.
PS:
LRESULT CALLBACK keyboard_callback(int msg_code, WPARAM w_param, LPARAM l_param)
{
....
return (block_input) ? 1 : CallNextHookEx(g_mouse_hook, msg_code, w_param, l_param);
}
I think this line needs to be fixed with <g_keyboard_hook>.
Hi,
I remapped my left alt key to left control and vice versa through Windows PowerToys. Now when using this project and pressing caps lock with other keys, it looks like alt is being registered instead of control.
Desired behavior: CTRL when pressed with other keys
Observed behavior: ALT when pressed with other keys
I've tried these configs, but all have the same result
Is this project expected to work after remapping the control key through some other program?
The text was updated successfully, but these errors were encountered: