mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 01:53:48 +01:00
fix not being able to ctrlc the terminal
This commit is contained in:
parent
4bf3e5a2e4
commit
195dff7c44
@ -140,9 +140,9 @@ export function TerminalInput({ terminal, engine, player }: IProps): React.React
|
||||
useEffect(() => {
|
||||
function keyDown(this: Document, event: KeyboardEvent): void {
|
||||
if (terminal.contractOpen) return;
|
||||
if (event.metaKey || event.ctrlKey) return;
|
||||
const ref = terminalInput.current;
|
||||
if (ref) ref.focus();
|
||||
|
||||
// Cancel action
|
||||
if (event.keyCode === KEY.C && event.ctrlKey) {
|
||||
terminal.finishAction(player, true);
|
||||
@ -351,7 +351,7 @@ export function TerminalInput({ terminal, engine, player }: IProps): React.React
|
||||
className: classes.input,
|
||||
startAdornment: (
|
||||
<>
|
||||
<Typography color={terminal.action === null ? "primary" : "secondary"}>
|
||||
<Typography color={terminal.action === null ? "primary" : "secondary"} flexShrink={0}>
|
||||
[{player.getCurrentServer().hostname} ~{terminal.cwd()}]>
|
||||
</Typography>
|
||||
</>
|
||||
|
@ -62,7 +62,7 @@ export function TerminalRoot({ terminal, engine, player }: IProps): React.ReactE
|
||||
|
||||
const hook = scrollHook.current;
|
||||
if (hook !== null) {
|
||||
setTimeout(() => hook.scrollIntoView(true), 10);
|
||||
setTimeout(() => hook.scrollIntoView(true), 50);
|
||||
}
|
||||
|
||||
const classes = useStyles();
|
||||
|
Loading…
Reference in New Issue
Block a user