Actions
Bug #1630
opengtk clients have a problem with GDK_KEY_plus key and sound volume
Status:
New
Priority:
Normal
Assignee:
-
Category:
gtk4-client
Target version:
-
Start date:
07/28/2025
Due date:
% Done:
0%
Estimated time:
Description
Affects gtk3.22, gtk4 and gtk5 clients, Qt client does not have any keys affecting sound volume.
In this code -
if (state & GDK_SHIFT_MASK) {
bool volchange = FALSE;
switch (keyval) {
case GDK_KEY_plus:
case GDK_KEY_KP_Add:
gui_options.sound_effects_volume += 10;
volchange = TRUE;
break;
case GDK_KEY_minus:
case GDK_KEY_KP_Subtract:
gui_options.sound_effects_volume -= 10;
volchange = TRUE;
break;
default:
break;
}
if (volchange) {
struct option *poption = optset_option_by_name(client_optset,
"sound_effects_volume");
gui_options.sound_effects_volume = CLIP(0,
gui_options.sound_effects_volume,
100);
option_changed(poption);
return TRUE;
}
} else if (!(state & GDK_CONTROL_MASK)) {
switch (keyval) {
case GDK_KEY_plus:
case GDK_KEY_KP_Add:
zoom_step_up();
return TRUE;
You can't ever get past the volchange part because the "+" key has the GDK_SHIFT_MASK on by definition - it's (GDK_KEY_equals with GDK_SHIFT_MASK). Since this also eats the key press, it won't get to the Menu entries for zoom that #943 wants to add.
We could drop having "+" and "-" affect sound volume, leaving only the keypad GDK_KEY_KP_Add and GDK_KEY_KP_Subtract to do that. (GDK_KEY_plus with Ctrl/Meta mask) is View menu item Show Stack Size.
Actions