You are not logged in.

#1 2014-10-30 17:03:54

syco
Member
Registered: 2008-11-06
Posts: 20

Loop cursor through monitors

Hi,
I have a question I couldn't solve (I tried to google it but maybe there are some language barriers and I can't fint anything).
Anyway, I have 2 monitors and I'd like my cursor to move cyclically through them,
when i reach the right edge of the right monitor the cursor should appear on the left edge of the left monitor and vice versa.
Is that something doable??
Thanks.

Offline

#2 2014-10-31 09:54:55

syco
Member
Registered: 2008-11-06
Posts: 20

Re: Loop cursor through monitors

I had probably to give some more info..
I use kde4 (but I can change if needed)
I did some more research and I don't think what I asked is possible, no wonder I couldn't find anything.
But..
with kwinscript is possible to bind a function to the "cursor on edge" event
https://techbase.kde.org/Development/Tu … #Functions
bool registerScreenEdge(ElectricBorder border, QScriptValue callback): Registers the callback for the screen edge. When the mouse gets pushed against the given edge the callback will be invoked.
the problem now is that I can't find in that api how to get mouse coordinates.
(should I move this to another section if it becomes a script problem??)
Thanks again.

Offline

#3 2014-10-31 10:20:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: Loop cursor through monitors

This is very doable.  It would be easiest to do as a modification to a WM, but with kwin that is likely not very practical.

But if you already have a hook for when the mouse reaches the edge of the screen, xdotool can very easily handle the rest.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB