From 3749cb79b6de6d966248f603c40107c44e719cce Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Mon, 13 Apr 2026 14:32:46 +0300 Subject: Add keybindings to move faster --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 2178d2e..be36753 100644 --- a/main.c +++ b/main.c @@ -148,12 +148,15 @@ int main(int argc, char **argv) { int c = getch(); /* TODO: add a keybinding to calculate the path again, or maybe do it on 'a' */ /* TODO: maybe a kbng to move to start/end? */ - /* TODO: big HJKL to move fasta */ switch (c) { case 'h': map_offset_x += 2; break; case 'l': map_offset_x -= 2; break; case 'j': map_offset_y -= 1; break; case 'k': map_offset_y += 1; break; + case 'H': clear(); map_offset_x += 20; break; + case 'L': clear(); map_offset_x -= 20; break; + case 'J': clear(); map_offset_y -= 10; break; + case 'K': clear(); map_offset_y += 10; break; case 'z': clear(); map_offset_x = 2; map_offset_y = 1; break; /* Move to top left corner */ case 'x': clear(); map_offset_x = - width * 2 + COLS - 2; map_offset_y = - height + LINES - 2; break; /* Move to bottom right corner */ case 'a': anim = !anim; break; -- cgit v1.2.3