/// <summary> /// Add a new keypad activity to the execution queue. /// </summary> /// <param name="code">The key to be acted upon</param> /// <param name="action">The way the button should be dealt with (Press, Release, Both)</param> public void AddKeyActivity(KeyCode code, KeyAction action) { lock (keys) { keys.Enqueue(new KeyOp(code, action)); } }
public KeyOp(KeyCode code, KeyAction action) { this.code = code; this.action = action; }