mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:25:45 +00:00
[CMD] Correct the action on shorcut Ctrl-M
Patch by Jacob S. Preciado. CORE-10142
This commit is contained in:
parent
f9dd6dbe6d
commit
4916c4cfd5
1 changed files with 23 additions and 8 deletions
|
@ -205,8 +205,8 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||||
switch (ir.Event.KeyEvent.wVirtualKeyCode)
|
switch (ir.Event.KeyEvent.wVirtualKeyCode)
|
||||||
{
|
{
|
||||||
#ifdef FEATURE_HISTORY
|
#ifdef FEATURE_HISTORY
|
||||||
case 'K':
|
case _T('K'):
|
||||||
/*add the current command line to the history*/
|
/* add the current command line to the history */
|
||||||
if (dwControlKeyState &
|
if (dwControlKeyState &
|
||||||
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
||||||
{
|
{
|
||||||
|
@ -221,8 +221,8 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'D':
|
case _T('D'):
|
||||||
/*delete current history entry*/
|
/* delete current history entry */
|
||||||
if (dwControlKeyState &
|
if (dwControlKeyState &
|
||||||
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
||||||
{
|
{
|
||||||
|
@ -234,8 +234,25 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||||
//bContinue=TRUE;
|
//bContinue=TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /*FEATURE_HISTORY*/
|
#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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,9 +449,7 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _T('M'):
|
|
||||||
case _T('C'):
|
case _T('C'):
|
||||||
/* ^M does the same as return */
|
|
||||||
bCharInput = TRUE;
|
bCharInput = TRUE;
|
||||||
if (!(ir.Event.KeyEvent.dwControlKeyState &
|
if (!(ir.Event.KeyEvent.dwControlKeyState &
|
||||||
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
||||||
|
@ -452,7 +467,7 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||||
str[charcount++] = _T('\n');
|
str[charcount++] = _T('\n');
|
||||||
str[charcount] = _T('\0');
|
str[charcount] = _T('\0');
|
||||||
ConOutChar(_T('\n'));
|
ConOutChar(_T('\n'));
|
||||||
bReturn = TRUE;
|
bReturn = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VK_ESCAPE:
|
case VK_ESCAPE:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue