Skip to content

Commit

Permalink
Fix key modifier use with numeric keypad #93
Browse files Browse the repository at this point in the history
The numeric keypad should be treated as a base keys so that key modifiers are
picked up separately for key combinations like Sym-NumPadX.
  • Loading branch information
simonowen committed Jul 31, 2024
1 parent ced4943 commit aa3bf4d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Base/Keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ void ProcessUnshiftedKeys(MAPPED_KEY* asKeys_)
// Update a combination key table with a symbol
static bool UpdateKeyTable(MAPPED_KEY* asKeys_, int nKey_, int nMods_, int nChar_)
{
// Treat numeric keypad as base keys.
if (nKey_ >= HK_KP0 && nKey_ <= HK_KP9)
{
nMods_ = 0;
}

// Convert upper-case symbols to lower-case without shift
if (nChar_ >= 'A' && nChar_ <= 'Z')
{
Expand Down

0 comments on commit aa3bf4d

Please sign in to comment.