mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 14:13:48 +01:00
Implement ctrl+c bash hotkey to clear current input
This commit is contained in:
parent
6f017bf4f6
commit
9efb209ea3
@ -128,6 +128,9 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React
|
||||
case "clearbefore": // Deletes everything before cursor
|
||||
saveValue(inputText.substr(start), () => moveTextCursor("home"));
|
||||
break;
|
||||
case "clearall": // Deletes everything in the input
|
||||
saveValue("");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,6 +321,11 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React
|
||||
|
||||
// Extra Bash Emulation Hotkeys, must be enabled through options
|
||||
if (Settings.EnableBashHotkeys) {
|
||||
if (event.code === KEYCODE.C && event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
modifyInput("clearall");
|
||||
}
|
||||
|
||||
if (event.code === KEYCODE.A && event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
moveTextCursor("home");
|
||||
|
Loading…
Reference in New Issue
Block a user