You are not logged in.

#1 2021-04-30 11:14:12

NorPhi
Member
From: North rhine-Westphalia
Registered: 2015-08-26
Posts: 10

[SOLVED] Restrict cursor to monitor unless button is pressed?

I connected a second monitor which is not adjacent to my other monitor (cable to short). I would like to occasionally  move things like the XFCE Terminal, PDFs, etc. over there but generally restrict the cursor to the display. I was hoping to for a setting to simply disable the automatic display switching unless a key is pressed but so far no luck. All solutions that I found online involve fiddling with abstruse Xorg settings and extension packages or arranging the monitors in the Display setting such that only a small gap remains for switching. There seems to be a package that does this with mouse speed (had this on a work PC once) but this was irritating me quite a lot, too. I would like to avoid this. Ideally the cursor does not switch unless a key like FN or that useless windows key is pressed. Any ideas how to accomplish this or where to look for those settings?

Pretty generic installation with Xorg and XFCE. Just updated a minute ago.

Last edited by NorPhi (2021-07-22 18:09:28)

Offline

#2 2021-04-30 12:08:03

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] Restrict cursor to monitor unless button is pressed?

You'll have to create pointer barriers (the more convoluted randr layouts do that implicitly t oprevent you from losing the mouse in some dead area) ie. https://aur.archlinux.org/packages/xpointerbarrier-git/
Looking a the code, it toggles on SIGUSR1 and I'm not so sure that there'sa speed component - certainly not by design.
If anything the pointer acceleration skips the barrier in which case I'd try to set the outputs a little apart (eg. 100px) to trap the pointer at some point.

Offline

Board footer

Powered by FluxBB