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:
林凯90331 2026-05-15 10:17:22 +08:00
parent 34903c97e8
commit beb268eca0

View File

@ -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,