public ProgramAction GetAction(KeyEventArgs args) { KeyboardCombo combo = new KeyboardCombo(); combo.Key = args.KeyCode; combo.Alt = args.Alt; combo.Control = args.Control; combo.Shift = args.Shift; if (shortCutActionDict.ContainsKey(combo)) return shortCutActionDict[combo]; else throw new KeyboardShortcutNotRecognizedException("Keyboard combo not recognized"); }