mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +00:00
^M should run the command
svn path=/trunk/; revision=19905
This commit is contained in:
parent
4c43e1c8b9
commit
a0af76e470
1 changed files with 58 additions and 53 deletions
|
@ -138,6 +138,7 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
WORD wLastKey = 0;
|
WORD wLastKey = 0;
|
||||||
TCHAR ch;
|
TCHAR ch;
|
||||||
BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/
|
BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/
|
||||||
|
BOOL bReturn = FALSE;
|
||||||
TCHAR szPath[MAX_PATH];
|
TCHAR szPath[MAX_PATH];
|
||||||
|
|
||||||
/* get screen size */
|
/* get screen size */
|
||||||
|
@ -156,6 +157,9 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
||||||
|
bReturn = FALSE;
|
||||||
|
|
||||||
ConInKey (&ir);
|
ConInKey (&ir);
|
||||||
|
|
||||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||||
|
@ -406,6 +410,14 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case _T('M'):
|
||||||
|
/* ^M does the same as return */
|
||||||
|
if(!(ir.Event.KeyEvent.dwControlKeyState &
|
||||||
|
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case VK_RETURN:
|
case VK_RETURN:
|
||||||
/* end input, return to main */
|
/* end input, return to main */
|
||||||
#ifdef FEATURE_HISTORY
|
#ifdef FEATURE_HISTORY
|
||||||
|
@ -415,6 +427,7 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
#endif
|
#endif
|
||||||
ConInDummy ();
|
ConInDummy ();
|
||||||
ConOutChar (_T('\n'));
|
ConOutChar (_T('\n'));
|
||||||
|
bReturn = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VK_ESCAPE:
|
case VK_ESCAPE:
|
||||||
|
@ -497,7 +510,7 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
}
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
||||||
if ((ch >= 32 && ch <= 255) && (charcount != (maxlen - 2)))
|
if ((ch >= 32 && ch <= 255) && (charcount != (maxlen - 2)))
|
||||||
|
@ -544,18 +557,10 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
ConOutChar (ch);
|
ConOutChar (ch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBeep (-1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
wLastKey = ir.Event.KeyEvent.wVirtualKeyCode;
|
wLastKey = ir.Event.KeyEvent.wVirtualKeyCode;
|
||||||
}
|
}
|
||||||
while (ir.Event.KeyEvent.wVirtualKeyCode != VK_RETURN);
|
while (!bReturn);
|
||||||
|
|
||||||
SetCursorType (bInsert, TRUE);
|
SetCursorType (bInsert, TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue