aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Windows64/KeyboardMouseInput.h
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-05 17:17:45 -0600
committerGitHub <noreply@github.com>2026-03-05 17:17:45 -0600
commit0666959d312dc74903f55d1071488a90239330f1 (patch)
tree5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.Client/Windows64/KeyboardMouseInput.h
parent9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff)
parenteed770b121aa4ce38f002db042d0137c24c6d344 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Windows64/KeyboardMouseInput.h')
-rw-r--r--Minecraft.Client/Windows64/KeyboardMouseInput.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.h b/Minecraft.Client/Windows64/KeyboardMouseInput.h
index 89a028b1..fff924bf 100644
--- a/Minecraft.Client/Windows64/KeyboardMouseInput.h
+++ b/Minecraft.Client/Windows64/KeyboardMouseInput.h
@@ -30,6 +30,7 @@ public:
static const int KEY_PAUSE = VK_ESCAPE;
static const int KEY_THIRD_PERSON = VK_F5;
static const int KEY_DEBUG_INFO = VK_F3;
+ static const int KEY_DEBUG_MENU = VK_F4;
void Init();
void Tick();
@@ -83,6 +84,11 @@ public:
void SetScreenCursorHidden(bool hidden) { m_screenWantsCursorHidden = hidden; }
bool IsScreenCursorHidden() const { return m_screenWantsCursorHidden; }
+ // Text input: buffer characters typed while the native keyboard scene is open
+ void OnChar(wchar_t c);
+ bool ConsumeChar(wchar_t &outChar);
+ void ClearCharBuffer();
+
float GetMoveX() const;
float GetMoveY() const;
@@ -128,6 +134,11 @@ private:
bool m_kbmActive;
bool m_screenWantsCursorHidden;
+
+ static const int CHAR_BUFFER_SIZE = 32;
+ wchar_t m_charBuffer[CHAR_BUFFER_SIZE];
+ int m_charBufferHead;
+ int m_charBufferTail;
};
extern KeyboardMouseInput g_KBMInput;