title: How to get background Keyboard input?
body: <p>In a Windows 10 app, you can get low latency Mouse/Pen/Touch input from a background thread with the following:</p>
  
  <pre><code>var workItemHandler = new WorkItemHandler((action) =&gt;
  {
                  SwapChainPanel mPanel = (SwapChainPanel)inputElement;
  
                  CoreIndependentInputSource coreIndependentInputSource;
                  coreIndependentInputSource = mPanel.CreateCoreIndependentInputSource(CoreInputDeviceTypes.Touch | CoreInputDeviceTypes.Pen | CoreInputDeviceTypes.Mouse);
                  coreIndependentInputSource.PointerPressed += CoreWindow_PointerPressed;
                  coreIndependentInputSource.PointerMoved += CoreWindow_PointerMoved;
                  coreIndependentInputSource.PointerReleased += CoreWindow_PointerReleased;
                  coreIndependentInputSource.Dispatcher.ProcessEvents(CoreProcessEventsOption.ProcessUntilQuit);
  
  });
  </code></pre>
  
  <p>But you must get keyboard input from the routed events provided by CoreWindow or UI elements. (You can also get mouse input from the windows as well, but it suffers the exact same issue)</p>
  
  <p>This results in keyboard input being blocked while the mouse is moving/clicking.</p>
  
  <p>How can I get Keyboard input without using the routed events that are delayed by the mouse input?</p>