diff options
author | RadAd <adamgates84+github@gmail.com> | 2019-07-18 12:58:53 +1000 |
---|---|---|
committer | RadAd <adamgates84+github@gmail.com> | 2019-07-18 12:58:53 +1000 |
commit | d66f640c8122d841ef80bf24b2567392787d18aa (patch) | |
tree | 9bfc2bc99ea8f22f3cbeba40f72152ef8c8e905a /RadTerminal.cpp | |
parent | 371504f2b4f74e0c9e668465df0897b8c0e40752 (diff) | |
download | RadTerminal-d66f640c8122d841ef80bf24b2567392787d18aa.tar.gz RadTerminal-d66f640c8122d841ef80bf24b2567392787d18aa.zip |
Fix up ctrl+c copy
Diffstat (limited to 'RadTerminal.cpp')
-rw-r--r-- | RadTerminal.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/RadTerminal.cpp b/RadTerminal.cpp index b009d48..591e87f 100644 --- a/RadTerminal.cpp +++ b/RadTerminal.cpp @@ -1029,9 +1029,11 @@ void RadTerminalWindowSendKey(HWND hWnd, UINT vk, UINT scan, bool extended) //case VK_: keysym = XKB_KEY_R15; break; } - tsm_screen_selection_reset(data->screen); if (vk != VK_SHIFT && vk != VK_CONTROL && vk != VK_MENU) + { + tsm_screen_selection_reset(data->screen); tsm_screen_sb_reset(data->screen); + } if (keysym != XKB_KEY_NoSymbol) tsm_vte_handle_keyboard(data->vte, keysym, ascii, mods, unicode); InvalidateRect(hWnd, nullptr, TRUE); @@ -1041,14 +1043,12 @@ void RadTerminalWindowOnKeyDown(HWND hWnd, UINT vk, BOOL fDown, int cRepeat, UIN { FORWARD_WM_KEYDOWN(hWnd, vk, cRepeat, flags, MyDefWindowProc); - BYTE KeyState[256]; - GetKeyboardState(KeyState); - bool bPassOn = true; switch (vk) { case VK_ESCAPE: bPassOn = ActionClearSelection(hWnd) < 0; break; case VK_RETURN: bPassOn = ActionCopyToClipboard(hWnd) < 0; break; + case 'C': if (GetKeyState(VK_CONTROL) & 0x80) bPassOn = ActionCopyToClipboard(hWnd) < 0; break; } if (bPassOn) @@ -1252,7 +1252,6 @@ void RadTerminalWindowOnCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify { switch (id) { - case ID_EDIT_COPY: ActionCopyToClipboard(hWnd); break; case ID_EDIT_PASTE: ActionPasteFromClipboard(hWnd); break; case ID_VIEW_SCROLL_UP: ActionScrollbackUp(hWnd); break; case ID_VIEW_SCROLL_DOWN: ActionScrollbackDown(hWnd); break; |