History

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

Fixes issue #38

Olav Sørensen committed 4 years ago

Commit 2fbade41 parent 0a8961b1 file · +9 −1Browse files

Unified · Split

src/ft2_edit.c+9−1
@@ -118,7 +118,15 @@ static bool testEditKeys(SDL_Scancode scancode, SDL_Keycode keycode) · 117 unmodified lines
118118 }
119119
120120 if (i == KEY2VOL_ENTRIES)
121− i = -1; // invalid key for slot
121+ {
122+ // volume column key not found, let's try a hack for '-' and '+' keys first
123+ if (scancode == SDL_SCANCODE_MINUS)
124+ i = 5;
125+ else if (scancode == SDL_SCANCODE_EQUALS)
126+ i = 6;
127+ else
128+ i = -1; // invalid key for slot
129+ }
122130 }
123131 else if (cursor.object == CURSOR_EFX0)
124132 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t