Skip to content

Commit

Permalink
pref: support Home and End input for cli (tiny-craft#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiny-craft committed Jul 26, 2024
1 parent 29b51f8 commit ee398d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions frontend/src/components/content_value/ContentCli.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee398d4

Please sign in to comment.