Mercurial > hg > octave-lyh
changeset 17232:f95bb8763f4e
Allow keyup/down messages to pass through to Qt
* libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp (QWinTerminalImpl::winEvent): Change WM_KEYUP/KEYDOWN to return false to pass through to Qt, Ctrl-C set to not send on to terminal.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 11 Aug 2013 00:04:20 -0400 |
parents | d9ca0f44f1e7 |
children | 06824c3b1ff3 |
files | libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp +++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp @@ -1301,13 +1301,15 @@ case WM_KEYDOWN: case WM_KEYUP: //case WM_CHAR: - // Forward Win32 message to the console window - PostMessage (d->m_consoleWindow, + if ( GetKeyState ('C') == 0 || GetKeyState (VK_CONTROL) == 0) + { + PostMessage (d->m_consoleWindow, msg->message, msg->wParam, msg->lParam); - result = 0; - return true; + } + // allow Qt to process messages as well, in case of shortcuts etc + return false; default: return false; }