private void RegisterHotkeys() { hotkeys = new Dictionary <Key, HotkeyDelegate> { { Key.F5, () => { viewModel.StartStop(); } }, { Key.Enter, () => { if (!InterpreterBox.IsFocused) { return; } viewModel.Evaluate(InterpreterBox.Text); InterpreterBox.Text = ""; } }, { Key.Up, () => { if (InterpreterBox.IsFocused) { InterpreterBox.Undo(); } } }, { Key.Down, () => { if (InterpreterBox.IsFocused) { InterpreterBox.Redo(); } } } }; }