Horizontal scrolling shortcut in Linux

7

4

In Os X, I can hold Shift while using the scroll wheel on the mouse to scroll horizontally instead of vertically. Is there a way to do something similar in Linux?

Matthew Shanley

Posted 2009-07-27T17:44:29.120

Reputation: 883

I asked a similar question for Windows: http://superuser.com/questions/13763/horizontal-scrolling-shortcut-in-windows

– Matthew Shanley – 2009-07-27T17:45:31.583

2I'd imagine that would depend on your window manager. – jason – 2009-07-27T19:12:41.813

See http://askubuntu.com/a/883789/41425

– Ondra Žižka – 2017-02-15T22:04:10.613

Doesn't look very difficult to do on a window manager level. I guess you could file a bug in metacity or kdm bugtracker... – liori – 2009-08-15T02:38:12.560

Answers

2

For a lot of things like this, xmodmap is useful, but I don't think it can remap keyboard+mouse combinations. However, you might have some luck using imwheel. It's actually fairly powerful - you can customize to have different mappings in different windows! For example, here's the first section of the sample file included in the source tarball:

"^mutt.*"
None,           Up,     Up
None,           Down,   Down
Control_L,      Up,     Page_Up
Control_L,      Down,   Page_Down

This will apply to mutt (or rather, windows with titles matching that pattern). The first field is keyboard modifiers for the input event, the second is mouse button/wheel input event, and the third column is output events. So, the first one maps wheel up to keyboard up, and the third maps left control+wheel up to page up.

Cascabel

Posted 2009-07-27T17:44:29.120

Reputation: 1 240

0

You could macro the same combination to do the similar action, you would need an alternative to AutoHotKey for your Linux distribution and a script dedicated to Linux.

Ivo Flipse

Posted 2009-07-27T17:44:29.120

Reputation: 24 054