Created
August 30, 2021 07:29
-
-
Save moveccr/b4bb50c35543cc8a64e55b5bc9a7cd15 to your computer and use it in GitHub Desktop.
NetBSD/luna68k ブートローダでマウスを動かすと誤入力が発生する問題のパッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/sys/arch/luna68k/stand/boot/kbd.c | |
+++ b/sys/arch/luna68k/stand/boot/kbd.c | |
@@ -213,12 +213,23 @@ static const struct kbd_keymap kbd_keymap[] = { | |
int shift_flag = 0; | |
int ctrl_flag = 0; | |
int meta_flag = 0; | |
+int mouse_flag = 0; | |
int | |
kbd_decode(uint8_t code) | |
{ | |
unsigned int c, updown = 0; | |
+ /* ignore mouse data */ | |
+ if (mouse_flag != 0) { | |
+ mouse_flag--; | |
+ return KC_IGNORE; | |
+ } | |
+ if ((code & 0xf8) == 0x80) { | |
+ mouse_flag = 2; | |
+ return KC_IGNORE; | |
+ } | |
+ | |
if (code & 0x80) | |
updown = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment