Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions PythonScript/src/ConsoleDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,25 +294,28 @@ LRESULT ConsoleDialog::inputWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR

LRESULT ConsoleDialog::run_inputWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_KEYUP:
switch(wParam)
{
case VK_RETURN:
runStatement();
return FALSE;
switch(message)
{

default:
return CallWindowProc(m_originalInputWndProc, hWnd, message, wParam, lParam);
}
case WM_GETDLGCODE:
if (wParam == VK_RETURN)
return DLGC_WANTMESSAGE;
break;

case WM_SETFOCUS:
OutputDebugString(_T("Input SetFocus\r\n"));
case WM_KEYDOWN:
// Checking the previous key state in lParam to avoid repeated execution
if (wParam == VK_RETURN && !(lParam & 0x40000000))
{
runStatement();
return FALSE;
}
break;

default:
return CallWindowProc(m_originalInputWndProc, hWnd, message, wParam, lParam);
}
case WM_SETFOCUS:
OutputDebugString(_T("Input SetFocus\r\n"));
break;
}
return CallWindowProc(m_originalInputWndProc, hWnd, message, wParam, lParam);
}

void ConsoleDialog::runStatement()
Expand Down