Example #1
0
        public override void KeyDown(NSEvent theEvent)
        {
            if (!appInput.InputMap.ContainsKey(theEvent.KeyCode))
            {
                return;
            }

            var action = appInput.InputMap[theEvent.KeyCode];

            phiddle.InvokeAction(action);

            if (action == ActionId.ApplicationExit)
            {
                Window.Close();
            }
            else
            {
                NeedsDisplay = true;
            }
        }
Example #2
0
        private void HandleKeyDown(object sender, KeyEventArgs e)
        {
            if (!appInput.InputMap.ContainsKey((ushort)e.KeyCode))
            {
                return;
            }

            var action = appInput.InputMap[(ushort)e.KeyCode];

            phiddle.InvokeAction(action);

            if (action == ActionId.ApplicationExit)
            {
                Close();
            }
            else
            {
                // NeedsDisplay = true;
            }
        }