fix(ink): handle enter key on centos
Some terminals on CentOS emit 'enter' instead of 'return' for the Enter key. Treat both names as the Return key to ensure consistent input behavior across platforms. Signed-off-by: 林凯90331 <90331@sangfor.com> Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
This commit is contained in:
parent
34903c97e8
commit
beb268eca0
|
|
@ -36,7 +36,7 @@ function parseKey(keypress: ParsedKey): [Key, string] {
|
|||
wheelDown: keypress.name === 'wheeldown',
|
||||
home: keypress.name === 'home',
|
||||
end: keypress.name === 'end',
|
||||
return: keypress.name === 'return',
|
||||
return: keypress.name === 'return' || keypress.name === 'enter',
|
||||
escape: keypress.name === 'escape',
|
||||
fn: keypress.fn,
|
||||
ctrl: keypress.ctrl,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user