fluent2WatchInput function

void fluent2WatchInput()

Watches which hand moves last, a key or a pointer, for a menu that opens a frame after the key or click that opened it (a kit's split button): its control calls this as it builds. Idempotent; it watches again after the keyboard's handlers are cleared (as between tests).

Implementation

void fluent2WatchInput() {
  HardwareKeyboard.instance
    ..removeHandler(_key)
    ..addHandler(_key);
  if (_routed) return;
  _routed = true;
  GestureBinding.instance.pointerRouter.addGlobalRoute(_pointer);
}