* [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support @ 2019-09-25 12:09 Gao, Zhichao 2019-09-25 13:32 ` [edk2-devel] " Liming Gao 2019-09-25 18:17 ` Ni, Ray 0 siblings, 2 replies; 5+ messages in thread From: Gao, Zhichao @ 2019-09-25 12:09 UTC (permalink / raw) To: devel; +Cc: Jian J Wang, Hao A Wu, Ray Ni, Liming Gao REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2219 Refer to https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter4.html#config-appcursor In normal mode, arrow key would send ESC [A through to ESC [D. In application mode, arrow key would send ESC OA through to ESC OD. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> --- .../Console/TerminalDxe/TerminalConIn.c | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index ac31f27984..fdb1a0f1ef 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1402,10 +1402,7 @@ UnicodeToEfiKey ( continue; } - if (UnicodeChar == 'O' && (TerminalDevice->TerminalType == TerminalTypeVt100 || - TerminalDevice->TerminalType == TerminalTypeTtyTerm || - TerminalDevice->TerminalType == TerminalTypeXtermR6 || - TerminalDevice->TerminalType == TerminalTypeVt100Plus)) { + if (UnicodeChar == 'O') { TerminalDevice->InputState |= INPUT_STATE_O; TerminalDevice->ResetState = RESET_STATE_DEFAULT; continue; @@ -1631,6 +1628,35 @@ UnicodeToEfiKey ( } } + // + // In Putty application mode, the arrow keys would send + // ESC OA through to ESC OD + // + if (TerminalDevice->TerminalType == TerminalTypePcAnsi || + TerminalDevice->TerminalType == TerminalTypeVt100 || + TerminalDevice->TerminalType == TerminalTypeVt100Plus || + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || + TerminalDevice->TerminalType == TerminalTypeTtyTerm || + TerminalDevice->TerminalType == TerminalTypeLinux || + TerminalDevice->TerminalType == TerminalTypeXtermR6 || + TerminalDevice->TerminalType == TerminalTypeVt400 || + TerminalDevice->TerminalType == TerminalTypeSCO) { + switch (UnicodeChar) { + case 'A': + Key.ScanCode = SCAN_UP; + break; + case 'B': + Key.ScanCode = SCAN_DOWN; + break; + case 'C': + Key.ScanCode = SCAN_RIGHT; + break; + case 'D': + Key.ScanCode = SCAN_LEFT; + break; + } + } + if (Key.ScanCode != SCAN_NULL) { Key.UnicodeChar = 0; EfiKeyFiFoInsertOneKey (TerminalDevice, &Key); @@ -1668,10 +1694,18 @@ UnicodeToEfiKey ( Key.ScanCode = SCAN_NULL; + // + // In Putty normal mode, the arrow keys would send + // ESC [A through to [D + // if (TerminalDevice->TerminalType == TerminalTypePcAnsi || TerminalDevice->TerminalType == TerminalTypeVt100 || - TerminalDevice->TerminalType == TerminalTypeVtUtf8 || - TerminalDevice->TerminalType == TerminalTypeTtyTerm || + TerminalDevice->TerminalType == TerminalTypeVt100Plus || + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || + TerminalDevice->TerminalType == TerminalTypeTtyTerm || + TerminalDevice->TerminalType == TerminalTypeLinux || + TerminalDevice->TerminalType == TerminalTypeXtermR6 || + TerminalDevice->TerminalType == TerminalTypeVt400 || TerminalDevice->TerminalType == TerminalTypeSCO) { switch (UnicodeChar) { case 'A': -- 2.21.0.windows.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support 2019-09-25 12:09 [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support Gao, Zhichao @ 2019-09-25 13:32 ` Liming Gao 2019-09-25 18:17 ` Ni, Ray 1 sibling, 0 replies; 5+ messages in thread From: Liming Gao @ 2019-09-25 13:32 UTC (permalink / raw) To: devel@edk2.groups.io, Gao, Zhichao Thanks for your quick fix. > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gao, Zhichao > Sent: Wednesday, September 25, 2019 8:09 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Gao, Liming > <liming.gao@intel.com> > Subject: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2219 > > Refer to > https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter4.html#config-appcursor > In normal mode, arrow key would send ESC [A through to ESC [D. > In application mode, arrow key would send ESC OA through to > ESC OD. > > Cc: Jian J Wang <jian.j.wang@intel.com> > Cc: Hao A Wu <hao.a.wu@intel.com> > Cc: Ray Ni <ray.ni@intel.com> > Cc: Liming Gao <liming.gao@intel.com> > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> > --- > .../Console/TerminalDxe/TerminalConIn.c | 46 ++++++++++++++++--- > 1 file changed, 40 insertions(+), 6 deletions(-) > > diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > index ac31f27984..fdb1a0f1ef 100644 > --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > @@ -1402,10 +1402,7 @@ UnicodeToEfiKey ( > continue; > } > > - if (UnicodeChar == 'O' && (TerminalDevice->TerminalType == TerminalTypeVt100 || > - TerminalDevice->TerminalType == TerminalTypeTtyTerm || > - TerminalDevice->TerminalType == TerminalTypeXtermR6 || > - TerminalDevice->TerminalType == TerminalTypeVt100Plus)) { > + if (UnicodeChar == 'O') { > TerminalDevice->InputState |= INPUT_STATE_O; > TerminalDevice->ResetState = RESET_STATE_DEFAULT; > continue; > @@ -1631,6 +1628,35 @@ UnicodeToEfiKey ( > } > } > > + // > + // In Putty application mode, the arrow keys would send > + // ESC OA through to ESC OD > + // > + if (TerminalDevice->TerminalType == TerminalTypePcAnsi || > + TerminalDevice->TerminalType == TerminalTypeVt100 || > + TerminalDevice->TerminalType == TerminalTypeVt100Plus || > + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > + TerminalDevice->TerminalType == TerminalTypeTtyTerm || > + TerminalDevice->TerminalType == TerminalTypeLinux || > + TerminalDevice->TerminalType == TerminalTypeXtermR6 || > + TerminalDevice->TerminalType == TerminalTypeVt400 || > + TerminalDevice->TerminalType == TerminalTypeSCO) { > + switch (UnicodeChar) { > + case 'A': > + Key.ScanCode = SCAN_UP; > + break; > + case 'B': > + Key.ScanCode = SCAN_DOWN; > + break; > + case 'C': > + Key.ScanCode = SCAN_RIGHT; > + break; > + case 'D': > + Key.ScanCode = SCAN_LEFT; > + break; > + } > + } > + > if (Key.ScanCode != SCAN_NULL) { > Key.UnicodeChar = 0; > EfiKeyFiFoInsertOneKey (TerminalDevice, &Key); > @@ -1668,10 +1694,18 @@ UnicodeToEfiKey ( > > Key.ScanCode = SCAN_NULL; > > + // > + // In Putty normal mode, the arrow keys would send > + // ESC [A through to [D > + // > if (TerminalDevice->TerminalType == TerminalTypePcAnsi || > TerminalDevice->TerminalType == TerminalTypeVt100 || > - TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > - TerminalDevice->TerminalType == TerminalTypeTtyTerm || > + TerminalDevice->TerminalType == TerminalTypeVt100Plus || > + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > + TerminalDevice->TerminalType == TerminalTypeTtyTerm || > + TerminalDevice->TerminalType == TerminalTypeLinux || > + TerminalDevice->TerminalType == TerminalTypeXtermR6 || > + TerminalDevice->TerminalType == TerminalTypeVt400 || > TerminalDevice->TerminalType == TerminalTypeSCO) { > switch (UnicodeChar) { > case 'A': > -- > 2.21.0.windows.1 > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support 2019-09-25 12:09 [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support Gao, Zhichao 2019-09-25 13:32 ` [edk2-devel] " Liming Gao @ 2019-09-25 18:17 ` Ni, Ray 2019-09-26 0:51 ` Gao, Zhichao [not found] ` <15C7D6B899193667.11273@groups.io> 1 sibling, 2 replies; 5+ messages in thread From: Ni, Ray @ 2019-09-25 18:17 UTC (permalink / raw) To: devel@edk2.groups.io, Gao, Zhichao; +Cc: Wang, Jian J, Wu, Hao A, Gao, Liming Zhichao, The four new modes you newly added are supported by putty. But I do not think Putty is the standard the terminal driver needs to follow. So, 1. can you please remove the "putty" from the comments (maybe code)? 2. can you please find the sources where each mode is defined and double check whether the change you make is following the mode definition? It avoids you make Putty happy but make other good-behavior terminal software unhappy. Thanks, Ray > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gao, Zhichao > Sent: Wednesday, September 25, 2019 5:09 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Gao, Liming > <liming.gao@intel.com> > Subject: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2219 > > Refer to > https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter4.html#config-appcursor > In normal mode, arrow key would send ESC [A through to ESC [D. > In application mode, arrow key would send ESC OA through to > ESC OD. > > Cc: Jian J Wang <jian.j.wang@intel.com> > Cc: Hao A Wu <hao.a.wu@intel.com> > Cc: Ray Ni <ray.ni@intel.com> > Cc: Liming Gao <liming.gao@intel.com> > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> > --- > .../Console/TerminalDxe/TerminalConIn.c | 46 ++++++++++++++++--- > 1 file changed, 40 insertions(+), 6 deletions(-) > > diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > index ac31f27984..fdb1a0f1ef 100644 > --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > @@ -1402,10 +1402,7 @@ UnicodeToEfiKey ( > continue; > } > > - if (UnicodeChar == 'O' && (TerminalDevice->TerminalType == TerminalTypeVt100 || > - TerminalDevice->TerminalType == TerminalTypeTtyTerm || > - TerminalDevice->TerminalType == TerminalTypeXtermR6 || > - TerminalDevice->TerminalType == TerminalTypeVt100Plus)) { > + if (UnicodeChar == 'O') { > TerminalDevice->InputState |= INPUT_STATE_O; > TerminalDevice->ResetState = RESET_STATE_DEFAULT; > continue; > @@ -1631,6 +1628,35 @@ UnicodeToEfiKey ( > } > } > > + // > + // In Putty application mode, the arrow keys would send > + // ESC OA through to ESC OD > + // > + if (TerminalDevice->TerminalType == TerminalTypePcAnsi || > + TerminalDevice->TerminalType == TerminalTypeVt100 || > + TerminalDevice->TerminalType == TerminalTypeVt100Plus || > + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > + TerminalDevice->TerminalType == TerminalTypeTtyTerm || > + TerminalDevice->TerminalType == TerminalTypeLinux || > + TerminalDevice->TerminalType == TerminalTypeXtermR6 || > + TerminalDevice->TerminalType == TerminalTypeVt400 || > + TerminalDevice->TerminalType == TerminalTypeSCO) { > + switch (UnicodeChar) { > + case 'A': > + Key.ScanCode = SCAN_UP; > + break; > + case 'B': > + Key.ScanCode = SCAN_DOWN; > + break; > + case 'C': > + Key.ScanCode = SCAN_RIGHT; > + break; > + case 'D': > + Key.ScanCode = SCAN_LEFT; > + break; > + } > + } > + > if (Key.ScanCode != SCAN_NULL) { > Key.UnicodeChar = 0; > EfiKeyFiFoInsertOneKey (TerminalDevice, &Key); > @@ -1668,10 +1694,18 @@ UnicodeToEfiKey ( > > Key.ScanCode = SCAN_NULL; > > + // > + // In Putty normal mode, the arrow keys would send > + // ESC [A through to [D > + // > if (TerminalDevice->TerminalType == TerminalTypePcAnsi || > TerminalDevice->TerminalType == TerminalTypeVt100 || > - TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > - TerminalDevice->TerminalType == TerminalTypeTtyTerm || > + TerminalDevice->TerminalType == TerminalTypeVt100Plus || > + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > + TerminalDevice->TerminalType == TerminalTypeTtyTerm || > + TerminalDevice->TerminalType == TerminalTypeLinux || > + TerminalDevice->TerminalType == TerminalTypeXtermR6 || > + TerminalDevice->TerminalType == TerminalTypeVt400 || > TerminalDevice->TerminalType == TerminalTypeSCO) { > switch (UnicodeChar) { > case 'A': > -- > 2.21.0.windows.1 > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support 2019-09-25 18:17 ` Ni, Ray @ 2019-09-26 0:51 ` Gao, Zhichao [not found] ` <15C7D6B899193667.11273@groups.io> 1 sibling, 0 replies; 5+ messages in thread From: Gao, Zhichao @ 2019-09-26 0:51 UTC (permalink / raw) To: Ni, Ray, devel@edk2.groups.io; +Cc: Wang, Jian J, Wu, Hao A, Gao, Liming > -----Original Message----- > From: Ni, Ray > Sent: Thursday, September 26, 2019 2:17 AM > To: devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; > Gao, Liming <liming.gao@intel.com> > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance > the arrow keys support > > Zhichao, > The four new modes you newly added are supported by putty. But I do not > think Putty is the standard the terminal driver needs to follow. > So, > 1. can you please remove the "putty" from the comments (maybe code)? Unfortunately, the terminal type doesn't have a spec or document except Putty's website. That's why I add it to the comment. > 2. can you please find the sources where each mode is defined and double > check whether the change you make is following the mode definition? It > avoids you make Putty happy but make other good-behavior terminal > software unhappy. The normal mode and application mode the Putty's own mode for the cursor keys, such as arrow keys. There are *no such modes* in the terminal driver. So I add the patch to support them all. The special keys usually send a sequence keys, such as ESC + [ + A, thru the terminal ConIn. And it is terminal DXE driver's duty to recognize these sequence keys and transfer the actual key value. Different terminal software may have different sequence keys for the special keys, but It would be ignored if we don't add the support. The only affected thing is that if you input a sequence of keys quickly, such as ESC + [ + A or ESC + O + A, thru the terminal software, then it would be seen as arrow key 'UP' regardless of the terminal type. Same to other new arrow keys. I made a mistake in the previous patch to add the new terminal types. I remove the VT100Plus's arrow key function incorrectly and that make the arrow key not work with the terminal type VT100Plus. And then I think it is better to add the whole support of arrow key. Thanks, Zhichao > > Thanks, > Ray > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gao, > > Zhichao > > Sent: Wednesday, September 25, 2019 5:09 AM > > To: devel@edk2.groups.io > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A > > <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Gao, Liming > > <liming.gao@intel.com> > > Subject: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the > > arrow keys support > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2219 > > > > Refer to > > https://www.ssh.com/ssh/putty/putty- > manuals/0.68/Chapter4.html#config- > > appcursor In normal mode, arrow key would send ESC [A through to ESC > > [D. > > In application mode, arrow key would send ESC OA through to ESC OD. > > > > Cc: Jian J Wang <jian.j.wang@intel.com> > > Cc: Hao A Wu <hao.a.wu@intel.com> > > Cc: Ray Ni <ray.ni@intel.com> > > Cc: Liming Gao <liming.gao@intel.com> > > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> > > --- > > .../Console/TerminalDxe/TerminalConIn.c | 46 ++++++++++++++++--- > > 1 file changed, 40 insertions(+), 6 deletions(-) > > > > diff --git > > a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > > b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > > index ac31f27984..fdb1a0f1ef 100644 > > --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > > +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c > > @@ -1402,10 +1402,7 @@ UnicodeToEfiKey ( > > continue; > > } > > > > - if (UnicodeChar == 'O' && (TerminalDevice->TerminalType == > TerminalTypeVt100 || > > - TerminalDevice->TerminalType == TerminalTypeTtyTerm > || > > - TerminalDevice->TerminalType == TerminalTypeXtermR6 > || > > - TerminalDevice->TerminalType == > TerminalTypeVt100Plus)) { > > + if (UnicodeChar == 'O') { > > TerminalDevice->InputState |= INPUT_STATE_O; > > TerminalDevice->ResetState = RESET_STATE_DEFAULT; > > continue; > > @@ -1631,6 +1628,35 @@ UnicodeToEfiKey ( > > } > > } > > > > + // > > + // In Putty application mode, the arrow keys would send > > + // ESC OA through to ESC OD > > + // > > + if (TerminalDevice->TerminalType == TerminalTypePcAnsi || > > + TerminalDevice->TerminalType == TerminalTypeVt100 || > > + TerminalDevice->TerminalType == TerminalTypeVt100Plus || > > + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > > + TerminalDevice->TerminalType == TerminalTypeTtyTerm || > > + TerminalDevice->TerminalType == TerminalTypeLinux || > > + TerminalDevice->TerminalType == TerminalTypeXtermR6 || > > + TerminalDevice->TerminalType == TerminalTypeVt400 || > > + TerminalDevice->TerminalType == TerminalTypeSCO) { > > + switch (UnicodeChar) { > > + case 'A': > > + Key.ScanCode = SCAN_UP; > > + break; > > + case 'B': > > + Key.ScanCode = SCAN_DOWN; > > + break; > > + case 'C': > > + Key.ScanCode = SCAN_RIGHT; > > + break; > > + case 'D': > > + Key.ScanCode = SCAN_LEFT; > > + break; > > + } > > + } > > + > > if (Key.ScanCode != SCAN_NULL) { > > Key.UnicodeChar = 0; > > EfiKeyFiFoInsertOneKey (TerminalDevice, &Key); @@ -1668,10 > > +1694,18 @@ UnicodeToEfiKey ( > > > > Key.ScanCode = SCAN_NULL; > > > > + // > > + // In Putty normal mode, the arrow keys would send > > + // ESC [A through to [D > > + // > > if (TerminalDevice->TerminalType == TerminalTypePcAnsi || > > TerminalDevice->TerminalType == TerminalTypeVt100 || > > - TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > > - TerminalDevice->TerminalType == TerminalTypeTtyTerm || > > + TerminalDevice->TerminalType == TerminalTypeVt100Plus || > > + TerminalDevice->TerminalType == TerminalTypeVtUtf8 || > > + TerminalDevice->TerminalType == TerminalTypeTtyTerm || > > + TerminalDevice->TerminalType == TerminalTypeLinux || > > + TerminalDevice->TerminalType == TerminalTypeXtermR6 || > > + TerminalDevice->TerminalType == TerminalTypeVt400 || > > TerminalDevice->TerminalType == TerminalTypeSCO) { > > switch (UnicodeChar) { > > case 'A': > > -- > > 2.21.0.windows.1 > > > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <15C7D6B899193667.11273@groups.io>]
* Re: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support [not found] ` <15C7D6B899193667.11273@groups.io> @ 2019-09-26 1:03 ` Gao, Zhichao 0 siblings, 0 replies; 5+ messages in thread From: Gao, Zhichao @ 2019-09-26 1:03 UTC (permalink / raw) To: devel@edk2.groups.io, Gao, Zhichao, Ni, Ray Cc: Wang, Jian J, Wu, Hao A, Gao, Liming To answer your questions: 1. As you say, putty may not be not standard terminal. So removing it from comment is inappropriate in my opinion. 2. Terminal DXE driver doesn't have the related mode (normal or application mode). It wouldn't make other terminal software unhappy except they input the special sequence keys. Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Gao, Zhichao > Sent: Thursday, September 26, 2019 8:51 AM > To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; > Gao, Liming <liming.gao@intel.com> > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance > the arrow keys support > > > > > -----Original Message----- > > From: Ni, Ray > > Sent: Thursday, September 26, 2019 2:17 AM > > To: devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com> > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A > > <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com> > > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/TerminalDxe: Enhance > > the arrow keys support > > > > Zhichao, > > The four new modes you newly added are supported by putty. But I do > > not think Putty is the standard the terminal driver needs to follow. > > So, > > 1. can you please remove the "putty" from the comments (maybe code)? > > Unfortunately, the terminal type doesn't have a spec or document except > Putty's website. That's why I add it to the comment. > > > 2. can you please find the sources where each mode is defined and > > double check whether the change you make is following the mode > > definition? It avoids you make Putty happy but make other > > good-behavior terminal software unhappy. > > The normal mode and application mode the Putty's own mode for the cursor > keys, such as arrow keys. There are *no such modes* in the terminal driver. > So I add the patch to support them all. > The special keys usually send a sequence keys, such as ESC + [ + A, thru the > terminal ConIn. And it is terminal DXE driver's duty to recognize these > sequence keys and transfer the actual key value. Different terminal software > may have different sequence keys for the special keys, but It would be > ignored if we don't add the support. > The only affected thing is that if you input a sequence of keys quickly, such as > ESC + [ + A or ESC + O + A, thru the terminal software, then it would be seen > as arrow key 'UP' regardless of the terminal type. Same to other new arrow > keys. > > I made a mistake in the previous patch to add the new terminal types. I > remove the VT100Plus's arrow key function incorrectly and that make the > arrow key not work with the terminal type VT100Plus. And then I think it is > better to add the whole support of arrow key. > > Thanks, > Zhichao > > > > > Thanks, > > Ray > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-26 1:03 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-09-25 12:09 [PATCH] MdeModulePkg/TerminalDxe: Enhance the arrow keys support Gao, Zhichao 2019-09-25 13:32 ` [edk2-devel] " Liming Gao 2019-09-25 18:17 ` Ni, Ray 2019-09-26 0:51 ` Gao, Zhichao [not found] ` <15C7D6B899193667.11273@groups.io> 2019-09-26 1:03 ` Gao, Zhichao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox