From d6e8f398515bcd74a651e6f65a6cb487b5925cd4 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:16:24 -0600 Subject: [PATCH 01/12] Add new keys and clean up formatting Moved segmentsize keys to the numpad, added toggles for Fog, debugmode, and announcements --- resources/keybinds.txt | 305 +++++++++++++++++++++-------------------- 1 file changed, 157 insertions(+), 148 deletions(-) diff --git a/resources/keybinds.txt b/resources/keybinds.txt index cfebb283..3c56294a 100644 --- a/resources/keybinds.txt +++ b/resources/keybinds.txt @@ -29,6 +29,7 @@ KEYBINDINGS: [TOGGLE_STOCKS:KEY_I] [TOGGLE_ZONES:KEY_U] [TOGGLE_OCCLUSION:KEY_O] +[TOGGLE_FOG:KEYS_TILDE] [TOGGLE_CREATURE_MOODS:KEY_M] [TOGGLE_CREATURE_PROFS:KEY_P] [TOGGLE_CREATURE_JOBS:KEY_J] @@ -36,13 +37,19 @@ KEYBINDINGS: [CHOP_WALLS:KEY_C] [CYCLE_TRACKING_MODE:KEY_F] [RESET_VIEW_OFFSET:KEY_Z] -[DECR_SEGMENT_Z:KEY_1] -[INCR_SEGMENT_Z:KEY_2] +[DECR_SEGMENT_Z:KEYPAD_3] +[INCR_SEGMENT_Z:KEYPAD_9] +[DECR_SEGMENT_X:KEYPAD_4] +[INCR_SEGMENT_X:KEYPAD_6] +[DECR_SEGMENT_Y:KEYPAD_2] +[INCR_SEGMENT_Y:KEYPAD_8] [TOGGLE_SINGLE_LAYER:KEY_S] [TOGGLE_SHADE_HIDDEN_TILES:KEY_B] [TOGGLE_SHOW_HIDDEN_TILES:KEY_H] [TOGGLE_OSD:KEYF_2] [TOGGLE_KEYBINDS:KEYS_SLASH] +[TOGGLE_ANNOUNCEMENTS:KEY_A] +[TOGGLE_DEBUG:KEYS_SEMICOLON] [INCR_ZOOM:KEYS_FULLSTOP] [DECR_ZOOM:KEYS_COMMA] [SCREENSHOT:KEYF_5] @@ -61,41 +68,43 @@ VALID ACTIONS: Actions: Explanation: - NOOP do nothing (default) - ROTATE rotate the displayed map segment - RELOAD_SEGMENT reload the segment (meaningless when auto-reload enabled) - PAINT draw the loaded segment (meaningless when auto-reload enabled) - TOGGLE_DESIGNATIONS toggle display of designations - TOGGLE_STOCKS toggle display of stockpiles - TOGGLE_ZONES toggle display of activity zones - TOGGLE_OCCLUSION toggle the occlusion culling - TOGGLE_CREATURE_MOODS toggle display of creature mood icons - TOGGLE_CREATURE_PROFS cycle through display of profession indicators (disabled/icons/colored names) - TOGGLE_CREATURE_JOBS cycle through display of job indicators (disabled/icons/text descriptions) - TOGGLE_CREATURE_NAMES toggle the display of creature names - CHOP_WALLS cycle through wall sprite chopping options - CYCLE_TRACKING_MODE cycle through modes for following DF - RESET_VIEW_OFFSET reset the view offset - TOGGLE_SINGLE_LAYER toggle single layer mode - TOGGLE_SHADE_HIDDEN_TILES toggle shading hidden tiles - TOGGLE_SHOW_HIDDEN_TILES toggle showing hidden tiles - TOGGLE_OSD toggle the onscreen display (currently this is just minimal text info) - TOGGLE_KEYBINDS toggle display of keybind information - INCR_ZOOM increase the zoom - DECR_ZOOM decrease the zoom - SCREENSHOT take a screenshot (alt: volumetric screenshot / ctrl: megashot / shift+ctrl: full-depth megashot) - INCR_RELOAD_TIME increase the reload timer - DECR_RELOAD_TIME decrease the reload timer - CREDITS show credits - - DECR_SEGMENT_X decrease/increase the corresponding displayed segment size coordinate + NOOP | do nothing (default) + ROTATE | rotate the displayed map segment + RELOAD_SEGMENT | reload the segment (meaningless when auto-reload enabled) + PAINT | draw the loaded segment (meaningless when auto-reload enabled) + TOGGLE_DESIGNATIONS | toggle display of designations + TOGGLE_STOCKS | toggle display of stockpiles + TOGGLE_ZONES | toggle display of activity zones + TOGGLE_OCCLUSION | toggle the occlusion culling + TOGGLE_CREATURE_MOODS | toggle display of creature mood icons + TOGGLE_CREATURE_PROFS | cycle through display of profession indicators (disabled/icons/colored names) + TOGGLE_CREATURE_JOBS | cycle through display of job indicators (disabled/icons/text descriptions) + TOGGLE_CREATURE_NAMES | toggle the display of creature names + CHOP_WALLS | cycle through wall sprite chopping options + CYCLE_TRACKING_MODE | cycle through modes for following DF + RESET_VIEW_OFFSET | reset the view offset + TOGGLE_SINGLE_LAYER | toggle single layer mode + TOGGLE_SHADE_HIDDEN_TILES | toggle shading hidden tiles + TOGGLE_SHOW_HIDDEN_TILES | toggle showing hidden tiles + TOGGLE_OSD | toggle the onscreen display (currently this is just minimal text info) + TOGGLE_KEYBINDS | toggle display of keybind information + INCR_ZOOM | increase the zoom + DECR_ZOOM | decrease the zoom + INCR_UISCALE | increase the font size + DECR_UISCALE | decrease the font size + SCREENSHOT | take a screenshot (alt: volumetric screenshot / ctrl: megashot / shift+ctrl: full-depth megashot) + INCR_RELOAD_TIME | increase the reload timer + DECR_RELOAD_TIME | decrease the reload timer + CREDITS | show credits + + DECR_SEGMENT_X | decrease/increase the corresponding displayed segment size coordinate INCR_SEGMENT_X DECR_SEGMENT_Y INCR_SEGMENT_Y DECR_SEGMENT_Z INCR_SEGMENT_Z - DECR_X decrease/increase the corresponding segment position coordinate (alt: continue following DF / ctrl: DECR_SEGMENT_*) + DECR_X | decrease/increase the corresponding segment position coordinate (alt: continue following DF / ctrl: DECR_SEGMENT_*) INCR_X DECR_Y INCR_Y @@ -106,120 +115,120 @@ VALID KEYS: Key Names: Explanation: - INVALID nokey (default) - - KEY_A a - KEY_B b - KEY_C c - KEY_D d - KEY_E e - KEY_F f - KEY_G g - KEY_H h - KEY_I i - KEY_J j - KEY_K k - KEY_L l - KEY_M m - KEY_N n - KEY_O o - KEY_P p - KEY_Q q - KEY_R r - KEY_S s - KEY_T t - KEY_U u - KEY_V v - KEY_W w - KEY_X x - KEY_Y y - KEY_Z z - - KEY_0 0 - KEY_1 1 - KEY_2 2 - KEY_3 3 - KEY_4 4 - KEY_5 5 - KEY_6 6 - KEY_7 7 - KEY_8 8 - KEY_9 9 - - KEYPAD_0 0 (keypad) - KEYPAD_1 1 (keypad) - KEYPAD_2 2 (keypad) - KEYPAD_3 3 (keypad) - KEYPAD_4 4 (keypad) - KEYPAD_5 5 (keypad) - KEYPAD_6 6 (keypad) - KEYPAD_7 7 (keypad) - KEYPAD_8 8 (keypad) - KEYPAD_9 8 (keypad) - - KEYF_1 F1 - KEYF_2 F2 - KEYF_3 F3 - KEYF_4 F4 - KEYF_5 F5 - KEYF_6 F6 - KEYF_7 F7 - KEYF_8 F8 - KEYF_9 F9 - KEYF_10 F10 - KEYF_11 F11 - KEYF_12 F12 - - KEYS_ESCAPE escape key (overridden by hardcoded commands) - KEYS_TILDE ~ - KEYS_MINUS - - KEYS_EQUALS = - KEYS_BACKSPACE (backspace) - KEYS_TAB (tab) - KEYS_OPENBRACE [ - KEYS_CLOSEBRACE ] - KEYS_ENTER (enter) - KEYS_SEMICOLON ; - KEYS_QUOTE '' - KEYS_BACKSLASH \ - KEYS_BACKSLASH2 (only on german keyboards or something) - KEYS_COMMA , - KEYS_FULLSTOP . - KEYS_SLASH / - KEYS_SPACE (spacebar) - - KEYS_INSERT (insert) - KEYS_DELETE (delete) - KEYS_HOME (home) - KEYS_END (end) - KEYS_PGUP (page up) - KEYS_PGDN (page down) - KEYS_LEFT (left arrow) - KEYS_RIGHT (right arrow) - KEYS_UP (up arrow) - KEYS_DOWN (down arrow) - - KEYPAD_SLASH / (keypad) - KEYPAD_ASTERISK * (keypad) - KEYPAD_MINUS - (keypad) - KEYPAD_PLUS + (keypad) - KEYPAD_DELETE (keypad delete) - KEYPAD_ENTER (keypad enter) - - KEYS_PRINTSCREEN (print screen) - KEYS_PAUSE (pause) - - KEYS_ABNT_C1 (???) - KEYS_YEN (???) - KEYS_KANA (???) - KEYS_CONVERT (???) - KEYS_NOCONVERT (???) - KEYS_AT (???) - KEYS_CIRCUMFLEX (???) - KEYS_COLON2 (???) - KEYS_KANJI (???) - - KEYPAD_EQUALS (MacOS X only) - KEYS_BACKQUOTE (MacOS X only) - KEYS_SEMICOLON2 (MacOS X only) - KEYS_COMMAND (MacOS X only) + INVALID | nokey (default) + + KEY_A | a + KEY_B | b + KEY_C | c + KEY_D | d + KEY_E | e + KEY_F | f + KEY_G | g + KEY_H | h + KEY_I | i + KEY_J | j + KEY_K | k + KEY_L | l + KEY_M | m + KEY_N | n + KEY_O | o + KEY_P | p + KEY_Q | q + KEY_R | r + KEY_S | s + KEY_T | t + KEY_U | u + KEY_V | v + KEY_W | w + KEY_X | x + KEY_Y | y + KEY_Z | z + + KEY_0 | 0 + KEY_1 | 1 + KEY_2 | 2 + KEY_3 | 3 + KEY_4 | 4 + KEY_5 | 5 + KEY_6 | 6 + KEY_7 | 7 + KEY_8 | 8 + KEY_9 | 9 + + KEYPAD_0 | 0 (keypad) + KEYPAD_1 | 1 (keypad) + KEYPAD_2 | 2 (keypad) + KEYPAD_3 | 3 (keypad) + KEYPAD_4 | 4 (keypad) + KEYPAD_5 | 5 (keypad) + KEYPAD_6 | 6 (keypad) + KEYPAD_7 | 7 (keypad) + KEYPAD_8 | 8 (keypad) + KEYPAD_9 | 9 (keypad) + + KEYF_1 | F1 + KEYF_2 | F2 + KEYF_3 | F3 + KEYF_4 | F4 + KEYF_5 | F5 + KEYF_6 | F6 + KEYF_7 | F7 + KEYF_8 | F8 + KEYF_9 | F9 + KEYF_10 | F10 + KEYF_11 | F11 + KEYF_12 | F12 + + KEYS_ESCAPE | escape key (overridden by hardcoded commands) + KEYS_TILDE | ~ + KEYS_MINUS | - + KEYS_EQUALS | = + KEYS_BACKSPACE | (backspace) + KEYS_TAB | (tab) + KEYS_OPENBRACE | [ + KEYS_CLOSEBRACE | ] + KEYS_ENTER | (enter) + KEYS_SEMICOLON | ; + KEYS_QUOTE | '' + KEYS_BACKSLASH | \ + KEYS_BACKSLASH2 | (only on german keyboards or something) + KEYS_COMMA | , + KEYS_FULLSTOP | . + KEYS_SLASH | / + KEYS_SPACE | (spacebar) + + KEYS_INSERT | (insert) + KEYS_DELETE | (delete) + KEYS_HOME | (home) + KEYS_END | (end) + KEYS_PGUP | (page up) + KEYS_PGDN | (page down) + KEYS_LEFT | (left arrow) + KEYS_RIGHT | (right arrow) + KEYS_UP | (up arrow) + KEYS_DOWN | (down arrow) + + KEYPAD_SLASH | / (keypad) + KEYPAD_ASTERISK | * (keypad) + KEYPAD_MINUS | - (keypad) + KEYPAD_PLUS | + (keypad) + KEYPAD_DELETE | (keypad delete) + KEYPAD_ENTER | (keypad enter) + + KEYS_PRINTSCREEN | (print screen) + KEYS_PAUSE | (pause) + + KEYS_ABNT_C1 | (???) + KEYS_YEN | (???) + KEYS_KANA | (???) + KEYS_CONVERT | (???) + KEYS_NOCONVERT | (???) + KEYS_AT | (???) + KEYS_CIRCUMFLEX | (???) + KEYS_COLON2 | (???) + KEYS_KANJI | (???) + + KEYPAD_EQUALS | (MacOS X only) + KEYS_BACKQUOTE | (MacOS X only) + KEYS_SEMICOLON2 | (MacOS X only) + KEYS_COMMAND | (MacOS X only) From 7cdfffcbc05e5892e22d3518e5e95ee64c5a3667 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:13:47 -0600 Subject: [PATCH 02/12] Move the keybinds file --- {resources => configs}/keybinds.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {resources => configs}/keybinds.txt (100%) diff --git a/resources/keybinds.txt b/configs/keybinds.txt similarity index 100% rename from resources/keybinds.txt rename to configs/keybinds.txt From e5b4befff3100decae26559fc0d609508cc1b9bc Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:51:26 -0600 Subject: [PATCH 03/12] Update the read location of keybinds --- Keybinds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Keybinds.cpp b/Keybinds.cpp index 338e2910..822eea36 100644 --- a/Keybinds.cpp +++ b/Keybinds.cpp @@ -273,7 +273,7 @@ void parseKeymapLine( string line ) bool loadKeymapFile(){ string line; - ALLEGRO_PATH * p =al_create_path("stonesense/keybinds.txt"); + ALLEGRO_PATH * p =al_create_path("dfhack-config/stonesense/keybinds.txt"); const char * path = al_path_cstr(p,ALLEGRO_NATIVE_PATH_SEP); ifstream myfile (path); if (myfile.is_open() == false) { From 3d546206db70c910c18101fac871a68da3def6fa Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:39:35 -0600 Subject: [PATCH 04/12] Revert "Add new keys and clean up formatting" This reverts commit d6e8f398515bcd74a651e6f65a6cb487b5925cd4. --- configs/keybinds.txt | 305 +++++++++++++++++++++---------------------- 1 file changed, 148 insertions(+), 157 deletions(-) diff --git a/configs/keybinds.txt b/configs/keybinds.txt index 3c56294a..cfebb283 100644 --- a/configs/keybinds.txt +++ b/configs/keybinds.txt @@ -29,7 +29,6 @@ KEYBINDINGS: [TOGGLE_STOCKS:KEY_I] [TOGGLE_ZONES:KEY_U] [TOGGLE_OCCLUSION:KEY_O] -[TOGGLE_FOG:KEYS_TILDE] [TOGGLE_CREATURE_MOODS:KEY_M] [TOGGLE_CREATURE_PROFS:KEY_P] [TOGGLE_CREATURE_JOBS:KEY_J] @@ -37,19 +36,13 @@ KEYBINDINGS: [CHOP_WALLS:KEY_C] [CYCLE_TRACKING_MODE:KEY_F] [RESET_VIEW_OFFSET:KEY_Z] -[DECR_SEGMENT_Z:KEYPAD_3] -[INCR_SEGMENT_Z:KEYPAD_9] -[DECR_SEGMENT_X:KEYPAD_4] -[INCR_SEGMENT_X:KEYPAD_6] -[DECR_SEGMENT_Y:KEYPAD_2] -[INCR_SEGMENT_Y:KEYPAD_8] +[DECR_SEGMENT_Z:KEY_1] +[INCR_SEGMENT_Z:KEY_2] [TOGGLE_SINGLE_LAYER:KEY_S] [TOGGLE_SHADE_HIDDEN_TILES:KEY_B] [TOGGLE_SHOW_HIDDEN_TILES:KEY_H] [TOGGLE_OSD:KEYF_2] [TOGGLE_KEYBINDS:KEYS_SLASH] -[TOGGLE_ANNOUNCEMENTS:KEY_A] -[TOGGLE_DEBUG:KEYS_SEMICOLON] [INCR_ZOOM:KEYS_FULLSTOP] [DECR_ZOOM:KEYS_COMMA] [SCREENSHOT:KEYF_5] @@ -68,43 +61,41 @@ VALID ACTIONS: Actions: Explanation: - NOOP | do nothing (default) - ROTATE | rotate the displayed map segment - RELOAD_SEGMENT | reload the segment (meaningless when auto-reload enabled) - PAINT | draw the loaded segment (meaningless when auto-reload enabled) - TOGGLE_DESIGNATIONS | toggle display of designations - TOGGLE_STOCKS | toggle display of stockpiles - TOGGLE_ZONES | toggle display of activity zones - TOGGLE_OCCLUSION | toggle the occlusion culling - TOGGLE_CREATURE_MOODS | toggle display of creature mood icons - TOGGLE_CREATURE_PROFS | cycle through display of profession indicators (disabled/icons/colored names) - TOGGLE_CREATURE_JOBS | cycle through display of job indicators (disabled/icons/text descriptions) - TOGGLE_CREATURE_NAMES | toggle the display of creature names - CHOP_WALLS | cycle through wall sprite chopping options - CYCLE_TRACKING_MODE | cycle through modes for following DF - RESET_VIEW_OFFSET | reset the view offset - TOGGLE_SINGLE_LAYER | toggle single layer mode - TOGGLE_SHADE_HIDDEN_TILES | toggle shading hidden tiles - TOGGLE_SHOW_HIDDEN_TILES | toggle showing hidden tiles - TOGGLE_OSD | toggle the onscreen display (currently this is just minimal text info) - TOGGLE_KEYBINDS | toggle display of keybind information - INCR_ZOOM | increase the zoom - DECR_ZOOM | decrease the zoom - INCR_UISCALE | increase the font size - DECR_UISCALE | decrease the font size - SCREENSHOT | take a screenshot (alt: volumetric screenshot / ctrl: megashot / shift+ctrl: full-depth megashot) - INCR_RELOAD_TIME | increase the reload timer - DECR_RELOAD_TIME | decrease the reload timer - CREDITS | show credits - - DECR_SEGMENT_X | decrease/increase the corresponding displayed segment size coordinate + NOOP do nothing (default) + ROTATE rotate the displayed map segment + RELOAD_SEGMENT reload the segment (meaningless when auto-reload enabled) + PAINT draw the loaded segment (meaningless when auto-reload enabled) + TOGGLE_DESIGNATIONS toggle display of designations + TOGGLE_STOCKS toggle display of stockpiles + TOGGLE_ZONES toggle display of activity zones + TOGGLE_OCCLUSION toggle the occlusion culling + TOGGLE_CREATURE_MOODS toggle display of creature mood icons + TOGGLE_CREATURE_PROFS cycle through display of profession indicators (disabled/icons/colored names) + TOGGLE_CREATURE_JOBS cycle through display of job indicators (disabled/icons/text descriptions) + TOGGLE_CREATURE_NAMES toggle the display of creature names + CHOP_WALLS cycle through wall sprite chopping options + CYCLE_TRACKING_MODE cycle through modes for following DF + RESET_VIEW_OFFSET reset the view offset + TOGGLE_SINGLE_LAYER toggle single layer mode + TOGGLE_SHADE_HIDDEN_TILES toggle shading hidden tiles + TOGGLE_SHOW_HIDDEN_TILES toggle showing hidden tiles + TOGGLE_OSD toggle the onscreen display (currently this is just minimal text info) + TOGGLE_KEYBINDS toggle display of keybind information + INCR_ZOOM increase the zoom + DECR_ZOOM decrease the zoom + SCREENSHOT take a screenshot (alt: volumetric screenshot / ctrl: megashot / shift+ctrl: full-depth megashot) + INCR_RELOAD_TIME increase the reload timer + DECR_RELOAD_TIME decrease the reload timer + CREDITS show credits + + DECR_SEGMENT_X decrease/increase the corresponding displayed segment size coordinate INCR_SEGMENT_X DECR_SEGMENT_Y INCR_SEGMENT_Y DECR_SEGMENT_Z INCR_SEGMENT_Z - DECR_X | decrease/increase the corresponding segment position coordinate (alt: continue following DF / ctrl: DECR_SEGMENT_*) + DECR_X decrease/increase the corresponding segment position coordinate (alt: continue following DF / ctrl: DECR_SEGMENT_*) INCR_X DECR_Y INCR_Y @@ -115,120 +106,120 @@ VALID KEYS: Key Names: Explanation: - INVALID | nokey (default) - - KEY_A | a - KEY_B | b - KEY_C | c - KEY_D | d - KEY_E | e - KEY_F | f - KEY_G | g - KEY_H | h - KEY_I | i - KEY_J | j - KEY_K | k - KEY_L | l - KEY_M | m - KEY_N | n - KEY_O | o - KEY_P | p - KEY_Q | q - KEY_R | r - KEY_S | s - KEY_T | t - KEY_U | u - KEY_V | v - KEY_W | w - KEY_X | x - KEY_Y | y - KEY_Z | z - - KEY_0 | 0 - KEY_1 | 1 - KEY_2 | 2 - KEY_3 | 3 - KEY_4 | 4 - KEY_5 | 5 - KEY_6 | 6 - KEY_7 | 7 - KEY_8 | 8 - KEY_9 | 9 - - KEYPAD_0 | 0 (keypad) - KEYPAD_1 | 1 (keypad) - KEYPAD_2 | 2 (keypad) - KEYPAD_3 | 3 (keypad) - KEYPAD_4 | 4 (keypad) - KEYPAD_5 | 5 (keypad) - KEYPAD_6 | 6 (keypad) - KEYPAD_7 | 7 (keypad) - KEYPAD_8 | 8 (keypad) - KEYPAD_9 | 9 (keypad) - - KEYF_1 | F1 - KEYF_2 | F2 - KEYF_3 | F3 - KEYF_4 | F4 - KEYF_5 | F5 - KEYF_6 | F6 - KEYF_7 | F7 - KEYF_8 | F8 - KEYF_9 | F9 - KEYF_10 | F10 - KEYF_11 | F11 - KEYF_12 | F12 - - KEYS_ESCAPE | escape key (overridden by hardcoded commands) - KEYS_TILDE | ~ - KEYS_MINUS | - - KEYS_EQUALS | = - KEYS_BACKSPACE | (backspace) - KEYS_TAB | (tab) - KEYS_OPENBRACE | [ - KEYS_CLOSEBRACE | ] - KEYS_ENTER | (enter) - KEYS_SEMICOLON | ; - KEYS_QUOTE | '' - KEYS_BACKSLASH | \ - KEYS_BACKSLASH2 | (only on german keyboards or something) - KEYS_COMMA | , - KEYS_FULLSTOP | . - KEYS_SLASH | / - KEYS_SPACE | (spacebar) - - KEYS_INSERT | (insert) - KEYS_DELETE | (delete) - KEYS_HOME | (home) - KEYS_END | (end) - KEYS_PGUP | (page up) - KEYS_PGDN | (page down) - KEYS_LEFT | (left arrow) - KEYS_RIGHT | (right arrow) - KEYS_UP | (up arrow) - KEYS_DOWN | (down arrow) - - KEYPAD_SLASH | / (keypad) - KEYPAD_ASTERISK | * (keypad) - KEYPAD_MINUS | - (keypad) - KEYPAD_PLUS | + (keypad) - KEYPAD_DELETE | (keypad delete) - KEYPAD_ENTER | (keypad enter) - - KEYS_PRINTSCREEN | (print screen) - KEYS_PAUSE | (pause) - - KEYS_ABNT_C1 | (???) - KEYS_YEN | (???) - KEYS_KANA | (???) - KEYS_CONVERT | (???) - KEYS_NOCONVERT | (???) - KEYS_AT | (???) - KEYS_CIRCUMFLEX | (???) - KEYS_COLON2 | (???) - KEYS_KANJI | (???) - - KEYPAD_EQUALS | (MacOS X only) - KEYS_BACKQUOTE | (MacOS X only) - KEYS_SEMICOLON2 | (MacOS X only) - KEYS_COMMAND | (MacOS X only) + INVALID nokey (default) + + KEY_A a + KEY_B b + KEY_C c + KEY_D d + KEY_E e + KEY_F f + KEY_G g + KEY_H h + KEY_I i + KEY_J j + KEY_K k + KEY_L l + KEY_M m + KEY_N n + KEY_O o + KEY_P p + KEY_Q q + KEY_R r + KEY_S s + KEY_T t + KEY_U u + KEY_V v + KEY_W w + KEY_X x + KEY_Y y + KEY_Z z + + KEY_0 0 + KEY_1 1 + KEY_2 2 + KEY_3 3 + KEY_4 4 + KEY_5 5 + KEY_6 6 + KEY_7 7 + KEY_8 8 + KEY_9 9 + + KEYPAD_0 0 (keypad) + KEYPAD_1 1 (keypad) + KEYPAD_2 2 (keypad) + KEYPAD_3 3 (keypad) + KEYPAD_4 4 (keypad) + KEYPAD_5 5 (keypad) + KEYPAD_6 6 (keypad) + KEYPAD_7 7 (keypad) + KEYPAD_8 8 (keypad) + KEYPAD_9 8 (keypad) + + KEYF_1 F1 + KEYF_2 F2 + KEYF_3 F3 + KEYF_4 F4 + KEYF_5 F5 + KEYF_6 F6 + KEYF_7 F7 + KEYF_8 F8 + KEYF_9 F9 + KEYF_10 F10 + KEYF_11 F11 + KEYF_12 F12 + + KEYS_ESCAPE escape key (overridden by hardcoded commands) + KEYS_TILDE ~ + KEYS_MINUS - + KEYS_EQUALS = + KEYS_BACKSPACE (backspace) + KEYS_TAB (tab) + KEYS_OPENBRACE [ + KEYS_CLOSEBRACE ] + KEYS_ENTER (enter) + KEYS_SEMICOLON ; + KEYS_QUOTE '' + KEYS_BACKSLASH \ + KEYS_BACKSLASH2 (only on german keyboards or something) + KEYS_COMMA , + KEYS_FULLSTOP . + KEYS_SLASH / + KEYS_SPACE (spacebar) + + KEYS_INSERT (insert) + KEYS_DELETE (delete) + KEYS_HOME (home) + KEYS_END (end) + KEYS_PGUP (page up) + KEYS_PGDN (page down) + KEYS_LEFT (left arrow) + KEYS_RIGHT (right arrow) + KEYS_UP (up arrow) + KEYS_DOWN (down arrow) + + KEYPAD_SLASH / (keypad) + KEYPAD_ASTERISK * (keypad) + KEYPAD_MINUS - (keypad) + KEYPAD_PLUS + (keypad) + KEYPAD_DELETE (keypad delete) + KEYPAD_ENTER (keypad enter) + + KEYS_PRINTSCREEN (print screen) + KEYS_PAUSE (pause) + + KEYS_ABNT_C1 (???) + KEYS_YEN (???) + KEYS_KANA (???) + KEYS_CONVERT (???) + KEYS_NOCONVERT (???) + KEYS_AT (???) + KEYS_CIRCUMFLEX (???) + KEYS_COLON2 (???) + KEYS_KANJI (???) + + KEYPAD_EQUALS (MacOS X only) + KEYS_BACKQUOTE (MacOS X only) + KEYS_SEMICOLON2 (MacOS X only) + KEYS_COMMAND (MacOS X only) From 8293c9ad53a52687b74e30d8894ccf8890006e59 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:41:46 -0600 Subject: [PATCH 05/12] Update changelog.txt --- docs/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.txt b/docs/changelog.txt index 4774c019..876c5f14 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -44,4 +44,5 @@ Template for new versions: ## Misc Improvements - `stonesense`: changed announcements to be right-aligned and limited to only show the most recent 10 announcements - `stonesense`: ``init.txt`` config file is now read from ``dfhack-configs/stonesense/init.txt`` +- `stonesense`: ``keybinds.txt`` config file is now read from ``dfhack-configs/stonesense/keybinds.txt`` - `stonesense`: creature names are now hidden by default (they can still be shown by pressing ``n`` (default keybinding) while stonesense window is active) From a47e6429dad5f4f44b773406151d6f86fc652e3b Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:50:34 -0600 Subject: [PATCH 06/12] revert location check --- Keybinds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Keybinds.cpp b/Keybinds.cpp index 822eea36..338e2910 100644 --- a/Keybinds.cpp +++ b/Keybinds.cpp @@ -273,7 +273,7 @@ void parseKeymapLine( string line ) bool loadKeymapFile(){ string line; - ALLEGRO_PATH * p =al_create_path("dfhack-config/stonesense/keybinds.txt"); + ALLEGRO_PATH * p =al_create_path("stonesense/keybinds.txt"); const char * path = al_path_cstr(p,ALLEGRO_NATIVE_PATH_SEP); ifstream myfile (path); if (myfile.is_open() == false) { From f7033686c5614fb88a9b66e6dbc45d85a0109d1b Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:51:33 -0600 Subject: [PATCH 07/12] bring back location check --- Keybinds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Keybinds.cpp b/Keybinds.cpp index 65d0ced1..3d9c1c31 100644 --- a/Keybinds.cpp +++ b/Keybinds.cpp @@ -273,7 +273,7 @@ void parseKeymapLine( string line ) bool loadKeymapFile(){ string line; - std::filesystem::path path = std::filesystem::path{} / "stonesense" / "keybinds.txt"; + std::filesystem::path path = std::filesystem::path{} / "dfhack-config" / "stonesense" / "keybinds.txt"; ifstream myfile (path); if (myfile.is_open() == false) { LogError( "cannot find keybinds file\n" ); From 5d06293aec4ac3c68ad3b4d73b1ff118525ef0d1 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Sun, 19 Jan 2025 09:12:18 -0600 Subject: [PATCH 08/12] Undo file move to compare changes --- {configs => resources}/keybinds.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {configs => resources}/keybinds.txt (100%) diff --git a/configs/keybinds.txt b/resources/keybinds.txt similarity index 100% rename from configs/keybinds.txt rename to resources/keybinds.txt From fd6726184c186063d9ca9b0fbc3a077f3a647221 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Sun, 19 Jan 2025 09:13:11 -0600 Subject: [PATCH 09/12] Move it back --- {resources => configs}/keybinds.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {resources => configs}/keybinds.txt (100%) diff --git a/resources/keybinds.txt b/configs/keybinds.txt similarity index 100% rename from resources/keybinds.txt rename to configs/keybinds.txt From fcb579b11ff740baa8871f77fbb11c5451722f96 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Sun, 19 Jan 2025 09:20:56 -0600 Subject: [PATCH 10/12] Update changelog.txt --- docs/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 0d64ad66..a49420f8 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -42,6 +42,7 @@ Template for new versions: ## Fixes ## Misc Improvements +- `stonesense`: ``keybinds.txt`` config file is now read from ``dfhack-configs/stonesense/keybinds.txt`` ## Removed @@ -62,7 +63,6 @@ Template for new versions: ## Misc Improvements - `stonesense`: changed announcements to be right-aligned and limited to only show the most recent 10 announcements - `stonesense`: ``init.txt`` config file is now read from ``dfhack-configs/stonesense/init.txt`` -- `stonesense`: ``keybinds.txt`` config file is now read from ``dfhack-configs/stonesense/keybinds.txt`` - `stonesense`: creature names are now hidden by default (they can still be shown by pressing ``n`` (default keybinding) while stonesense window is active) - `stonesense`: use smaller increments for zooming in and out - `stonesense`: OSD is now hidden by default; hit F2 (default keybinding) to show it again From 7473a36d7a37ce1697a4ce16bc22903911ed1f87 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Sun, 19 Jan 2025 15:42:13 -0600 Subject: [PATCH 11/12] Update docs/changelog.txt Co-authored-by: Myk --- docs/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index a49420f8..bb04c2ff 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -42,7 +42,7 @@ Template for new versions: ## Fixes ## Misc Improvements -- `stonesense`: ``keybinds.txt`` config file is now read from ``dfhack-configs/stonesense/keybinds.txt`` +- `stonesense`: ``keybinds.txt`` config file is now read from ``dfhack-config/stonesense/keybinds.txt`` ## Removed From 4a657d1e103edb6d0ae15d880bdb96cb6403a2b1 Mon Sep 17 00:00:00 2001 From: Squid Coder <92821989+realSquidCoder@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:43:48 -0600 Subject: [PATCH 12/12] fix missing namespaces --- Keybinds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Keybinds.cpp b/Keybinds.cpp index b2beb0a0..6b1862b7 100644 --- a/Keybinds.cpp +++ b/Keybinds.cpp @@ -257,9 +257,9 @@ void parseKeymapLine( std::string line ) } bool loadKeymapFile(){ - string line; + std::string line; std::filesystem::path path = std::filesystem::path{} / "dfhack-config" / "stonesense" / "keybinds.txt"; - ifstream myfile (path); + std::ifstream myfile (path); if (myfile.is_open() == false) { LogError( "cannot find keybinds file\n" );