myelin / rpcemu-macos

Phil Pearson's fork of https://marutan.net/rpcemu/ with macOS patches from Timothy Coltman
GNU General Public License v2.0
6 stars 0 forks source link

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

Closed gingerbeardman closed 5 years ago

gingerbeardman commented 5 years ago

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?

https://github.com/myelin/rpcemu-macos/blob/ad6b84139890e567bfc532c2cab9bfd08388a3dc/src/iomd.c#L831-L867

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.

Septercius commented 5 years ago

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 commented 5 years ago

Sounds good, thank you.

Septercius commented 5 years ago

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 commented 5 years ago
  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 commented 5 years ago

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

Septercius commented 5 years ago

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

myelin commented 5 years ago

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!