From b8dcb8dba87646c946aec6e33ea2269fe3b8d936 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Wed, 8 Mar 2023 19:59:06 -0500 Subject: [PATCH] [O] Allow arrow controls --- tngame-rs/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tngame-rs/src/main.rs b/tngame-rs/src/main.rs index fe0b65f..1a33e06 100644 --- a/tngame-rs/src/main.rs +++ b/tngame-rs/src/main.rs @@ -405,8 +405,10 @@ async fn pull_input(mt: Arc>, cn: &Consts) -> Result<()> { mt.should_exit = true; break; }, - "a" => move_x(-1), - "d" => move_x(1), + // Move left on a or left arrow + "a" | "\x1b[D" => move_x(-1), + // Move right on d or right arrow + "d" | "\x1b[C" => move_x(1), _ => (), } }