Fix comment describing the form of 32-bit keycode representation

The description was off by 1 bit.
This commit is contained in:
Markus Sauermann 2024-10-23 07:41:48 +02:00
parent 533c616cb8
commit 537f6a7ad8

View file

@ -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 9 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),