Spacc BBS Spacc BBS
    • Categorie
    • Recenti
    • Tag
    • Popolare
    • Mondo
    • Utenti
    • Gruppi
    • Registrati
    • Accedi
    La nuova BBS è in fase Alpha. I post precedenti al 22 luglio 2024 potrebbero non essere trasferibili, ma rimarranno disponibili per la lettura su /old/.

    Whoa: Weston, the reference compositor for #Wayland, supports multiple physical independent mice at the same time!

    Pianificato Fissato Bloccato Spostato Uncategorized
    wayland
    13 Post 1 Autori 10 Visualizzazioni
    Caricamento altri post
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti
    Rispondi
    • Topic risposta
    Effettua l'accesso per rispondere
    Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
    • blinry@chaos.socialB Questo utente è esterno a questo forum
      blinry@chaos.social @blinry@chaos.social
      ultima modifica di

      Okay, let's try some applications, and see how they deal with multiple mice! 😈

      First up: Gedit, a GTK application.

      Both cursors can place the cursor and select text, but movement from one cursor "interrupts" the selection of the other one. Not very satisfying.

      Imagine how cool it would be if both had their own selections + cursors!! That would allow a really neat form of collaboration within the same document!

      blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 1 0
      • blinry@chaos.socialB Questo utente è esterno a questo forum
        blinry@chaos.social @blinry@chaos.social
        ultima modifica di

        Next up: Chromium! It has a very pragmatic solution: It just *ignores* all cursors but the first one!

        In the video, the arrow-shaped cursor can click on stuff. The turtle has no power here.

        blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
        • blinry@chaos.socialB Questo utente è esterno a questo forum
          blinry@chaos.social @blinry@chaos.social
          ultima modifica di

          In Firefox, it seems like all mouse events are mashed together, and are seen as coming from the same device.

          That means that both cursors can click – if the other one "holds still". Otherwise, I guess Firefox is very confused by a click on a link while the mouse is not in it! 😆

          Selections feel strange – the last-moving cursor will determine the selection.

          Also notice how, if one cursor hovers a link, *both* turn into hand icons!

          blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
          • blinry@chaos.socialB Questo utente è esterno a questo forum
            blinry@chaos.social @blinry@chaos.social
            ultima modifica di

            Of course, we *had* to try a drawing application next!

            Here's @tldraw (in Firefox)!

            Collaborative drawing at it's best! 💚

            blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
            • blinry@chaos.socialB Questo utente è esterno a questo forum
              blinry@chaos.social @blinry@chaos.social
              ultima modifica di

              Finally, I tried attaching an additional keyboard and assigned them to a different "seat"!

              That worked really well! In Weston, each "seat" has its own keyboard focus, so you can actually work side-by-side with two mice + two keyboards independently!

              Also!!! The two seats have their own (independent) clipboards!!!! Whatttt! 🤯

              I totally didn't expect this. But multi-seat as a concept seems deeply integrated into libinput + #Wayland! Now it's up to GUI toolkits and compositors to support it!

              blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 1 0
              • blinry@chaos.socialB Questo utente è esterno a questo forum
                blinry@chaos.social @blinry@chaos.social
                ultima modifica di

                Tried it again, and the independent clipboards still seem a bit glitchy after all… :(

                An issue asking for proper support in GTK was closed five years ago, for example… https://gitlab.gnome.org/GNOME/gtk/-/issues/1574

                blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
                • blinry@chaos.socialB Questo utente è esterno a questo forum
                  blinry@chaos.social @blinry@chaos.social
                  ultima modifica di

                  Side note: I think more window managers should support *this* feature!

                  blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
                  • blinry@chaos.socialB Questo utente è esterno a questo forum
                    blinry@chaos.social @blinry@chaos.social
                    ultima modifica di

                    Very useful when your very long line of code doesn't fit on your screen, for example! :P

                    (Shout-out to @xssfox, who first did this on X.org! https://sprocketfox.io/xssfox/2021/12/02/xrandr/)

                    Link Preview Image
                    blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
                    • blinry@chaos.socialB Questo utente è esterno a questo forum
                      blinry@chaos.social @blinry@chaos.social
                      ultima modifica di

                      Okay, here's how to set this up!

                      You need to create a udev rule for the "second" input device that sets ENV{WL_SEAT} to a string other than "default", and then start Weston from a virtual console. (At least, starting it from another Wayland session didn't work for me.) That's it!

                      The WL_SEAT property is what Wayland refers to as a "logical seat". Assign the same seat name to a mouse and a keyboard to make them work together! The default seat is "default".

                      Detailed steps:

                      blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 1 0
                      • blinry@chaos.socialB Questo utente è esterno a questo forum
                        blinry@chaos.social @blinry@chaos.social
                        ultima modifica di

                        1. Use `sudo libinput list-devices` to find the device file (like "/dev/input/event12")
                        2. Use `udevadm info -a /dev/input/event12` to find the parent device with a catchy ATTRS{name}.
                        3. Create a file /run/udev/rules.d/00-multiseat.rules like this:

                        ATTRS{name}="Name of your mouse" ENV{WL_SEAT}="second"

                        4. Run `sudo udevadm trigger` to apply the new rules.

                        You can check again with `sudo libinput list-devices`. The device's "Seat" should now say "seat0, second"!

                        blinry@chaos.socialB 1 Risposta Ultima Risposta Rispondi Cita 0
                        • blinry@chaos.socialB Questo utente è esterno a questo forum
                          blinry@chaos.social @blinry@chaos.social
                          ultima modifica di

                          You could try this script (requires zenity & possibly more tools? Please read before running!) https://github.com/n3rdopolis/rebeccablackos/blob/master/rebeccablackos_files/usr/bin/configureseats

                          (Doesn't work on #NixOS, where /etc/udev is read-only. 💀)

                          I'd love to have a little command line helper tool to help set this up, for an arbitrary number of mice! :D

                          1 Risposta Ultima Risposta Rispondi Cita 1 0
                          • steffo@a.junimo.partyS steffo@a.junimo.party shared this topic on
                          • Primo post
                            Ultimo post