Pyrainput (FunKeyMonkey plugin + pyrainputctl) design


ible

professional vim user
Joined
Mar 24, 2014
Messages
2,540
Location
Seattle, WA
i think it would make sense to fire small scroll events at a low frequency when the nub is less off center, and just fire more frequently if the nub is further off center.
 

Letalis Sonus

Advanced Member
Joined
Mar 5, 2009
Messages
1,473
Analogue scroll events are actually a thing, think of touchpad scrolling. Touchpads are probably providing absolute instead of relative position information, though.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,141
Location
Somewhere off the coast of the EU
Yes, playing with my trackpad, the two-finger scrolling works as if it's sending a up/down arrow key every centimetre or so I move. Maybe a two zoned approach will be enough for everyone, where it scrollls just one tick if you only move it up to half way, but sends repeated clicks if you move it all of the way, at perhaps some user definable frequency if no happy solution can be found between all the users with their pyras thus far (and willing to contribute to this thread).
 

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,493
Location
Finland
Website
Visit site
Analogue scroll events are actually a thing, think of touchpad scrolling. Touchpads are probably providing absolute instead of relative position information, though.
That's a good point, but they're probably handled separately. For example my laptop's touchpad looks like:

Code:
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 272 (BTN_LEFT)
    Event code 325 (BTN_TOOL_FINGER)
    Event code 328 (BTN_TOOL_QUINTTAP)
    Event code 330 (BTN_TOUCH)
    Event code 333 (BTN_TOOL_DOUBLETAP)
    Event code 334 (BTN_TOOL_TRIPLETAP)
    Event code 335 (BTN_TOOL_QUADTAP)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value     42
      Min        0
      Max     1162
      Resolution      12
    Event code 1 (ABS_Y)
      Value    634
      Min        0
      Max      634
      Resolution      12
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max        4
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max     1162
      Resolution      12
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max      634
      Resolution      12
    Event code 55 (ABS_MT_TOOL_TYPE)
      Value      0
      Min        0
      Max        2
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
  Event type 4 (EV_MSC)
    Event code 5 (MSC_TIMESTAMP)
Properties:
  Property type 0 (INPUT_PROP_POINTER)
  Property type 2 (INPUT_PROP_BUTTONPAD)

There's not specific scroll events, just touch and multitouch locations. The actual scrolling behavior is handled somewhere else.
 

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,493
Location
Finland
Website
Visit site
i think it would make sense to fire small scroll events at a low frequency when the nub is less off center, and just fire more frequently if the nub is further off center.
It would probably need two limit values: when it switches to slow speed and when it changes to fast speed. If these are the same number there's an uncomfortable area where the speed would skip erratically due to the noise in the nubs. The principle is simple, but there's some tuning like this to make it feel nice.
 

Bosbeetle

Terminally lost
Joined
Sep 7, 2008
Messages
4,055
Age
40
Location
The Netherlands
Website
Visit site
probably unrelated but still I have some questions. Where can I find the used mapping? And how do I run the pyra input tester.

when i run the input tester I cant seem to get the nice keyboard layout that shows if my keys are working... tried running it from tty or terminal. but probably im doing it wrong. I suspect my upper right shoulder to not work, I think its mapped to alt but it doesnt show up/work. thats why I am curious about the mapping.

that and getting to know my pyra


Thanks!

bzar pointed me to xinput which you can install from the repo, it monitors if your keys give an input.
 
Last edited:
Top