Post by Spoofingsup.
I like to use "Shift + Insert" for paste text from clipboard everywhere,
and for example, when I run Firefox, want to press "Shift + Insert" for
open URL from clipboard, like the mouse middle (button 2) click.
Key Insert A S FakeClick depth 2 press 2 wait 250 release 2
doesn't work, and also try to change depth, but nothing happens...
how to simulate mouse middle click button with Shift + Insert? :)
First, not all applications like fake (or synthetic) events, and as per
the man page FakeClick and FakeKeyPress are for debugging fvwm and not
going to work in all situations. So your approach should be rethought.
Second it is not firefox that 'pastes' when you click the middle mouse
button. It is xorg that intercepts the middle mouse click and then sends
the resulting paste to the window. So sending the middle mouse button
click to the root window or the firefox window (or any other window)
will note generate the paste event. Firefox does not know to paste when
it receives a middle mouse click.
On the other hand firefox and many applications honor the ctrl-V paste
button. In my testing I got
FakeKeyPress depth 2 modifiers 8 press v
To work just fine and correctly paste something into chromium (provided
I copied with ctrl-C from an application first).
So that may work for you, but now you need to get a clipboard manager to
keep the clipboard and cutbuffer in sync. It looks like something like
'autocutsel' may do that for you. Though it could be possible that there
are more advanced clibboard managers and you could use one of those to
not only keep the two methods of copying/pasting in sync can probably
set up custom key bindings to send the clibboard to the desired window.
This is the direction I would look. It looks like clipit may have that
functionality.
Using FakeKeyPress to make shift-insert work like ctrl-V will only work
for applications which already honor ctrl-V so you are just changing the
default. It will have no effect (or even other effects) because each
application will honor the ctrl-V how ever it deems is correct. So even
though that works in some applications it may not do what you want.
So I think getting a clipboard manager that has the feature to set up a
keybinding would be the direction to go (note I have never messed with
them, so I am unsure what sort of things the clipboard managers can do).
jaimos