Reimplementing a GUI Mouse configuration tool in antiX 23

Forum Forums Official Releases antiX-23 “Arditi del Popolo Reimplementing a GUI Mouse configuration tool in antiX 23

  • This topic has 104 replies, 9 voices, and was last updated May 27-4:05 pm by BobC.
Viewing 15 posts - 31 through 45 (of 105 total)
  • Author
    Posts
  • #135692
    Member
    dspencerj3

      @Robin
      “…pretty simple…” Here I am! LOL

      I ran xinput list and xinput list-props on my machine with 2 wired USB mice and 2 wireless USB mice and I found the id #’s changed for all of them between boots. Not only the id #’s but even the libinput # changed for natural scrolling from 313 to 315 between boots. Not sure about the rest, as that is the one I have been focusing on. I assume if it did, then others did too.
      Peace!

      #135695
      Member
      PPC

        even the libinput # changed for natural scrolling from 313 to 315 between boots.

        Crap! Thanks for the report! I already knew that the devices ID could change… but the ID’s for the devices features? That’s insane! I’ll have to try to change the script I’m working on. Xinput is a pain to work with! I don’t know when I can to that.

        P.

        #135696
        Member
        PPC

          The best way I’ve found so far to list all pointing devices:

          xinput list| grep -v "keyboard" | grep -v "Virtual"

          #135697
          Moderator
          Brian Masinick
            xinput list| grep -v "keyboard" | grep -v "Virtual"
            ⎜   ↳ HP HP USB WHEEL MOUSE                   	id=8	[slave  pointer  (2)]
            ⎜   ↳ SYNA32AC:00 06CB:CD50 Mouse             	id=9	[slave  pointer  (2)]
            ⎜   ↳ SYNA32AC:00 06CB:CD50 Touchpad          	id=10	[slave  pointer  (2)]
            [antix23]/home/masinick: > 

            --
            Brian Masinick

            #135700
            Moderator
            Brian Masinick

              For those interested in the core package for all of this stuff, it is
              xserver-xorg-input-libinput; this provides the capabilities for libinput activity.

              The xinput package is a useful package; it provides a series of commands that can be used in addition to or as an alternative to what comes in the xserver package.

              I looked at both; xserver-xorg-input-libinput in fact provides the X server library for the capabilities.
              libinput-tools is another package that is also possible to use to manage the libinput capabilities; it appears to be a tool for examining the input handling capabilities, so it’s definitely not a replacement (at least for me) instead of xinput; it’s not a mandatory tool; it’s only useful if you want to do some deeper digging.

              --
              Brian Masinick

              #135702
              Member
              PPC

                Last effort for today: the same as the previous script, but working with the device name and feature name, so the commands can be saved and always work across reboots…

                P.

                #135705
                Moderator
                Brian Masinick

                  I tried out your latest tool and experimented with the Touchpad on my system; it does the same thing as the previous tool, but now it can select the specific device and offer a few additional options for those who care to use such a thing. I’ve already implemented enabling/disabling the Touchpad with a script that uses xinput, and I bind it to a one character alias – t – works great for me. This tool can do a lot more for those who want or need it.

                  --
                  Brian Masinick

                  #135748
                  Member
                  dspencerj3

                    Humble apologies, but I must have misread the screen when I thought I saw 313 and then 315. Upon further testing with switching USB plugs and transceivers around from port to port between reboots, I cannot replicate natural scrolling being anything besides 315. So… at least one less complexity to worry about.

                    #135750
                    Member
                    PPC

                      I cannot replicate natural scrolling being anything besides 315. So… at least one less complexity to worry about.

                      That’s already implemented, in the latest version of the test script above… Both device and features are called by their names, not their id numbers… In a way, it’s safer an easier for the user to understand, if the comands are eventually added to a startup file…

                      P.

                      #135755
                      Member
                      PPC

                        I’ve not spent much time today on this script, but I just know took a close look at the features I can change in my mouse, using xinput. Cutting some redundant entries they are:

                        	Device Enabled 
                        	libinput Natural Scrolling Enabled (263):	0
                        	libinput Scroll Method Enabled (269):	0, 0, 0
                        	libinput Accel Speed (277):	0.000000
                        	libinput Left Handed Enabled (282):	0

                        But also some I have clear idea of what they do:

                        	libinput Button Scrolling Button (271):	2
                        	libinput Button Scrolling Button Lock Enabled (273):	0
                        	libinput Middle Emulation Enabled (275):	0
                        	libinput Send Events Mode Enabled (249):	0, 0
                        	Device Node (251):	"/dev/input/event3"
                        	libinput Drag Lock Buttons (265):	<no items>
                        	libinput Horizontal Scroll Enabled (266):	1
                        	libinput Scrolling Pixel Distance (284):	15
                        	libinput High Resolution Wheel Scroll Enabled (267):	1

                        Left handed or right handed configuration is working under the current version of ds-mouse. It seems easy to implement
                        Acceleration is a bit trickier, because it is not just a switch we can toggle, but has a value from 0 to 1, in a decimal scale (0.1; 0.2; 0.3; etc)
                        When those 2 features are implemented, I have no idea how we can emulate the other additional features ds-mouse used to have, except one: we can, in a relatively easy way, send the current user selection for the device to the startup file, using the device name and feature, so the selected configuration will always work when antiX starts. We’ll end up with a poorer GUI, but that has all the main features plus the fact that now users would be able to fine tune each pointing device (ex: enable one touchpad and disable another)

                        I’ll take a look at what I can do about the “right hand/left hand” configuration… and saving settings in the startup file…

                        I just thought of a a new feature that may be handy when using laptops: if another pointing device is present (i.e. a mouse, always disable the touchpad) if not, keep touchpad enabled at startup…

                        P.

                        #135760
                        Member
                        Robin

                          I’ll take a look at what I can do about the “right hand/left hand” configuration… and saving settings in the startup file…

                          @PPC You can save some time when recycling the respective functions from current antiX control centre: There are two functions, add_startup and remove_startup, which are written into temp files currently, because of the particular way antiXcc facilitates its entries internally. You can use them as normal functions (take care for the added backslashes while transferring them into your mouse configurator, these must be removed to make normal functions from them again). For usage instructions of these functions, see the comment lines above them, e.g. they expect the entry to be treated as positional.

                          Windows is like a submarine. Open a window and serious problems will start.

                          #135762
                          Member
                          PPC

                            For now, it’s all I can do. The GUI allows to see the current device configuration and change it’s settings for the current session:
                            -Enable/disable device
                            -Enable Natural/reverse scrolling
                            -Toggle buttons for left handed people
                            -Set the acceleration.

                            The GUI is ugly as sin, but I just wanted to add this main features to it. Making it look better is not as essential as having a GUI to manage pointing devices, right?

                            @Robin – thanks for the pointers, but most of what you just said sounded German to me 🙁

                            P.

                            • This reply was modified 2 months, 3 weeks ago by PPC.
                            • This reply was modified 2 months, 3 weeks ago by PPC.
                            #135777
                            Member
                            PPC

                              Go figure… The better looking version of the script was easier to write and it’s even smaller!!!

                              To do:
                              Save settings… currently they last just during the current session.

                              • This reply was modified 2 months, 3 weeks ago by PPC.
                              #135781
                              Moderator
                              Brian Masinick

                                Nice job with this @PPC!

                                --
                                Brian Masinick

                                #135783
                                Member
                                Robin

                                  but most of what you just said sounded germane to me

                                  currently they last just during the current session.

                                  @PPC This can be helped. Please see attachement. If questions concerning the function integration, just ask, but I believe it’s mostly self explaining.
                                  It’s merely done as an example for the scroll reverse entry in the attachment. Have right now no time, so please add it to the other pulldowns accordingly on your own, it’s pretty easy to apply. Important to understand is: The add_startup function takes either two or three positionals, while the disable_startup function is fine with a single positional.

                                  Syntax: add_startup ‘command’ ‘comment’ ‘teststring’
                                  The third position, accepting a teststring, must be used if you want to grab for entries which can be followed by variables so the entry is recognised in the startup file.

                                  Syntax: disable_startup ‘teststring’
                                  If the command is static, the teststring is the command itself. If it is built up containing variable components, you’ll have to build a regex to catch for the static parts in it.

                                  It turned out it is best to use always a regex as a teststring rather relying on the static command for lookup in both calls, allowing for additional blanks within the line.

                                  —————————-
                                  P.S.:

                                  Nice job with this @PPC!

                                  Signed.

                                  Windows is like a submarine. Open a window and serious problems will start.

                                Viewing 15 posts - 31 through 45 (of 105 total)
                                • You must be logged in to reply to this topic.