Пример #1
0
 private KeyModifiers GetModifiers(NSEventModifierMask mask)
 {
     OpenTK.Input.KeyModifiers modifiers = 0;
     if ((mask & NSEventModifierMask.ControlKeyMask) != 0)
     {
         modifiers |= OpenTK.Input.KeyModifiers.Control;
     }
     if ((mask & NSEventModifierMask.ShiftKeyMask) != 0)
     {
         modifiers |= OpenTK.Input.KeyModifiers.Shift;
     }
     if ((mask & NSEventModifierMask.AlternateKeyMask) != 0)
     {
         modifiers |= OpenTK.Input.KeyModifiers.Alt;
     }
     return(modifiers);
 }
Пример #2
0
 public static IGuiMenuItem SetHotKey(this IGuiMenuItem item, OpenTK.Input.KeyModifiers modifierKey, OpenTK.Input.Key hotKey)
 {
     item.ModifierKey = modifierKey;
     item.HotKey      = hotKey;
     return(item);
 }