DirectXTK icon indicating copy to clipboard operation
DirectXTK copied to clipboard

Keyboard: Numpad Enter, a key that may be forgotten

Open Demonese opened this issue 2 years ago • 4 comments

There are two facts:

I used to think window messages couldn't differentiate between Enter and Numpad Enter, but:

  • Press Enter key image
  • Press Enter key on numpad image

This issue is also mentioned in the source code of Dear-ImGui (imgui_impl_win32).

Since my application was migrated from DirectInput to DirectXTK Keyboard, will the Numpad Enter key be officially supported in the future?

Demonese avatar May 12 '22 08:05 Demonese

There many Undefined/Unassigned key codes in Virtual-Key Codes space, can we use them to store Numpad Enter?

Demonese avatar May 12 '22 08:05 Demonese

Thanks for the report. I see that DirectInput had it's own enum that included DIK_NUMPADENTER, but there's no such virtual key defined (both return VK_RETURN).

I could emulate this with Win32, but I'll need to escalate this a bit since GameInput should also do this.

walbourn avatar May 12 '22 17:05 walbourn

We are working to reserve 0x0E as VK_NUMPAD_RETURN to avoid any future conflicts.

walbourn avatar Oct 17 '22 21:10 walbourn

Constant Value Description
VK_RETURN 0x0D ENTER key
- 0x0E-0F Undefined
VK_SHIFT 0x10 SHIFT key

Maybe a good option, close to VK_RETURN. 👍

Demonese avatar Oct 18 '22 14:10 Demonese