From 65c866691aaa709fed249e4e8798068a68cfbae0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 21 Feb 2021 22:56:06 -0500 Subject: Added copy-pasting into the debug console --- src/input_system.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/input_system.cpp') diff --git a/src/input_system.cpp b/src/input_system.cpp index 1b5b56b..73a28bd 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp @@ -49,6 +49,11 @@ void InputSystem::tick(double dt) { if (!debugText_.empty()) { debugText_.pop_back(); } + } else if (debugConsole_ && e.key.keysym.sym == SDLK_v && SDL_GetModState() & (KMOD_CTRL | KMOD_GUI)) { + // CTRL-V or CMD-V bc I have a Mac thanks + char* clipboardText = SDL_GetClipboardText(); + debugText_.append(clipboardText); + SDL_free(clipboardText); } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) { if (game_.isGameplayPaused()) continue; -- cgit 1.4.1