diff options
-rw-r--r-- | int16kbd.h | 4 | ||||
-rw-r--r-- | mousetsr.c | 4 | ||||
-rw-r--r-- | mousetsr.h | 2 | ||||
-rw-r--r-- | mousmain.c | 8 |
4 files changed, 9 insertions, 9 deletions
@@ -1,11 +1,11 @@ #ifndef INT16KBD_H #define INT16KBD_H -static bool int16_store_keystroke(uint16_t scancode); +static bool int16_store_keystroke(uint8_t scancode, uint8_t character); #pragma aux int16_store_keystroke = \ "mov ah, 0x05" \ "int 0x16" \ - __parm [cx] \ + __parm [ch] [cl] \ __value [al] \ __modify [ax] @@ -665,11 +665,11 @@ static void handle_mouse_event(uint16_t buttons, bool absolute, int x, int y, ch // Emulate keystrokes on (vertical) wheel movement if (z < 0 && data.wheel_up_key) { for (; z < 0; z++) { - int16_store_keystroke(data.wheel_up_key); + int16_store_keystroke(data.wheel_up_key, 0); } } else if (z > 0 && data.wheel_down_key) { for (; z > 0; z--) { - int16_store_keystroke(data.wheel_down_key); + int16_store_keystroke(data.wheel_down_key, 0); } } } else { @@ -102,7 +102,7 @@ typedef struct tsrdata { /** Whether to enable & use wheel mouse. */ bool usewheel; /** Key (scancode) to generate on wheel scroll up/down, or 0 for none. */ - uint16_t wheel_up_key, wheel_down_key; + uint8_t wheel_up_key, wheel_down_key; #endif // Video settings @@ -79,12 +79,12 @@ static int set_wheel_key(LPTSRDATA data, const char *keyname) } if (keyname) { if (stricmp(keyname, "updn") == 0) { - data->wheel_up_key = 0x4800; - data->wheel_down_key = 0x5000; + data->wheel_up_key = 0x48; + data->wheel_down_key = 0x50; printf(_(1, 4, "Generate Up Arrow / Down Arrow key presses on wheel movement\n")); } else if (stricmp(keyname, "pageupdn") == 0) { - data->wheel_up_key = 0x4900; - data->wheel_down_key = 0x5100; + data->wheel_up_key = 0x49; + data->wheel_down_key = 0x51; printf(_(1, 5, "Generate PageUp / PageDown key presses on wheel movement\n")); } else { fprintf(stderr, _(3, 2, "Unknown key '%s'\n"), keyname); |