Skip to content

Commit 081e228

Browse files
authored
Enable X mouse buttons 6 and 7 for horizontal scrolling. (#367)
1 parent c4873d0 commit 081e228

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/xwinman.c

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,8 @@ void getXsignaldata(DspInterface dsp)
213213
case Button3: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_RIGHT, FALSE); break;
214214
case Button4: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFT, FALSE); break;
215215
case Button5: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFTMIDDLE, FALSE); break;
216-
#if 0
217-
/* Button6 and Button7 are not defined, but these values are generated by
218-
macOS for the left and right scrolling movements.
219-
Leave them out for now, until we've sorted out the up and down scrolling.
220-
*/
221-
case Button5 + 1: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHTMIDDLE, FALSE); break;
222-
case Button5 + 2: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHT, FALSE); break;
223-
#endif
216+
case Button5 + 1: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHT, FALSE); break;
217+
case Button5 + 2: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHTMIDDLE, FALSE); break;
224218
default: break;
225219
}
226220
DoRing();
@@ -233,11 +227,8 @@ void getXsignaldata(DspInterface dsp)
233227
case Button3: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_RIGHT, TRUE); break;
234228
case Button4: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFT, TRUE); break;
235229
case Button5: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFTMIDDLE, TRUE); break;
236-
#if 0
237-
/* See above for key press */
238-
case Button5 + 1: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHTMIDDLE, TRUE); break;
239-
case Button5 + 2: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHT, TRUE); break;
240-
#endif
230+
case Button5 + 1: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHT, TRUE); break;
231+
case Button5 + 2: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHTMIDDLE, TRUE); break;
241232
default: break;
242233
}
243234
DoRing();

0 commit comments

Comments
 (0)