public static KState GetState(this KCode kCode) { // prevent two-finger-right-click on touch screens, it messes with other right-click behaviour if (kCode == KCode.Mouse1 && UnityEngine.Input.touches != null && UnityEngine.Input.touches.Length >= 2) { return(KState.KeyReleased); } return(AppInput.GetKeyDown(kCode) ? KState.KeyDown : AppInput.GetKeyUp(kCode) ? KState.KeyUp : AppInput.GetKey(kCode) ? KState.KeyHeld : KState.KeyReleased); }
public static bool IsDown(this KCode kCode) { return(AppInput.GetKeyDown(kCode)); }