void VariablesForm_KeyUp(object sender, KeyEventArgs keyEventArgs) { if (keyEventArgs.Control && keyEventArgs.KeyCode == Keys.S) { if (_isReadOnly) { UserInfoHandler.ShowInfo("File is in read-only mode."); } else { SaveChanges(); } } if (keyEventArgs.Control && keyEventArgs.KeyCode == Keys.Z) { PerformAction(new VariablesUndoAction(_undoManager)); } if (keyEventArgs.Control && keyEventArgs.KeyCode == Keys.Y) { PerformAction(new VariablesRedoAction(_undoManager)); } if (treeAcronyms.Focused == true) { _acronymManager.HandleEnterKey(keyEventArgs); } }