You are not logged in.

#1 2013-07-03 20:45:24

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

[SOLVED] horizontal scrolling openbox

Hi, I would like to use horizontal scroll to change desktop, I enabled it in 50-synaptics and I know how to change rc.conf to add hotkeys to openbox, but I can't find what to type for horizontal scrolling in keybind.
i.e. :

<keybind key="C-A-Left">     <--- what to type for horizontal scroll?
      <action name="GoToDesktop">
        <to>left</to>
        <wrap>no</wrap>
      </action>
    </keybind>

I've looked in the rc.conf wiki and couldn't find anything...anyone knows?
thank you

Last edited by trixrabbit (2013-07-05 23:58:15)

Offline

#2 2013-07-03 21:06:38

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,634

Re: [SOLVED] horizontal scrolling openbox

Wouldn't this be a mousebind event, not a keybind?

http://openbox.org/wiki/Help:Bindings#Mouse_bindings

What do you get if you run "xev" and scroll horizontally?

And I think you mean "rc.xml" unless we're talking about something completely different.

This code causes my scrollwheel to switch desktops -- could it be as simple as "left" and "right" instead of "up" and "down"?

<mousebind button="Up" action="Click">
      <action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="Down" action="Click">
      <action name="GoToDesktop"><to>next</to></action>
</mousebind>

Last edited by 2ManyDogs (2013-07-03 21:14:41)

Offline

#3 2013-07-03 21:27:33

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,484
Website

Re: [SOLVED] horizontal scrolling openbox

It's been a while since I used openbox, but I thought it used the button numbers.  left and right on the scroll wheel are buttons 6 and 7.

But of course these would be mouse bindings, not key bindings.

Last edited by Trilby (2013-07-03 21:28:15)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#4 2013-07-03 23:31:21

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

Re: [SOLVED] horizontal scrolling openbox

@2manydogs, you're right it's .xml, I made a typo and yes it's in the mousebind section, I just wanted to explain what line I had wrong and copy-pasted the wrong thing, thx.
so this is what I have in my rc.xml :

<mousebind button="Left" action="Click">
        <action name="GoToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="GoToDesktop">
          <to>next</to>
        </action>
      </mousebind>

this is the xev output :

ButtonPress event, serial 46, synthetic NO, window 0x1a00001,
    root 0x83, subw 0x0, time 351370, (61,90), root:(167,345),
    state 0x0, button 7, same_screen YES

ButtonRelease event, serial 46, synthetic NO, window 0x1a00001,
    root 0x83, subw 0x0, time 351370, (61,90), root:(167,345),
    state 0x0, button 7, same_screen YES

ButtonPress event, serial 46, synthetic NO, window 0x1a00001,
    root 0x83, subw 0x0, time 353702, (61,90), root:(167,345),
    state 0x0, button 6, same_screen YES

ButtonRelease event, serial 46, synthetic NO, window 0x1a00001,
    root 0x83, subw 0x0, time 353702, (61,90), root:(167,345),
    state 0x0, button 6, same_screen YES

Also before I changed it to Left and Right, I couldn't scroll up/down to change desktop, I don't remember if I changed it one day because it was very annoying but it wasn't doing it anymore. I would like this mousebind to be global too if it's possible.

Offline

#5 2013-07-05 18:55:20

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

Re: [SOLVED] horizontal scrolling openbox

I tried :

    <mousebind button="Left" action="Click">
      <action name="GoToDesktop"><to>previous</to></action>
    </mousebind>
    <mousebind button="Right" action="Click">
      <action name="GoToDesktop"><to>next</to></action>
    </mousebind>

in the Desktop context and it doesn't work. If i change it to 'Up' and 'Down' it works though but I would like to use horizontal, any other suggestions?

Offline

#6 2013-07-05 19:12:29

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,634

Re: [SOLVED] horizontal scrolling openbox

What happens if you use Trilby's suggestion and substitute 6 and 7 for left and right?

Offline

#7 2013-07-05 19:31:06

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,484
Website

Re: [SOLVED] horizontal scrolling openbox

That'd be Button7 or Button7 http://openbox.org/wiki/Help:Bindings#Button


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#8 2013-07-05 23:57:55

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

Re: [SOLVED] horizontal scrolling openbox

thank you it worked with Button6 and Button7 instead of Left and Right.
Solved, I just need to make it slower now because it's really sensible.

edit : I made it so horizontal scroll switch between Desktop 1 and 2 only, that's what I needed, here is what I did if anyone wants to the same.
in the Desktop context section of mousebid :

     <mousebind button="Button6" action="Click">
          <action name="GoToDesktop">
            <to>1</to>
          </action>
      </mousebind>
      <mousebind button="Button7" action="Click">
        <action name="GoToDesktop">
          <to>2</to>
        </action>
      </mousebind>

Last edited by trixrabbit (2013-07-06 00:07:00)

Offline

Board footer

Powered by FluxBB