aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--int16kbd.h4
-rw-r--r--mousetsr.c4
-rw-r--r--mousetsr.h2
-rw-r--r--mousmain.c8
4 files changed, 9 insertions, 9 deletions
diff --git a/int16kbd.h b/int16kbd.h
index 45db8ef..3b2c860 100644
--- a/int16kbd.h
+++ b/int16kbd.h
@@ -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]
diff --git a/mousetsr.c b/mousetsr.c
index f9451b3..c4a4c55 100644
--- a/mousetsr.c
+++ b/mousetsr.c
@@ -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 {
diff --git a/mousetsr.h b/mousetsr.h
index 5625ae1..05b2f24 100644
--- a/mousetsr.h
+++ b/mousetsr.h
@@ -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
diff --git a/mousmain.c b/mousmain.c
index e33b553..80ea1fb 100644
--- a/mousmain.c
+++ b/mousmain.c
@@ -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);