Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to click menu/middle button? (+workaround) #8

Closed
gingerbeardman opened this issue May 5, 2019 · 7 comments
Closed

No way to click menu/middle button? (+workaround) #8

gingerbeardman opened this issue May 5, 2019 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@gingerbeardman
Copy link

gingerbeardman commented May 5, 2019

My two-button Mac mouse operates as RISC OS Select (Left) and Adjust (Right) by default.

I can switch to two-button mouse mode (which swaps Menu and Adjust) in order to be able to use RISC OS Menu button (as my right click).

But I cannot seem to use all three buttons at once?

rpcemu-macos/src/iomd.c

Lines 831 to 867 in ad6b841

iomd_mouse_buttons_read(void)
{
uint32_t temp = 0;
int mouse_buttons = mouse_buttons_get();
/* Left */
if (mouse_buttons & 1) {
temp |= 0x40; // bit 6
}
/* Middle */
if (mouse_buttons & 4) {
if (config.mousetwobutton) {
temp |= 0x10; // bit 4
} else {
temp |= 0x20; // bit 5
}
}
/* Right */
if (mouse_buttons & 2) {
if (config.mousetwobutton) {
temp |= 0x20; // bit 5
} else {
temp |= 0x10; // bit 4
}
}
/* bit 0 contains the monitor id bit, 0 for VGA, 1 for TV type monitors.
As we will probably always need VGA, leave as 0 */
/* bit 8 is used to detect to presence of 16 bit sound, if written high
and read back low it's 16 bit, due to weak pullup resistor, always
return 0 to indicate bit */
/* Invert the button values */
return temp ^ 0x70; // bit 4 5 and 6
}

It would be great if Alt+Click, or some other modifier, could enable use of all three mouse buttons at once on macOS?

My workaround is to temporarily use a third-arty app, MagicPrefs or MiddleClick, to give me native Middle click on macOS (as three finger press on Magic Mouse) which is picked up by RPCEmu.

@gingerbeardman gingerbeardman changed the title No way to click middle button? No way to click menu/middle button? May 5, 2019
@gingerbeardman gingerbeardman changed the title No way to click menu/middle button? No way to click menu/middle button? (+workaround) May 6, 2019
@myelin myelin added bug Something isn't working enhancement New feature or request labels May 6, 2019
@Septercius
Copy link

This could be done quite easily - I bodged the code so it uses the "CMD" key as the middle menu button and it seems to work fine. I chose that so it won't interfere with any RISC OS applications that look for SHIFT/CTRL/ALT with mouse clicks. If this sounds good, I'll see if I can create a quick patch at some point, which will also remove the Menu/Adjust swap.

@gingerbeardman
Copy link
Author

Sounds good, thank you.

@Septercius
Copy link

I can think of two ways for this to work:

  1. CMD acts as the Menu mouse button, independent of the other buttons.
  2. CMD + left mouse button acts as the Menu mouse button.

I personally prefer the first, as it means you can still press SELECT and MENU together. However as I don't personally have any need for two button mode, I thought I'd ask for feedback before making any code changes.

@gingerbeardman
Copy link
Author

gingerbeardman commented May 7, 2019

  1. Seems more Mac-like, and I'd have discovered that method had the app been that way.
  2. Seems to cater for possible RISC OS use. But I'm not an experienced RISC OS user, so I'll go with your opinion.

My only reference is the Koi-Koi game (it's on the !Store) that I'm currently playing: it uses SELECT and ADJUST during play and MENU after each game (to start a new game). Not really an exhaustive use case.

@gingerbeardman
Copy link
Author

Could the three-finger tap workaround that requires external apps be integrated into the RPCEmu?

@Septercius
Copy link

I'd rather not implement hardware-specific functionality, to be honest.

@myelin
Copy link
Owner

myelin commented May 12, 2019

Confirmed that Cmd functions as a menu-click in https://github.com/myelin/rpcemu-macos/releases/tag/0.9.1-pp3 in two-button mouse mode. Thanks!

@myelin myelin closed this as completed May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants