public KeyboardSimulated AddKeyboard() { var keyboard = new KeyboardSimulated(this); keyboards.Add(keyboard); RegisterDevice(keyboard); return(keyboard); }
public void RemoveKeyboard(KeyboardSimulated keyboard) { if (!keyboards.Contains(keyboard)) { throw new InvalidOperationException("Simulated Keyboard does not exist"); } UnregisterDevice(keyboard); keyboards.Remove(keyboard); }