public EconEventArgs RemoveKeys(params KeyCode[] codes) { foreach (var code in codes) { KeysPressed.Remove(code); } return(this); }
public void Action(string action) { var actionData = action.Split(' '); switch (actionData[0]) { case "key_down": { Enum.TryParse <ControlActions>(actionData[1], true, out var result); KeysPressed.Add(result); break; } case "key_up": { Enum.TryParse <ControlActions>(actionData[1], true, out var result); KeysPressed.Remove(result); break; } } }
public void KeyUp(object sender, KeyEventArgs e) { KeysPressed.Remove(e.Code); }