private void Record(KeyboardInput input) { if ((input.Flags & KeyboardFlags.Up) > 0) { if (recorded.ContainsKey(input.Key)) { StopRecording(); } } else if (!recorded.ContainsKey(input.Key)) { recorded[input.Key] = recorded.Count; keyRecorded(input.Key); } }
public void Handle(KeyboardInput input) { if (recording) { Record(input); return; } if (PauseOutput) { return; } if ((input.Flags & KeyboardFlags.Up) > 0) { pressedKeys.Remove(input.Key); } else { pressedKeys.Add(input.Key); } UpdatePressed(); }