CTRL-Key on the Mac

Just for your information, no big deal (yet) for me. And maybe its just SIlverlight. I implemented a CustomDragSelection Tool to have the panning active when my CTRL key is hold down.



<br /> public class CustomDragSelectingTool : DragSelectingTool { <br /> public override bool CanStart() { <br /> if (IsControlKeyDown()) return false; <br /> return base.CanStart(); <br /> } <br /> } <br />



It works fine on a Windows machine with Internet Explorer, but it does not work on a Mac with Google Chrome or Safari.

And it works fine on a Windows machine with both Chrome and Safari.

But are you talking about the Control key on a Macintosh keyboard? That’s normally used to get a right-mouse-click, which is necessary with a single-button mouse.

In GoXam, here is the ultimate IsControlKeyDown definition:

#if SILVERLIGHT // Keyboard differences return (Keyboard.Modifiers & ModifierKeys.Control) != 0; #else return (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)); #endif

Walter, thanks again. Your right, just didn’t realize that that would be the thing. On the Mac is CTRL-left Click a mouse right-click. Any idea how to get rid of that on the Mac (maybe its a bit off-topic). I have the right-click (secondary click) enabled btw.

Are you asking about how to detect at run-time what platform your app is running on?

I didn’t know, but a quick search found: Environment.OSVersion that has a Platform property of type: PlatformID

Not yet even the question, but maybe the answer. I was wondering if I needed to do something in my program or I can do some settings on my Mac to let this CTRL function working like the Win machines.



Maybe check to Platform and do some other test for the Mac users.



But for now also the CTRL-scroll does not work and that’s part of the GoXam Panel. So that’s why I was thinking of just do some settings on my Mac, or maybe do some changes in the IsControlKeyDown.