From b299f3b1236524ecf68de2b076fb1e4e80d6274d Mon Sep 17 00:00:00 2001 From: Jeremy Klein Date: Fri, 31 Jul 2015 15:22:33 -0700 Subject: Make ctrl-shift-v paste. --- .../main/java/org/connectbot/service/TerminalKeyListener.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/src/main/java/org/connectbot/service/TerminalKeyListener.java') diff --git a/app/src/main/java/org/connectbot/service/TerminalKeyListener.java b/app/src/main/java/org/connectbot/service/TerminalKeyListener.java index c0a7da7..df948ab 100644 --- a/app/src/main/java/org/connectbot/service/TerminalKeyListener.java +++ b/app/src/main/java/org/connectbot/service/TerminalKeyListener.java @@ -299,6 +299,15 @@ public class TerminalKeyListener implements OnKeyListener, OnSharedPreferenceCha return true; } + // CTRL-SHIFT-V to paste. + if (keyCode == KeyEvent.KEYCODE_V + && (derivedMetaState & HC_META_CTRL_ON) != 0 + && (derivedMetaState & KeyEvent.META_SHIFT_ON) != 0 + && clipboard.hasText()) { + bridge.injectString(clipboard.getText().toString()); + return true; + } + // Ask the system to use the keymap to give us the unicode character for this key, // with our derived modifier state applied. int uchar = event.getUnicodeChar(derivedMetaState & ~HC_META_CTRL_MASK); -- cgit v1.2.3