From 34cb42a19ff7536fd214a2f1f4ea220744e8e490 Mon Sep 17 00:00:00 2001 From: Dav999-v Date: Sat, 31 Dec 2022 02:18:07 +0100 Subject: [PATCH] Add Ctrl+X for roomname translator mode This is a single block of code so it was easy to split from the foundation commit. This commit is part of rewritten history of the localization branch. The original (unsquashed) commit history can be found here: https://github.com/Dav999-v/VVVVVV/tree/localization-orig --- desktop_version/src/KeyPoll.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index 9dfdcb21..34775b48 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -196,6 +196,14 @@ void KeyPoll::Poll(void) VVV_free(text); } } + else if ( evt.key.keysym.sym == SDLK_x && + keymap[SDLK_LCTRL] ) + { + if (SDL_SetClipboardText(keybuffer.c_str()) == 0) + { + keybuffer = ""; + } + } } break; }