Mouse down + ctrl event on unfocused canvas?

BlitzMax Forums/MaxGUI Module/Mouse down + ctrl event on unfocused canvas?

skn3(Posted 2010) [#1]
Hey I wonder if anyone can suggest a fix/way-around the problem I am having.

I currently have a form setup that consists of a canvas and some text inputs. The canvas is small but should be able to display a picture larger than itself. In order to scroll the canvas a user must hold CTRL and then drag the canvas. Much like you would do within a 3d editor viewport.

The problem is that currently if the canvas is not active (unfocused) and you hold ctrl while clicking on the canvas, the event recieved does not contain the modifiers. The event does not know CTRL is being held. It works fine if the canvas is the currently active gadget but otherwise not. As you can imagine without being able to pickup the canvas and scroll it in one click, the experience is going to seem very buggy!

I also do not want to automatically give focus to the canvas when the mouse cursor enters. There are other inputs/textareas/etc on the same layout, so if you were editing one of those and you simply nudged the mouse, it would lose focus on what you were doing. Not really ideal.

I am developing this on mac so I don't know if it is an issue related to the mac or is it related to the way max handles keys?

Any ideas ?


Brucey(Posted 2010) [#2]
Ctrl-Left click on Mac is equivalent to right-click (for context menus) : using a Mac with a single-button mouse, there is no right button to click.

Perhaps that is related to your issue.

Optionally use Command-Left click on Mac instead : Mac users are used to that anyway.


skn3(Posted 2010) [#3]
Thanks brucey, I will give that a try and see if the modifier is present.