using UnityEngine; namespace Mountools.Tools { public class MountoolsShortcut { public static bool ctrl => Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand) || Input.GetKey(KeyCode.RightControl) || Input.GetKey(KeyCode.RightCommand); public static bool shift => Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); public static bool alt => Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt); public static bool Ctrl(KeyCode keyCode, bool checkHold = false) { return ctrl && !shift && !alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } public static bool CtrlShift(KeyCode keyCode, bool checkHold = false) { return ctrl && shift && !alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } public static bool CtrlAlt(KeyCode keyCode, bool checkHold = false) { return ctrl && !shift && alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } public static bool CtrlShiftAlt(KeyCode keyCode, bool checkHold = false) { return ctrl && shift && alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } public static bool Shift(KeyCode keyCode, bool checkHold = false) { return !ctrl && shift && !alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } public static bool ShiftAlt(KeyCode keyCode, bool checkHold = false) { return !ctrl && shift && alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } public static bool Alt(KeyCode keyCode, bool checkHold = false) { return !ctrl && !shift && alt && (checkHold ? Input.GetKey(keyCode) : Input.GetKeyDown(keyCode)); } } }