How does this capture all of the keyboard events?
This serves as a signal that the user wants to process the highlighted text, prompting the floating window to open.
Once the floating window appears, the already-typed text in the focused application is captured and processed.