b4n commented on this pull request.
mods |= GEANY_PRIMARY_MOD_MASK;
+ mods &= ~GDK_MOD2_MASK;
Unless I'm mistaken, in the expression above `^` has priority over `|` so it's the same as `(mods ^ GDK_MOD2_MASK) | GEANY_PRIMARY_MOD_MASK`. But the simple fact you said what you did makes your version better, as it's then less confusing.