aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorThierry Crozat2018-04-11 00:05:41 +0100
committerThierry Crozat2018-04-29 21:47:10 +0100
commit6ab6d767928b6fdc27bc4b484c2831d029d3c049 (patch)
tree3779a8a891b2122c7183507223bd0c68dec0317f /gui/widgets
parente79fc3ac7644552a62ebe459ee5abb024ff73e20 (diff)
downloadscummvm-rg350-6ab6d767928b6fdc27bc4b484c2831d029d3c049.tar.gz
scummvm-rg350-6ab6d767928b6fdc27bc4b484c2831d029d3c049.tar.bz2
scummvm-rg350-6ab6d767928b6fdc27bc4b484c2831d029d3c049.zip
GUI: Add copy to clipboard shortcut for EditableWidget
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/editable.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 339870fe34..2af078f9f6 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -200,6 +200,15 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
}
break;
+ case Common::KEYCODE_c:
+ if (g_system->hasFeature(OSystem::kFeatureClipboardSupport) && state.flags & Common::KBD_CTRL) {
+ if (!getEditString().empty())
+ g_system->setTextInClipboard(getEditString());
+ } else {
+ defaultKeyDownHandler(state, dirty, forcecaret, handled);
+ }
+ break;
+
#ifdef MACOSX
// Let ctrl-a / ctrl-e move the caret to the start / end of the line.
//