switch (ir.Event.KeyEvent.wVirtualKeyCode)
{
#ifdef FEATURE_HISTORY
- case 'K':
- /*add the current command line to the history*/
+ case _T('K'):
+ /* add the current command line to the history */
if (dwControlKeyState &
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
{
break;
}
- case 'D':
- /*delete current history entry*/
+ case _T('D'):
+ /* delete current history entry */
if (dwControlKeyState &
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
{
//bContinue=TRUE;
break;
}
+#endif /*FEATURE_HISTORY*/
+ case _T('M'):
+ /* ^M does the same as return */
+ if (dwControlKeyState &
+ (LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
+ {
+ /* end input, return to main */
+#ifdef FEATURE_HISTORY
+ /* add to the history */
+ if (str[0])
+ History (0, str);
#endif /*FEATURE_HISTORY*/
+ str[charcount++] = _T('\n');
+ str[charcount] = _T('\0');
+ ConOutChar (_T('\n'));
+ bReturn = TRUE;
+ break;
+ }
}
}
#endif
break;
- case _T('M'):
case _T('C'):
- /* ^M does the same as return */
bCharInput = TRUE;
if (!(ir.Event.KeyEvent.dwControlKeyState &
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
str[charcount++] = _T('\n');
str[charcount] = _T('\0');
ConOutChar(_T('\n'));
- bReturn = TRUE;
+ bReturn = TRUE;
break;
case VK_ESCAPE: