Example #1
0
        public void SetShortcut(ModifierKey modifier, Key key)
        {
            NSEventModifierFlags nsModifier = KeyMapper.GetModifier(modifier);
            string mappedKey = KeyMapper.GetKey(key);

            ObjC.Call(Handle, "setKeyEquivalentModifierMask:", new UIntPtr((ulong)nsModifier));
            ObjC.Call(Handle, "setKeyEquivalent:", NSString.Create(mappedKey));
        }
Example #2
0
 public void SetShortcut(ModifierKey modifier, Key key)
 {
     SetShortcut(KeyMapper.GetModifier(modifier), KeyMapper.GetKey(key));
 }