I am building keyboard multiplexer. My current plan is to connect two devices through Bluetooth, and let my wired USB keyboard switch between these two devices.
My first instinct is to build Two-state machine, In state one, keyboard strokes will be processed by Device A and In state two, by Device B.
For building such state machine, i need way to stop processing on Device A and send data to Device B.
For sending Key-input Data to Device B, It can be done by registering as HID to bluetooth adapter over D-bus. But i am not sure how would one stop processing keyboard stroke on Device A , without de-authorizing keyboard usb and still be able reading key events.
To summarize it all, I want to know is it possible to pause processing of my keyboard events on my device (By other processes) without deauthorizing it and still be able to capture keyboard input?