Skip to content

Commit

Permalink
Fixed numpad keys using wrong mask
Browse files Browse the repository at this point in the history
  • Loading branch information
univrsal committed Apr 29, 2022
1 parent 0fc4f1e commit 6e92a53
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/windows/input_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@ unsigned short keycode_to_scancode(DWORD vk_code, DWORD flags) {
__FUNCTION__, __LINE__, vk_code);

switch (vk_code) {
case VK_RETURN:
scancode |= 0x0E00;
break;
}
} else {
switch (vk_code) {
case VK_INSERT:
case VK_DELETE:
case VK_PRIOR:
case VK_NEXT:
case VK_END:
Expand All @@ -311,17 +319,10 @@ unsigned short keycode_to_scancode(DWORD vk_code, DWORD flags) {
case VK_UP:
case VK_RIGHT:
case VK_DOWN:

case VK_INSERT:
case VK_DELETE:
case VK_CLEAR:
scancode |= 0xEE00;
break;

case VK_RETURN:
scancode |= 0x0E00;
break;
}
} else {
logger(LOG_LEVEL_DEBUG, "%s [%u]: Using normal lookup for vk_code: %li\n",
__FUNCTION__, __LINE__, vk_code);
}
Expand Down

0 comments on commit 6e92a53

Please sign in to comment.