shithub: ft²

Download patch

ref: 2fbade4b6d929694c8bcd5ddabc8449770e73bdd
parent: 0a8961b61a0abcd44395efb423484b18a8e7ad69
author: Olav Sørensen <[email protected]>
date: Mon Nov 7 16:10:18 EST 2022

Hack for -/+ key in volume column (some kb layouts)

Fixes issue #38

--- a/src/ft2_edit.c
+++ b/src/ft2_edit.c
@@ -118,7 +118,15 @@
 		}
 
 		if (i == KEY2VOL_ENTRIES)
-			i = -1; // invalid key for slot
+		{
+			// volume column key not found, let's try a hack for '-' and '+' keys first
+			if (scancode == SDL_SCANCODE_MINUS)
+				i = 5;
+			else if (scancode == SDL_SCANCODE_EQUALS)
+				i = 6;
+			else
+				i = -1; // invalid key for slot
+		}
 	}
 	else if (cursor.object == CURSOR_EFX0)
 	{