Bug 3581 - configure the number of mouse-wheel turns required to switch desktop
Status: ASSIGNED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: unspecified
Hardware: All Linux
: P3 enhancement
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2008-03-27 10:56 EDT by Filip Wojciechowski
Modified: 2009-01-06 14:24:54 EST
1 user (show)

See Also:



Description Filip Wojciechowski 2008-03-27 10:56:02 EDT
I posted a question about this to the mailing list and it was suggested that I file a feature request here (I'm not a programmer to be able to submit a patch -- unfortunately), so here it goes:

I have my laptop set up so that sliding a finger along the horizontal (right) edge of the touchpad imitates the mouse-wheel and enables scrolling.  However,
this kind of scrolling cannot be used to switch desktops comfortably in Openbox,
because the touchpad is too sensitive (a movement of 1mm is enough to switch the desktop, but in practice it is easier to rotate through all the desktops three times over than to switch to the next one).

Beryl, when I last used it a while back, had a configuration option that enabled the user to set the number of mouse-wheel rotations necessary to switch the desktop -- so I could set it to 10 or so, which made touchpad desktop switching work very nicely.  I'd love a configuration like this to be added to Openbox.

Like I said -- I'm not a programmer so I can't really come up with a patch.  I will be, of course, available if some testing is required or if I can be of assistance in any other way.

Thanks a lot for considering this!
Comment 1 Mikachu 2008-03-27 11:10:55 EDT
You can change the binding to use DoubleClick instead of Press. I have a feeling that's not enough for you though.

A problem in implementing this is that openbox is probably more configurable and general than beryl. We can't have a setting that says "scroll this many times to switch desktops" since scrolling on the desktop could be bound to whatever, or changing desktops could be bound to something else. So do we save the number of presses/scrolls/whatever in the desktop switching actions or in the input layer? What should the syntax look like in rc.xml? Should the presses be limited by a timeout? Should the timeout be configurable? Should the timeout be configurable per bind or globally?

Or should we instead implement it as keychains but for the mouse, and you simply nest the binds as many times as you want?
Comment 2 Filip Wojciechowski 2008-03-27 11:29:19 EDT
I tried all the possible mouse binding, including DoubleClick, but it doesn't really make any noticeable difference.  In the sense the problem seems to be that Openbox is way too efficient at switching desktops -- it just happens too fast :)

I realize that it would be impossible, or in either way inconsistent with the way Openbox does things, to implement it Beryl-style as an independent configuration option.  As for how it could be implemented in Openbox -- I guess I was thinking of something along the lines of enabling one of the mouse actions (for example "Click") to be defined using Click(x) syntax, or maybe Click-x to be more consistent with the syntax for key actions at least, where x is the number of repetitions of the action, and have the number default to "1" if it is not specified.  That's just a vague idea though...
Comment 3 Aren Olson 2009-01-06 14:21:41 EST
I'm looking for the same functionality, as the TrackPoint on my thinkpad has similar difficulty in switching desktops. The DoubleClick setting helps, but doesn't solve the problem.

As for how to implement, filip's suggestion sounds nice, alternatively adding a timeout=xx parameter would work, requiring xx milliseconds before the action could be triggered again.
Comment 4 Mikachu 2009-01-06 14:24:54 EST
the syntax in the config file is probably the smallest problem here :), but thanks for your input.