Skip to content

Commit

Permalink
Fix comment describing the form of 32-bit keycode representation
Browse files Browse the repository at this point in the history
The description was off by 1 bit.
  • Loading branch information
Sauermann committed Oct 23, 2024
1 parent b3bcb2d commit 03e10e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/os/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
enum class Key {
NONE = 0,
// Special key: The strategy here is similar to the one used by toolkits,
// which consists in leaving the 21 bits unicode range for printable
// characters, and use the upper 11 bits for special keys and modifiers.
// which consists in leaving the lower 22 bits unicode range for printable
// characters, use bit 23 to indicate special keys, and use the upper 10 bits for modifiers.
// This way everything (char/keycode) can fit nicely in one 32-bit
// integer (the enum's underlying type is `int` by default).
SPECIAL = (1 << 22),
Expand Down

0 comments on commit 03e10e2

Please sign in to comment.