Skip to content

Commit

Permalink
Avoid adding "Numlock-" in DescribeKeys(). (#98)
Browse files Browse the repository at this point in the history
Adding, for example, an "OPT+P" shortcut, will work regardless of
the state of num-lock, so adding it to the shortcut description
just causes confusion.
  • Loading branch information
OscarL authored Mar 16, 2024
1 parent e372244 commit 611864e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Sources/CKeyCapturer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ void CKeyCapturer::DescribeKeys(const KeyShortcut& ks, char *desc)
if (keys[i] & (B_CONTROL_KEY << 16)) strcat(desc, "Ctrl-");
if (keys[i] & (B_OPTION_KEY << 16)) strcat(desc, "Opt-");
if (keys[i] & (B_MENU_KEY << 16)) strcat(desc, "Menu-");
if (keys[i] & (B_NUM_LOCK << 16)) strcat(desc, "Numlock-");

char key[2];
key[0] = (char)((keys[i] >> 24) & 0xFF);
Expand Down

0 comments on commit 611864e

Please sign in to comment.