View previous topic :: View next topic |
Author |
Message |
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 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: 2670
|
|
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: 1014 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: 1014 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: 2670
|
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: 2670
|
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 |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Mon Jan 27, 2025 11:38 am Post subject: |
|
|
Do both pointers have to be on the same screen, or are you looking for full multi-seat? I haven't heard of anyone actually using a multi-seat setup in at least 10 years, so I'm not actually sure if wayland compositors support it. _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Mon Jan 27, 2025 7:58 pm Post subject: |
|
|
bunder wrote: | Do both pointers have to be on the same screen, or are you looking for full multi-seat? I haven't heard of anyone actually using a multi-seat setup in at least 10 years, so I'm not actually sure if wayland compositors support it. |
No, the idea is to use them each at his own screen. But they should not or do not have to be bound to a screen each. My goal was to have 2 screens, an full screen application on each and then a mouse on each so I don't have to move the mouse over from one screen to the other.
But no big deal if it isn't supported or takes more work to get it working than moving the mouse... _________________ Expert in non-working solutions |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2670
|
Posted: Mon Jan 27, 2025 8:30 pm Post subject: |
|
|
Spanik wrote: | My goal was to have 2 screens, an full screen application on each and then a mouse on each so I don't have to move the mouse over from one screen to the other. |
But then you have to move your hand from one device to the other. I had shoulder problems from having to move my hand from kbd to mouse and back, the numeric keyboard being in-between. I had to use the mouse with the left hand for quite a while. Not only because it relieved my right hand but also because there's no numeric keyboard on the left. I'm very careful about that since then. It's worth considering that part.
Best Regards,
Georgi |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3490
|
Posted: Mon Jan 27, 2025 9:39 pm Post subject: |
|
|
I personally love the idea of multipointer gestures.
Feels like something that could really take of in VR, but considering I literally have 4 pointer interfaces connected to a single X-server (track point, stylus and 2 touch pads), and I know a bunch of people who use mice with their laptops that already have touchpads built in, working with both hands might not be that far-fetched anymore, even using only the hardware that is already popular. _________________ Make Computing Fun Again |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Thu Jan 30, 2025 6:50 pm Post subject: |
|
|
logrusx wrote: | Spanik wrote: | My goal was to have 2 screens, an full screen application on each and then a mouse on each so I don't have to move the mouse over from one screen to the other. |
But then you have to move your hand from one device to the other. I had shoulder problems from having to move my hand from kbd to mouse and back, the numeric keyboard being in-between. I had to use the mouse with the left hand for quite a while. Not only because it relieved my right hand but also because there's no numeric keyboard on the left. I'm very careful about that since then. It's worth considering that part.
Best Regards,
Georgi |
I use my right hand for the mouse, but at the office it is set for "right hand use" and at home for "left hand use" in order to use different fingers. Found that it really helped to reduce pain in my index. I regulary have 2 mice on my mousepad. One for the office administrative laptop and another one for the technical laptop. So switching mice isn't new to me (*). Only now I'd like it to happen on the same pc.
(*) neither is switching keyboards after playing the pipe organ for a couple of decades
szatox wrote: | I personally love the idea of multipointer gestures.
Feels like something that could really take of in VR, but considering I literally have 4 pointer interfaces connected to a single X-server (track point, stylus and 2 touch pads), and I know a bunch of people who use mice with their laptops that already have touchpads built in, working with both hands might not be that far-fetched anymore, even using only the hardware that is already popular. |
I really don't like touchpads. When typing they always make the cursor go places where I do not want it to go and I then keep typing and writing gibberish. I always disable the touchpad when I plug in a mouse. These days you can even set that automatically in windows, I wish linux would let you do it as well. _________________ Expert in non-working solutions |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3490
|
Posted: Thu Jan 30, 2025 8:22 pm Post subject: |
|
|
Yeah, I'm not exactly a fan of touchpads either; I mostly use a stylus those days. The point was that basically every laptop comes equipped with one AND many people prefer to use a mouse instead, so it's no longer strange to have multiple controllers connected to a single machine at the same time... And having multiple pointers working with those controllers would be quite in line with my sig
Having multiple keyboards opens new possibilities too, even though current trends are all about doing it over the internet. Unlike good, old times where every single game console would come with 2 sets of controllers.
> but at the office it is set for "right hand use" and at home for "left hand use" in order to use different fingers
Having 2 different mappings sounds confusing, but I do understand the power of small changes to the environment. I've been using the "office" mouse with my weak hand to stop bending my back sideways from leaning on my weak arm. Took stunning 0 effort, and did a pretty good job fixing my posture.
We're getting off topic though, and while I am not in a dire need of multiple pointers right now, I do want to see how it goes. So, if you manage to do any experiments, let us know. _________________ Make Computing Fun Again |
|
Back to top |
|
|
|