5

In Xfce, by default you have the zoom function activated by ALT+(Mouse Wheel).

This is fine for me, but I'd want to add another (and not replace) key combination, for my remote command does not have a mouse wheel.

How can it be done? Thanks a lot!

Braiam
  • 67,791
  • 32
  • 179
  • 269
MadHatter
  • 481
  • 5
  • 17
  • 27
  • As the answer mentions, this is a function of compositing (the functionality disappears if the Compositor is turned off) which means it's probably hard to set it to something different. – landroni Jun 15 '16 at 14:50

1 Answers1

1

I couldn't find anything for this in the advanced XFCE settings editor (xfce4-settings-editor). It might also not work simply because its a function of compositing.

There is a program for automating key presses and mouse clicks/movements called xdotool (available from apt). It is supposed to be able to simulate mouse wheel movements using mouse buttons 4 and 5. You can also use it to press the Alt key (on my system its the Super key because I set that to be my XFCE window function key).

Ideally you'd put a command line this in a script file and then run it using another keystroke:

xdotool --clearmodifiers keydown Alt click 4 keyup Alt

Then make another script that runs the same except click 5 for zooming out.

deltaray
  • 215
  • Your answer is undoubtably useful (I upvoted it), but I do have only 2 mouse buttons on my Rii fly mouse (It is more a remote than a mouse). – MadHatter Jan 26 '15 at 23:44
  • Well I didn't mean that you'd bind one of your mouse buttons to the zoom function, I meant you'd bind another sequence like Ctrl-Alt- numpad+ and numpad- or something like that. – deltaray Jan 27 '15 at 17:42
  • Good. Accepted ;) – MadHatter Jan 28 '15 at 14:07
  • 1
    Forget the fly mouse, just get a wireless keyboard with a touchpad on it. It might look expensive, but it did wonders for me. I mean ... what mouse? Where? – ipse lute Jun 09 '16 at 09:57
  • NB: The syntax of the xdotool command has changed. I tried to find something that worked with Alt+Super+=/- and got nowhere. keydown --clearmodifiers Alt isn't going to do what you want. I used Alt+=/- and made them simply xdotool click 4/5. Effective if suboptimal. – knghtbrd Sep 19 '21 at 22:29