public override bool DoCommandBySelector(NSTextView textView, ObjCRuntime.Selector commandSelector) { var k = KeyCode.None; if (commandSelector.Name == "moveUp:") { k = KeyCode.Up; } else if (commandSelector.Name == "moveDown:") { k = KeyCode.Down; } else if (commandSelector.Name == "insertNewline:") { k = KeyCode.Enter; } return(viewModel.OnFormulaKeyPressed(k)); }