#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    8
    Rep Power
    0

    alt key for Mac / Mono


    Hi, I have a little problem to get the alt key down events on my mac.
    I did this:

    Code:
    protected override bool IsInputKey(Keys keyData)
    {
    return true;
    }
    
    and
    
    protected override void OnKeyDown(KeyEventArgs e)
    {
    //dummy to catch alt event
    }
    but the alt key down event is replaced by the cmd-key down event, meaning the cmd-key fires the alt-key event. The alt-key itself never fires. Is there a way to do it? As well for the fn-key? I would need them all: fn, ctrl, alt and cmd.

    thanks
    robin
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    8
    Rep Power
    0
    Hi, I found a solution.
    You need to override WndProc. There you can catch the alt key, for example
    Code:
    if(m.Msg == 0x040025)
    {
    //dummy to catch alt + left event
    }
    hope it helps you too
    robin
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    8
    Rep Power
    0
    sorry, this was too fast. did not work.

IMN logo majestic logo threadwatch logo seochat tools logo