From 73adc71965171eb8c007a1decc6b10131c92aeb5 Mon Sep 17 00:00:00 2001 From: Frank-py <85338377+Frank-py@users.noreply.github.com> Date: Sat, 25 Dec 2021 23:11:21 +0100 Subject: [PATCH 1/2] Updated Terminal.tsx to add keypress event. Added keypress event to delete the word after input by pressing "alt" + "d". --- src/Terminal/ui/TerminalInput.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Terminal/ui/TerminalInput.tsx b/src/Terminal/ui/TerminalInput.tsx index 6a6dd4027..dc0a4ab86 100644 --- a/src/Terminal/ui/TerminalInput.tsx +++ b/src/Terminal/ui/TerminalInput.tsx @@ -350,7 +350,12 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React event.preventDefault(); modifyInput("deletewordbefore"); } - + + if (event.keyCode === KEY.D && event.altKey) { + event.preventDefault(); + modifyInput("deletewordafter"); + } + if (event.keyCode === KEY.U && event.ctrlKey) { event.preventDefault(); modifyInput("clearbefore"); @@ -360,9 +365,6 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React event.preventDefault(); modifyInput("clearafter"); } - - // TODO AFTER THIS: - // alt + d deletes word after cursor } } From a4eddb46916134e5e7259b4adb853d9e9d9b8cc4 Mon Sep 17 00:00:00 2001 From: Frank-py <85338377+Frank-py@users.noreply.github.com> Date: Sat, 25 Dec 2021 23:18:49 +0100 Subject: [PATCH 2/2] Fixed typo in CONTRIBUTING.md file. Changed naviguate to navigate. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41c22e38d..ecf90a90c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -118,7 +118,7 @@ Inside the root of the repo run `npm install` to install all the dependencies `npm run start:dev` to launch the game in dev mode. -After that you can open any browser and naviguate to `localhost:8000` and play the game. +After that you can open any browser and navigate to `localhost:8000` and play the game. Saving a file will reload the game automatically. #### Submitting a Pull Request