mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-04-21 20:58:05 +08:00
pref: support Home
and End
input for cli (#313)
This commit is contained in:
parent
29b51f836f
commit
ee398d4d98
@ -253,6 +253,15 @@ const onTermKey = (e) => {
|
||||
}
|
||||
// block all ctrl key combinations input
|
||||
return false
|
||||
} else {
|
||||
switch (e.key) {
|
||||
case 'Home': // move to head of line
|
||||
moveInputCursorTo(0)
|
||||
return false
|
||||
case 'End': // move to tail of line
|
||||
moveInputCursorTo(Number.MAX_SAFE_INTEGER)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user