UnixInputProcessor.cs 687 B

12345678910111213141516171819202122232425
  1. using System.Collections.Concurrent;
  2. namespace Terminal.Gui.Drivers;
  3. /// <summary>
  4. /// Input processor for <see cref="UnixInput"/>, deals in <see cref="char"/> stream.
  5. /// </summary>
  6. internal class UnixInputProcessor : InputProcessorImpl<char>
  7. {
  8. /// <inheritdoc />
  9. public UnixInputProcessor (ConcurrentQueue<char> inputBuffer) : base (inputBuffer, new UnixKeyConverter ())
  10. {
  11. DriverName = "unix";
  12. }
  13. /// <inheritdoc />
  14. protected override void Process (char input)
  15. {
  16. foreach (Tuple<char, char> released in Parser.ProcessInput (Tuple.Create (input, input)))
  17. {
  18. ProcessAfterParsing (released.Item2);
  19. }
  20. }
  21. }