Mac: Ctrl+Left button not detected as Right button

BlitzMax Forums/BlitzMax Programming/Mac: Ctrl+Left button not detected as Right button

Grey Alien(Posted 2008) [#1]
***OOPS! Mods, please move this to the BMax Programming forum, sorry)***

Hi, I notice that on my MacBook Pro, which only has one mouse button, if I want to use the right mouse button I can either:

a) Hold two fingers on the trackpad and press the button. This is detected by Blitz as a Right Mouse click

b) Hold Ctrl and press the button (this brings up pop up menus in OSX, so I assume it's the equivalent of a Right mouse button press, but I could be wrong). BUT this is not detected as a Right mouse button pressed by Blitz, I have to detect Ctrl being held down and a left button click.

Should blitz detect Ctrl+LMB as a RMB click? This would break games which specifically detect Ctrl+LMB as a special kind of left button click. So perhaps it could be a flag in Blitz somewhere, or set Both left and right button down flags?

Thoughts?

P.S. I'm not using a right RMB click in my game as that's a cardinal sin for most casual games, but I AM using it for the level editor and I was making some levels on the Macbook today when I noticed this issue.


jhans0n(Posted 2008) [#2]
Yeah, I noticed that recently too. The workaround I used to trap ctrl+LMB is to look at the EventMods when looking at the mouse clicks. If there's an EventMod of 4 (or whatever the number for Control is, can't remember right now) on the click event, run the same code you run for your right-click event.

Oh, and personally I'd prefer they remain separate. That way, if you're making an interface where you want to use ctrl+click, shift+click, etc as separate functions, you can.


Grey Alien(Posted 2008) [#3]
Thanks for your input Jeff. Yeah I'm trapping ctrl+LMB at the game level, but wondering if I should put it in the framework...

Hey Jeff, is Armand a framework game? Also, what have you got planned next? :-)


jhans0n(Posted 2008) [#4]
Putting the option in the framework would be very cool, but please make sure it can be turned off.

Unfortunately, Armand is not a framework game. I had actually built the engine before I bought your excellent framework, and didn't port it over. I wish I had the framework before I started, as it would have been perfect for it.

I have a few plans in the works. I've actually received a lot of requests for a follow-up to the Armand game, so that's one of them. I'll be reusing the existing engine, with a few little tweaks, so there's no real programming involved. I recently wrote a nice map and script editor for the Armand engine that I'm considering including with the sequel so that people can make their own levels/quests if they'd like. There's one guy out there right now who I've given an early copy of the tools to, and he's working on some side quests for the current game.

Aside from that, I have two main programming projects in the works, both of which will be framework-based. The shorter term one is an experimental little platformer. That one will probably see the light of day late this year, or January at the latest. The longer term one is an RPG that I've had bouncing around in my head for years. That one will take a while. If I have that done by next summer, I'll be shocked.


Grey Alien(Posted 2008) [#5]
Putting the option in the framework would be very cool, but please make sure it can be turned off.
Yeah it would be a flag that I'd have on by default (on Macs only) as it would be more useful on than off is most cases.

Thanks for the info on your projects and good luck with them.