Closed Bmkool closed 2 years ago
How should we fix for this?
and what does the "3 button PS/2 Intellimouse" look like? It has scroll wheel, right?
Yes that's a three button with the scroll wheel. I think I fixed it by adding a check before the Intellimouse explorer that it is indeed an Intellimouse:
MOUSE_INTELLI:
// Intellimouse protocol: 3
xprintf("\nINT: ");
ibmpc.host_send(0xF3); ibmpc.host_send(0xC8);
ibmpc.host_send(0xF3); ibmpc.host_send(0x64);
ibmpc.host_send(0xF3); ibmpc.host_send(0x50);
mouse_id = ((read_keyboard_id() >> 8) == MOUSE_INTELLI ? MOUSE_INTELLI : MOUSE_DEFAULT);
if (MOUSE_INTELLI == mouse_id) {
// Intellimouse Explorer protocol: 4
xprintf("\nEXP: ");
ibmpc.host_send(0xF3); ibmpc.host_send(0xC8);
ibmpc.host_send(0xF3); ibmpc.host_send(0xC8);
ibmpc.host_send(0xF3); ibmpc.host_send(0x50);
mouse_id = ((read_keyboard_id() >> 8) == MOUSE_EXPLORER ? MOUSE_EXPLORER : MOUSE_INTELLI);
}
// Not Intellimouse
if (mouse_id == 0) {
xprintf("\nDEF: ");
ibmpc.host_send(0xF6); // Set Default
}
Although I don't have an Intellimouse explorer to test this with, according to this that appears to be the expected behavior.
I see. It makes sense now.
Does this change work for you? I tested with my Logitech MX510, which supports Explorer protocol.
--- a/converter/ibmpc_usb/ibmpc_usb.cpp
+++ b/converter/ibmpc_usb/ibmpc_usb.cpp
@@ -458,7 +458,7 @@ MOUSE_INTELLI:
ibmpc.host_send(0xF3); ibmpc.host_send(0xC8);
ibmpc.host_send(0xF3); ibmpc.host_send(0xC8);
ibmpc.host_send(0xF3); ibmpc.host_send(0x50);
- mouse_id = ((read_keyboard_id() >> 8) == MOUSE_EXPLORER ? MOUSE_EXPLORER : MOUSE_DEFAULT);
+ mouse_id = ((read_keyboard_id() >> 8) == MOUSE_EXPLORER ? MOUSE_EXPLORER : mouse_id);
// Not Intellimouse
if (mouse_id == 0) {
Yep looks good to me.
Thanks.
The 3 button PS/2 Intellimouse is recognized as a standard PS/2 mouse by the library.
In
converter/ibmpc_usb/ibmpc_usb.cpp
.Looks like the mouse_id gets set back to default in the protocol 4 check even if the ID
03
is read again.