mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-15 07:54:13 +00:00
Hook up the X11 Button4 and Button5 events (from mouse scrollwheel or trackpad vertical scroll) to
the Dolphin/Dorado key set PAD1 (LEFTKEY) and PAD2 (LEFTMIDDLEKEY) keys.
This commit is contained in:
parent
14d4d3a5a2
commit
17fbbe96d7
@ -45,9 +45,16 @@ extern int KBDEventFlg;
|
||||
extern u_char *SUNLispKeyMap;
|
||||
#define KEYCODE_OFFSET 7 /* Sun Keycode offset */
|
||||
|
||||
/* bits within the EmRealUtilin word */
|
||||
#define KEYSET_LEFT 8
|
||||
#define KEYSET_LEFTMIDDLE 9
|
||||
#define KEYSET_MIDDLE 10
|
||||
#define KEYSET_RIGHTMIDDLE 11
|
||||
#define KEYSET_RIGHT 12
|
||||
/* Mouse buttons */
|
||||
#define MOUSE_LEFT 13
|
||||
#define MOUSE_MIDDLE 15
|
||||
#define MOUSE_RIGHT 14
|
||||
#define MOUSE_MIDDLE 15
|
||||
|
||||
/* bound: return b if it is between a and c otherwise it returns a or c */
|
||||
int bound(int a, int b, int c)
|
||||
@ -209,6 +216,16 @@ void getXsignaldata(DspInterface dsp)
|
||||
case Button1: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_LEFT, FALSE); break;
|
||||
case Button2: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_MIDDLE, FALSE); break;
|
||||
case Button3: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_RIGHT, FALSE); break;
|
||||
case Button4: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFT, FALSE); break;
|
||||
case Button5: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFTMIDDLE, FALSE); break;
|
||||
#if 0
|
||||
/* Button6 and Button7 are not defined, but these values are generated by
|
||||
macOS for the left and right scrolling movements.
|
||||
Leave them out for now, until we've sorted out the up and down scrolling.
|
||||
*/
|
||||
case Button5 + 1: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHTMIDDLE, FALSE); break;
|
||||
case Button5 + 2: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHT, FALSE); break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
DoRing();
|
||||
@ -219,6 +236,13 @@ void getXsignaldata(DspInterface dsp)
|
||||
case Button1: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_LEFT, TRUE); break;
|
||||
case Button2: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_MIDDLE, TRUE); break;
|
||||
case Button3: PUTBASEBIT68K(EmRealUtilin68K, MOUSE_RIGHT, TRUE); break;
|
||||
case Button4: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFT, TRUE); break;
|
||||
case Button5: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_LEFTMIDDLE, TRUE); break;
|
||||
#if 0
|
||||
/* See above for key press */
|
||||
case Button5 + 1: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHTMIDDLE, TRUE); break;
|
||||
case Button5 + 2: PUTBASEBIT68K(EmRealUtilin68K, KEYSET_RIGHT, TRUE); break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
DoRing();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user