minecraft-access
minecraft-access copied to clipboard
Mouse simulation issue on macOS
I helped my blind friend to modify this mod so that he can read and operate with the history messages using LALT+UP/DOWN/RIHGT/ENTER
. While I'm working with the code, I find a problem that the mouse simulation doesn't work on macOS, and that's because it only detects Windows and Linux, but macOS won't be recognized as any of them, so mouse simulation simply doesn't work without any error messages. That may confuse those blind users who uses macOS.
History messages?? Are you talking about the chat messages then I've already patched that, you can use alt + number key to speak the last 9 messages. I actually don't own a mac so I can't really work on that bit. Sorry.
@onion108 Any update??
that's because it only detects Windows and Linux, but macOS won't be recognized as any of them, so mouse simulation simply doesn't work without any error messages
Can you specify it cleanly which part of code you've found that has problem? Currently only InventoryControls
has mouse key simulation and perhaps you're referring this part of code?
https://github.com/khanshoaib3/minecraft-access/blob/ee82d1ca0f9b36067e07bcf5d49c0ba9b15c6927/common/src/main/java/com/github/khanshoaib3/minecraft_access/utils/KeyBindingsHandler.java#L328-L342
I'm referring to this:
https://github.com/khanshoaib3/minecraft-access/blob/ee82d1ca0f9b36067e07bcf5d49c0ba9b15c6927/common/src/main/java/com/github/khanshoaib3/minecraft_access/utils/MouseUtils.java#L42-L60
and this part as well:
https://github.com/khanshoaib3/minecraft-access/blob/ee82d1ca0f9b36067e07bcf5d49c0ba9b15c6927/common/src/main/java/com/github/khanshoaib3/minecraft_access/utils/MouseUtils.java#L84-L191
They only handle the operation for Linux and Windows, but on macOS neither OsUtils.isLinux()
nor OsUtils.isWindows()
returns true, resulting in doing nothing.
Another caution is that xdotools
isn't available for macOS because Minecraft doesn't run under X11 on macOS, so it may be necessary to find another way to simulate mouse operations on macOS.
Yeah, we will have to look into this. Thanks for bringing this up.
There might be more things to do for compatibility with macOS. For example, I found out that the Narrator does not have a macOS version...... the Narrator calls native API so I guess currently the "interrupting narration" feature won't work on macOS.
@onion108 Would you please help us on this? I'm using Windows while Shoabi uses Linux... We don't have a device for testing... BTW, join the Discord server if you like, maybe we can find more macOS users in there...
We can implement the libspeak for macos narrator. We probably should.
https://github.com/khanshoaib3/minecraft-access/issues/39#issuecomment-1602251066
Still searching for a built-in method to move the cursor (so we can get rid of OS-specific implementation).
There might be more things to do for compatibility with macOS. For example, I found out that the Narrator does not have a macOS version...... the Narrator calls native API so I guess currently the "interrupting narration" feature won't work on macOS.
@onion108 Would you please help us on this? I'm using Windows while Shoabi uses Linux... We don't have a device for testing... BTW, join the Discord server if you like, maybe we can find more macOS users in there...
I'd like to help~! I've joined the server just now (with the name 27Onion Nebell or Discord Username 27onion
)