From 537f6a7ad80c17419b75c70b349af5d0b3826f56 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:41:48 +0200 Subject: [PATCH] Fix comment describing the form of 32-bit keycode representation The description was off by 1 bit. --- core/os/keyboard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/os/keyboard.h b/core/os/keyboard.h index 20519733363..fdcdeaaf5b6 100644 --- a/core/os/keyboard.h +++ b/core/os/keyboard.h @@ -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),