[Mono-osx] Control and Mac key

Borja Ruiz Arroyo bruiz at codicesoftware.com
Mon Mar 23 13:19:49 EDT 2009


Thanks Matt,

I can not change the keyboard setting, because I can't force all the 
users to change it.

As I have seen when I tried (using X11) the mac (apple) key haven't got 
the windows ctrl key behavior as it should.

I have custom controls which have functionality with ctrl key. In order 
to know if this key is pressed I use Control.ModifierKeys or 
KeyEventArgs.Control, but in Mac i have to check mac key instead of 
control key but it doesn't exist. How can i do that?

I can save the status of the mac key when pressed (key down)and update 
it when released (key up), and use this status like I was using 
ModifierKeys when the application is running in a Mac OS. But i was 
looking for an easy way to do that, how can i do?

Tanks

    Borja

Matt Emson escribió:
> boruar wrote:
> 
> Surely the Mac keyboard is an abstract concept that Mono doesn't need to 
> know about? WinForms might be hard coded, but if you were to use one of 
> the Cocoa bridges, this would be a complete non issue. I think GTK# 
> works too.
> 
>  From memory, I thought that the Control key (Apple key, or as you say 
> here "Mac" key) behaved properly last time I tried it in WinForms. As 
> far as I'm aware, a Mac keyboard maps the virtual key codes in OS X in 
> reverse if you plug in a non Mac Keyboard (so that the key captions are 
> correct.) That way the Option key ("Alt" or "Pretzel" on Mac, "Windows" 
> on PC) and Command ("Apple" on a Mac, "Alt" on PC) were the right way 
> round. I could be wrong though. I know that Parallels puts them the 
> Windows way round which totally screws with my head. If not, you can 
> force that to happen in the Keyboard section of the settings.
> 
> M
>> In Mac, the mac key is used as the control key in windows, and control 
>> key is
>> used to show the context menu (ctrl + left click). If we make an 
>> application
>> that run in both systems, how can we control this different behavior 
>> easily?
>> Are there any way to do that or do we have to control it manually?
>>
>> Thanks
>>
>>       Borja
>>   
> 
> 


More information about the Mono-osx mailing list