- First commit to gitea

This commit is contained in:
2026-02-12 10:51:02 +01:00
commit a16a5a4102
40 changed files with 10033 additions and 0 deletions

27
GUIKeyboard.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "GUIKeyboard.h"
#include "application.h"
namespace GUIKeyboard
{
SDL_Keycode key {SDLK_UNKNOWN};
bool shift {false};
bool alt {false};
bool cmd {false};
void ReceiveKeyboardEvent(const SDL_Keycode key)
{
GUIKeyboard::key = key;
SDL_Keymod mod = SDL_GetModState();
shift = ((mod & KMOD_SHIFT) != KMOD_NONE);
alt = ((mod & KMOD_ALT ) != KMOD_NONE);
cmd = ((mod & KMOD_GUI ) != KMOD_NONE);
Application::NeedsUpdate();
}
void Reset()
{
key = SDLK_UNKNOWN;
//shift = alt = cmd = false;
}
}