internal static void Accept(InputDevice device, UIElement element = null) { switch (device) { case InputDevice.Keyboard: KeyboardHelper.Space(element); break; case InputDevice.Gamepad: KeyboardHelper.GamepadA(element); break; default: throw new Exception("Invalid input device."); } }