View previous topic :: View next topic |
Author |
Message |
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1012 Location: Belgium
|
Posted: Sat Jan 18, 2025 11:58 am Post subject: using 2 independent mice at the same time? |
|
|
Is it possible to use 2 mice at the same in a way they have 2 pointers? Strange question perhaps but I'd like to try this as I think it could be handy when working with 2 screens. Like when you have on one screen a drawing where you need to take measurements in app A and then on the other screen another app B where you are using those measurements. I'm drawing a 3D model from old scanned plans and this would avoid a lot of moving around with the mouse. Certainly with large screens.
I just tried to connect 2 mice but they both control the same pointer. So that doesn't help. _________________ Expert in non-working solutions |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 324 Location: Somewhere in the 77
|
Posted: Mon Jan 20, 2025 10:56 am Post subject: |
|
|
Hello,
I do not think that is possible, never heard of multiple mouse pointer, Linux, Windows, Mac or other.
You'll have probably to work around that, depending on your desktop environment, maybe there would be a cool feature doing the «teleportation» of your mouse icon in the middle of another window while hiting some shortcut.
Beside that, I do not see how that would be possible.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
Gatsby Tux's lil' helper
Joined: 18 Jan 2010 Posts: 124 Location: 127.0.0.1
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2653
|
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 324 Location: Somewhere in the 77
|
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1012 Location: Belgium
|
Posted: Wed Jan 22, 2025 5:24 pm Post subject: |
|
|
Nice! I know what to do this weekend I'll let you know where this ends. _________________ Expert in non-working solutions |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1012 Location: Belgium
|
Posted: Sun Jan 26, 2025 10:36 am Post subject: |
|
|
Tried it and got strange results. Just a recap of what I did.
1: xinput with just my keyboard and mouse I always use:
Code: | ~ $ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ HID 04b4:0033 id=9 [slave pointer (2)]
⎜ ↳ HID 0557:2419 id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Lite-On Technology Corp. HP Basic USB Keyboard id=8 [slave keyboard (3)]
↳ HID 0557:2419 |
2: made the new master
Code: | ~ $ xinput create-master "usb_mouse"
~ $ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ HID 04b4:0033 id=9 [slave pointer (2)]
⎜ ↳ HID 0557:2419 id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Lite-On Technology Corp. HP Basic USB Keyboard id=8 [slave keyboard (3)]
↳ HID 0557:2419 id=10 [slave keyboard (3)]
⎡ usb_mouse pointer id=12 [master pointer (13)]
⎜ ↳ usb_mouse XTEST pointer id=14 [slave pointer (12)]
⎣ usb_mouse keyboard id=13 [master keyboard (12)]
↳ usb_mouse XTEST keyboard id=15 [slave keyboard (13)]
|
At this point I get another mouse pointer and text cursor in the middle of the screen. They flicker a bit when I move the (original) mouse.
3: I plug in a Logitech USB mouse. I now can move the mouse pointer with both mice, the first (cabled) and the second one (USB wireless)
4: xinput again to check on the ID's
Code: | xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ HID 04b4:0033 id=9 [slave pointer (2)]
⎜ ↳ HID 0557:2419 id=11 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver Mouse id=18 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver Consumer Control id=19 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Lite-On Technology Corp. HP Basic USB Keyboard id=8 [slave keyboard (3)]
↳ HID 0557:2419 id=10 [slave keyboard (3)]
↳ Logitech USB Receiver System Control id=16 [slave keyboard (3)]
↳ Logitech USB Receiver id=17 [slave keyboard (3)]
↳ Logitech USB Receiver Consumer Control id=20 [slave keyboard (3)]
⎡ usb_mouse pointer id=12 [master pointer (13)]
⎜ ↳ usb_mouse XTEST pointer id=14 [slave pointer (12)]
⎣ usb_mouse keyboard id=13 [master keyboard (12)]
↳ usb_mouse XTEST keyboard id=15 [slave keyboard (13)] |
Now it looks as if the second USB mouse is attached to the master keyboard. And indeed I have strange things happening if I click with the first mouse to activate another window. Sometimes I loose the keyboard and have to click a bit with each mouse to get it active again.
The next step in the link is:
Code: | Now you just need to reattach one of your mice to the new master xinput reattach "mouse id" "new master id". |
Do I get it right that I now need to attach "id=16" to "id=12"? I'm not sure and the rest of the explanation doesn't inspire confidence. The first time I did "xinput remove-master 12" X just crashed. _________________ Expert in non-working solutions |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2653
|
Posted: Sun Jan 26, 2025 11:04 am Post subject: |
|
|
Spanik wrote: |
Tried it and got strange results. Just a recap of what I did. |
It seems to me that has never have been a real solution but a hack that relied on bugs, side effects or something not quite functioning as intended.
Best Regards,
Georgi |
|
Back to top |
|
|
Gatsby Tux's lil' helper
Joined: 18 Jan 2010 Posts: 124 Location: 127.0.0.1
|
Posted: Sun Jan 26, 2025 1:33 pm Post subject: |
|
|
Spanik wrote: |
The next step in the link is:
Code: | Now you just need to reattach one of your mice to the new master xinput reattach "mouse id" "new master id". |
Do I get it right that I now need to attach "id=16" to "id=12"? I'm not sure and the rest of the explanation doesn't inspire confidence. The first time I did "xinput remove-master 12" X just crashed. |
Yes, it would be Code: | xinput reattach <id of one of your mouse devices> 12 |
Unfortunately xinput seems to not to work so well with recent xorg-server versions, as removing the new master resulted in terminating X here as well. _________________ "Its your Gentoo, your way. When it breaks, you can keep all the pieces."
-- NeddySeagoon@forums.gentoo.org |
|
Back to top |
|
|
Gatsby Tux's lil' helper
Joined: 18 Jan 2010 Posts: 124 Location: 127.0.0.1
|
Posted: Sun Jan 26, 2025 1:38 pm Post subject: |
|
|
logrusx wrote: | It seems to me that has never have been a real solution but a hack that relied on bugs, side effects or something not quite functioning as intended. |
It is basically the same as your proposal: https://wiki.archlinux.org/title/Multi-pointer_X _________________ "Its your Gentoo, your way. When it breaks, you can keep all the pieces."
-- NeddySeagoon@forums.gentoo.org |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2653
|
Posted: Sun Jan 26, 2025 1:49 pm Post subject: |
|
|
Gatsby wrote: | logrusx wrote: | It seems to me that has never have been a real solution but a hack that relied on bugs, side effects or something not quite functioning as intended. |
It is basically the same as your proposal: https://wiki.archlinux.org/title/Multi-pointer_X |
My memory was something existed explicitly for that purpose. This is not my proposal but what I found trying to dig for that memory. After all it was nearly 20 years ago, I can't rely neither on my memory, not on the Internet. Back then I wasn't interested in such stuff and just noted the idea and the fact that implementation existed. I don't remember any details aside from the video where they demonstrated two players playing tic-tac-toe with two different pointers. And as I said in my original post, it was a module for Xorg, shortly after it got split from XFree86 and refactored to be modular. That's why I remember the time frame. The Internet on the other hand does not guarantee 20 y.o. stuff would still exist, neither it being easily found if it existed.
Best Regards,
Georgi |
|
Back to top |
|
|
|