Fix special input keys text on Mac

This commit is contained in:
Wojtek Figat
2022-01-18 17:29:34 +01:00
parent b6471d887b
commit 2aa3624f81

View File

@@ -265,6 +265,13 @@ Vector2 GetMousePosition(MacWindow* window, NSEvent* event)
Input::Keyboard->OnKeyDown(key);
// Send a text input event
switch (key)
{
// Ignore text from special keys
case KeyboardKeys::Delete:
case KeyboardKeys::Backspace:
return;
}
NSString* text = [event characters];
int32 length = [text length];
if (length > 0)