From Newsgroup: comp.windows.x
In article <
ydecmbqf3m.fsf@UBEblock.psr.com>,
Winston <
wbe@UBEBLOCK.psr.com.invalid> wrote:
...
Just tried something: Running "xev -root | fgrep Property" in an xterm,
then mouse selecting a word in any xterm window, reports a
PropertyNewValue event for CUT_BUFFER0.
However, no event was reported when the selection was lost, nor did
deletion in Emacs (which sets something typically used by "paste")
report an event, so this solution looks incomplete (it probably needs
to test XA_PRIMARY).
Just FYI:
I was never able to get "xev" to tell me anything about the clipboard per se, so that turned out to be a dead end.
However, I was able to achieve a pretty good solution to my overall problem
by running: xev -id $id -event keyboard
where $id is the window ID of my browser window.
This works because I use the keyboard (right mouse, then c) to grab the
URL of the current page in the browser. One doesn't use the keyboard for
much else in the browser, so this works pretty well. After "xev" tells me
that a key was hit in the browser, then I (i.e., the script) can fetch the clipboard with "xsel" and check to see if there is anything useful there.
--
There are many self-professed Christians who seem to think that because
they believe in Jesus' sacrifice they can reject Jesus' teachings about
how we should treat others. In this country, they show that they reject
Jesus' teachings by voting for Republicans.
--- Synchronet 3.21d-Linux NewsLink 1.2