11-25-2018, 09:53 PM
To get paste working in the face of apparently no possibility of middle click emulation, I used xbindkeys and xte from xautomation.
However, at least on NetBSD, I noticed xte's injected events wouldn't work if another event was in progress, such as any of the keys used to trigger xte to run (anything else worked, like spawning an xterm, just xte's fake events were ignored). I ended up creating a python script that would fork, parent exit, and the child would sleep for 0.1s and then run xte. That would give enough time for everything to clear, and the paste to be at least kinda timely.
So, xbindkeys runs the python script when I enter my configured key combo, and the python script runs xte to inject the events. Kinda rube goldberg, but it seems to be working.
However, at least on NetBSD, I noticed xte's injected events wouldn't work if another event was in progress, such as any of the keys used to trigger xte to run (anything else worked, like spawning an xterm, just xte's fake events were ignored). I ended up creating a python script that would fork, parent exit, and the child would sleep for 0.1s and then run xte. That would give enough time for everything to clear, and the paste to be at least kinda timely.
So, xbindkeys runs the python script when I enter my configured key combo, and the python script runs xte to inject the events. Kinda rube goldberg, but it seems to be working.