private bool CheckKey(EventInfo info) { bool option = false; switch (info.option) { case Option.None: option = true; break; case Option.Ctrl: option = KeyUtil.Control(); break; case Option.Shift: option = KeyUtil.Shift(); break; case Option.Alt: option = KeyUtil.Alt(); break; case Option.CtrlOrShift: option = KeyUtil.ControlOrShift(); break; } if (Input.GetKey(info.key) && option) { ++info.counter; } else { info.counter = 0; } return (info.counter == 1 || ( (info.counter >= holdInputStartDelay) && (info.counter % holdInputFrameInterval == 0))); }
public bool IsEnterPressing() { if (!inputField.multiLine) { return(KeyUtil.Enter()); } else { return((KeyUtil.Control() || KeyUtil.Shift()) && KeyUtil.Enter()); } }