D29365: Increase values for touchpad acceleration that can be set from kcm libinput UI

Giusy Margarita noreply at phabricator.kde.org
Tue May 5 11:12:15 BST 2020


kurmikon added a comment.


  In D29365#663827 <https://phabricator.kde.org/D29365#663827>, @ndavis wrote:
  
  > I had a look at the documentation for libinput pointer acceleration (https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html). For anyone following this conversation:
  >
  > - `0` is the default
  > - when greater than `0`, acceleration starts sooner and pointer movement increases by larger factors
  > - when less than `0`, acceleration starts later and pointer movement increases by smaller factors until pointer movement does not increase with mouse movement speed. The point where that happens is somewhere in the range of greater than `-0.75` and less than `-0.5`.
  
  
  Indeed it's acceleration, not speed, also the label has to be changed.
  
  In D29365#663827 <https://phabricator.kde.org/D29365#663827>, @ndavis wrote:
  
  > Since understanding the way values match acceleration speeds is kind of tricky here, I don't think making the value a percentage would be very helpful. Only people who read the documentation will actually know what to expect from the values, so I think it would be best to show values that match the documentation.
  
  
  Good idea. Something like this:
  
    // Acceleration
    Controls.SpinBox {
        Kirigami.FormData.label: i18nd("kcm_touchpad", "Pointer acceleration:")
        id: accelSpeed
    
        from: -100
        to: 100
        stepSize: 10
        editable: true
    
        function load() {
            enabled = touchpad.supportsPointerAcceleration
            if (!enabled) {
                value = 0
                return
            }
            value = Math.round(touchpad.pointerAcceleration * 100)
    
        }
    
        onValueChanged: {
            if (touchpad != undefined && enabled && !root.loading) {
                touchpad.pointerAcceleration = value / 100
                root.changeSignal()
            }
        }
        
        textFromValue: function(value, locale) {
            return Number(value / 100).toLocaleString(locale, 'f', 2)
        }
    
        valueFromText: function(text, locale) {
            return Math.round(Number.fromLocaleString(locale, text) * 100)
        }
    }
  
  Stepsize of 10 so you won't complain to navigate too much, but we have the accuracy of 2 decimal numbers.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D29365

To: kurmikon, #vdg, #plasma
Cc: ndavis, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200505/219ff432/attachment.html>


More information about the Plasma-devel mailing list