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 17, 2022
1 parent 06e0a1e commit 5fca916
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 5fca916

Please sign in to comment.