Cycle through windows using mouse wheel.

Hi,
I want to get a set up that allows me to cycle through open windows by holding down the right mouse button and rolling the scroll wheel in xfce. Does anyone have any advice on how I might do this?
Thanks.

Here's something I hacked up based on some other code I have, however I haven't tested it so I have no idea if it will work, also the right click will currently be passed on to the active window which could be annoying.
If you want to try it, change the system() lines to match the xdotool command line you need, save as main.c, compile with "gcc -o scrollswitch main.c -lX11", run the resulting scrollswitch executable and cross your fingers
#include <X11/Xlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main()
Display *dpy;
XEvent ev;
int right_down = 0;
if (!(dpy = XOpenDisplay(NULL))) {
fprintf(stderr, "Could not open display %s", getenv("DISPLAY"));
// Guessing that 3
XGrabButton(dpy, 3, 0, DefaultRootWindow(dpy), True, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
XGrabButton(dpy, 4, 0, DefaultRootWindow(dpy), True, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
XGrabButton(dpy, 5, 0, DefaultRootWindow(dpy), True, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
for (;;) {
XNextEvent(dpy, &ev);
if (ev.type == ButtonPress) {
if (ev.xbutton.button == 3) { /* Right click */
right_down = 1;
/* Grab pointer so we receive ButtonRelease */
XGrabPointer(dpy, DefaultRootWindow(dpy), True, PointerMotionMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
XAllowEvents(dpy, ReplayPointer, CurrentTime); /* Allow other apps to process this message */
if (right_down) {
if (ev.xbutton.button == 4) { /* Scroll up? */
system("xdotool alt shift tab"); // Fix this
if (ev.xbutton.button == 5) { /* Scroll down? */
system("xdotool alt tab"); // Fix this
} else {
XAllowEvents(dpy, ReplayPointer, CurrentTime); /* Allow other apps to process this message */
} else if (ev.type == ButtonRelease) {
if (right_down) {
XUngrabPointer(dpy, CurrentTime);
right_down = 0;
XCloseDisplay(dpy);
return 0;

Similar Messages

  • Why am I unable to scroll through bookmarks with mouse wheel anymore?

    Used to be able to scroll through bookmarks with mouse wheel, now I am unable to. I have tried reinstalling firefox and disabling all addons but same problem. Please help!

    Hello,
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    *Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    *In the Firefox options window click the ''Advanced'' tab, then select "General".
    *In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    *Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

  • How to use Mouse Wheel Events

    Hello Everyone
    I am using Datagrid in my Canvas.
    I use mouse wheel to scroll the datagrid. But in one scroll
    through that wheel make the more than 4 rows to be scroll.
    So Now my requirement is to control the delta value of mouse
    wheel event and how to use that with my datagrid so that i will
    able to scroll one row through mouse wheel scroller.
    Thanks

    please give me some suggestion around it.
    I want to scroll one row of datagrid with per mousewheel
    scroll. I am not getting how to use the scrollMouseWheelMultiplier
    property of the IConfiguration class because i am not able to
    create the object of this class.
    I am using the Flex 3.0 and flash 9 version.
    please help me out around this.

  • Cycle Through Windows broken

    The Cycle Through Windows (CMD + ~) is broken in the Leopard Finder. It works until you cycle to the Desktop, and then it stops working. You need to click on another Finder window to get it going again. Not a show-stopper but it's definitely a very annoying bug.
    OAW

    *Cycle Through Windows* in the Finder works again if you +disable Spaces+ (...) I hope it's just a silly bug, cause it is really annoying (and I want to use Spaces).
    10.5.1 didn't fix it - let's wait and see what 10.5.2 will bring us.
    To disable Spaces: System Preferences > Exposé & Spaces > Spaces > uncheck 'Enable Spaces'

  • Safari Cycle Through Windows

    Did anyone ever discover a solution to the Safari Cycle Through Windows issue introduced with Snow Leopard.....ie, where, rather than cycling through windows in the order in which they were opened, Safari started cycling through windows (with the Command-tilde combo) almost randomly (I know its not random, but it still annoys me after all this time).
    I've searched and searched, and can find nothing, so I guess not.
    Hendrix

    Strangely, one of the things I had already tried so many times, worked.
    Changing the shortcut for "Move to next window in active application" under the tab Keyboard Shortcuts in the panel Keyboard and Mouse in System Preferences.

  • How Do I Customize the Key Combination to Cycle Through Windows in Reverse in all Applications?

    How do I customize the key combination to cycle through windows in reverse in all applications?  I want to be able to change the global setting for Command+~ (Cmd+Shft+`) to something more desireable.  I could NOT find a way to do this in Systems Preference -> Keyboard -> Keyboard Shortcuts since there is not a menu selection "Cycle Through Windows in Reverse".  I then went and looked in the plists DBs of Finders resources hoping to find a setting I could override.  I was quite supprised, as well as some of the MAC gurus in the office, that there was not an easier way to override cycling through windows in reverse on a MacBook - the most user friendly and accessibility aware computer on the market:)
    Here is my MAC software info.
    System Version:  Mac OS X 10.6.7 (10J869)
    Kernel Version:  Darwin 10.7.0

    I don't know of any way to have a separate commandkey combo for the reverse cycle function.
    From the Help pages for OS X 10.6.7 ("Using global keyboard shortcuts") -
    NOTE: You can create keyboard shortcuts only for exisiting menu commands.
    Since the 'reverse' cycle command is not an existing menu item, creating a separate key combo for it doesn't seem possible. Apparently the 'reverse' cycle command is a fixed one, internally defined as a mod of the normal cycle command invoked by adding Shift to its key combo.
    There may be a way to achieve what you want via a two-step process: write an AppleScript that will invoke the 'reverse' key-combo set, then link the activation of the AppleScript to a key combo of your choosing. Not sure if this is even possible, though - usually AppleScript activation via keyboard would be set up via an FKey.
    I can understand wanting to share the RSI risk evenly between both hands, or even to unload the left hand if that is desirable. However, apparently a two-key combo can't be done for the reverse cycle function. Is a three-key combo not possible? ...meaning a two-key combo on the right (Command plus something) for normal cycling, adding Shift for reversing?
    One caution about changing keyboard command combos - it's very easy to accidentally set up a conflict with a another existing commandkey set. FWIW, most, if not all, of the mnemonic and easily-reached letters are already used. In this vein, the Keyboard Shortcuts page of the Keyboard prefs pane shows such conflicts via a yellow caution triangle next to the conflictors.

  • Cycle through window missing

    On Yosemite, many applications don't have any more the item "cycle through windows" inside the window menu, and the corresponding keyboard shortcut!
    The problem is (for example) in these applications:
    - textedit
    - safari
    - mail
    - firefox
    - word
    (note that in finder the menu exists and also the shortcut in the keyboard system preferences panel)
    So, the only way to cycle through windows is selecting from the window menu, selecting the desired window name

    joppert wrote:
    I need to use this layout due to my main language. How did you address this? I constantly need to type characters like ç and ã or á é í ó ú and without that layout I could not.
    There is no need to use the US International PC layout to type those characters.  With the normal US layout you can type them by just holding down the key for the base letter and selecting what you want from the popup menu that appears (10.7 and later).
    Otherwise you can always use the standard Apple option/alt key shortcuts:  option/alt + e, then e produces é.  option/alt + c produces ç.  option/alt + n, then a produces ã.

  • Missing "Cycle through Windows" menu item or shortcut?

    Am I missing something or is there indeed no "Cycle through Windows" menu item or shortcut in Pages 09?
    Hope someone can advise.

    It is very hard when you can't see what the other person is looking at and I have never seen a German keyboard, I only know that it is different.
    I think the reason why the window cycling menu item is in Finder is that windows are really part of Finder and as Apple has made them global shortcuts they thought it was the only place to park the menu item.
    Honestly I never knew it was there until now when I went looking for it. I always use the keyboard shortcuts which I stumbled on years ago.
    I am glad you found a way around the problem.
    Apple lives in their ivory tower in California and is nowhere as international as they used to be under the original Mac OS. Give them feedback, you are not the only one who has encountered this problem.
    Alles gut, ende gut.

  • Use Mouse Wheel in man/less

    I can scroll with the mouse wheel in xterm when I use standard command output and whatnot, but I can't figure out how to scroll through man pages with the scroll wheel.  Thoughts?
    Last edited by MarCustomized (2008-11-06 03:43:58)

    I just spent 20 minutes digging in the manuals for urxvt and lesskey because I realized I'd also like something like this. The bad news it, it isn't going to (easily) happen without patching less (or simply using another pager; most and mcview are good). The rest of this post is technical detail you probably don't need unless you're more persistent than I am.
    Xterm-compatible terminals don't send mouse events by default. That can be worked around by sending the appropriate control sequences ('\e[?9h' and '\e[?9l') before and after (respectively) running less. A quick shell function could automate this. The larger problem is that there's no way to get just the button pressed: it also sends the coordinates of the pointer at the time of the click. You can tell less to scroll based on events by entering the appropriate sequences in your ~/.lesskey file and running lesskey (see `man lesskey`). As these sequences include the coordinates, you would need to have a line for every permutation. Without poking around the source I don't even know if less can handle that many bindings.

  • Using mouse wheel to zoom and pan

    I was wondering if there would be a way to make a javascript that would load at Photoshop's startup that would allow the user to zoom in and out using the mouse wheel (instead of using it for scrolling), and to use that same mouse wheel as a third button (when you push on the mouse wheel) or any third button on a three button mouse to pan in your image. I'm a 3ds max user and I love the way the navigation work in that software so it'd be great to be able to do that for Photoshop and Illustrator and get rid of those useless key shortcuts that we need to use to zoom and pan.
    For the pan fonction, I guess if there was a way to simply say "when the third mouse button is pressed, press the space button, until the mouse button is released" it could work. But then it would force the panning to stop when the mouse goes offscreen, unlike in 3ds max where you can pan for whatever distance you want, even if you have the loop throught the screen ten times.
    For the zoom function, if scolling up could simply "push" the keyboard shortcuts to zoom in/ zoom out it could work, but I don't know if that's possible. And then we'd have to disable the scrolling up and down in the document.
    Anyways, if anyone has any ideas about that let me know! I've been looking for that for such a long time!

    Not sure if I am misreading your post, but there is an option in the preferences that allows you to choose Zoom With Scroll Wheel. With this option active you hold the ALT key to scroll.
    My Logitech mouse has a tilt wheel on it and this works fine in Photoshop. It doesn't loop through the screen but it does pan left and right with no problem. On this mouse the scroll wheel can also be pressed, and can be programmed to almost any key, I use for double click.
    Forgive me if I've misunderstood your question.

  • How to cycle through scenes using the up and down buttons??? (Please help, novice!)

    Hi,
    I'm currently trying to teach myself how to use flash CS5 and actionscript 3 and apart from doing small amounts of programing here and there I'm a complete novice.
    I have 36 photographs taken at 10-degree angles, making an object and i have each image in a different scene, with hidden buttons asigned to different parts of the object so that whenever you hover your mouse over them it provides some more information.
    What I want to do is to be able to cycle through these images in the different scenes using the up and down buttons on the keyboard.
    I'm hoping that I'm at least half way there having assigned the 'hot-spots' but I'm just stuck on the final part... please help!!!!
    Many thanks in advance!
    Harry

    If you are talking about the arrow keys on the keyboard you will have to use a Keyboard Event listener and take note of the constant value for resulting KeyCode
    This website seems to have a handle on it:
    http://www.republicofcode.com/tutorials/flash/as3keyboard/
    There is another method that allows you to listen just to the keys you want (up and down):
    http://www.flex888.com/598/using-keycodes-in-actionscript-3.html

  • Switch between desktops using mouse wheel

    Just a simple question - is there a possibility to switch desktop with use of the mouse wheel on the desktop background? I know it is possible in XFCE, but how about KDE or GNOME?
    Why it is important to me - I have simplified changing desktops by setting a 5 pixel margin on the bottom and the right of the screen, so there is always desktop background visible. To switch desktop I simply move mouse to the edge of the screen and scroll - simple, fast and efficient. And funny - this is the main thing that binds me to XFCE, even though my computer is fast enough to handle KDE4 .
    Some time ago I have installed GNOME, and later KDE4.1, and tried to find such feature, but I did not succeed unfortunately, even though I spend some time over the documentation and the settings panels. Currently with the introducing KDE4.2 and nvidia-180 driver, which improves 2D graphics somewhat (i.eg. gtkperf gives now 6.5 sec instead of 9.5 that it used to be before upgrade) I'm interested in switching to KDE. Can anyone help me?
    P.S. Sorry fo my english
    Last edited by Devastator (2009-01-17 11:16:10)

    Sure, with compiz you can do a lot more than this . I've installed KDE4 again, but cannot get it to switch desktops the way I wanted. Scroll over pager works on every DE, though it requires precise mouse aiming over the pager. In XFCE I don't have to aim - just move the mouse to the side of the screen (where I have margin set, so desktop is available there) and scroll.
    Alt+scroll requires additional movement, which is annoying when for example I do things, that don't require keyboard use (like composing the playlist, browsing the web, changing the GTK2 themes and so on ). I like minimizing things to do to achieve the goal. Therefore I also use cairo-dock, which removed additional mouse click (for raising the menu) when opening the most used applications...
    A funny and I think useful feature I found in KDE4 is action bound to scroll over the window titlebar - it moves the window and the user to the next desktop .
    Last edited by Devastator (2009-01-19 12:50:07)

  • PSE 7: Editing- Unable to Zoom Using Mouse Wheel

    I just upgraded from PSE 5 to PSE7.
    Unable to Zoom in/out on a picture using my mouse wheel (with move arrow selected).
    I used to be able to do this in PSE 5... What am I doing wrong/whats missing?
    Thanks!
    John
    [email protected]

    Did you enable scroll wheel zooming in the PSE preferences?

  • 2.1 bug: navigation snapback using mouse wheel in Library

    Running 2.1 under WinXP, I get this behavior intermittently:
    When using the mouse wheel to advance from one image to the next in the Library module, the focus will snap backwards from the currently selected image to some previous image. It will not snap back to the immediately previous image, but to an image 2 or 3 positions earlier.
    When this behavior appears, it persists, even after closing and restarting LR ... and most recently even after rebooting WinXP.

    Could be a mouse driver thing, a LR thing, an OS thing.
    For more direct control that doesn't slip, use arrow keys.

  • Zooming using mouse wheel ?

    I just upgraded from PSE 5 to 9.  One of the handy functions in PSE 5 was the use of the mouse wheel to zoom in or out of a picture that you're working on in the editing work space.  Now it seems I have to use the brackets or the awkward zoom tool.
    Is there a way I can activate/modify something so I can zoom with the mouse wheel?  Thanks.
    Also, the type on the pulldown menus is harder to read than in PSE 5 because the type is small and it's revered out of black.  I'm going to explore the workspace in PSE 8.  Maybe I upgraded too far.

    Open a photo in "Full Photo Edit" mode.
      Select Edit>Preferenes>General.  Check the box that says "Zoom with Scroll Wheel".
    Bob

Maybe you are looking for

  • All in one printer only able to print

    Okay, before you say anything about how faxing, using the scan features and the card readers are not supported, let me say that I totally understand and know this. Here is why I'm posting.... I had an airport express before, it broke and now I have a

  • Problem in getting last value of a string in Function Module

    Hi, I am working on FM in which i have to put highfen mark which is working ok,but the problem if there is when the value of string finds a space it should not insert highfen in it and i am not able to put the condition in it as it showing the higfen

  • Date Format in BW

    The date format accepted in the BW system is of the form yyyymmdd. But i have the flat file from the user which contain the below format : yymmdd. Kindly let me know how can i change the date format from yymmdd to yyyymmdd. Thanks in advance, Rachu

  • Opening search bar results in a new tab

    My search bar opens the results in a new tab, but, when I click on one of the links on the results page, FF no longer remembers the search results page (ie. the Back button does not work). This problem goes away if I set the search bar results to ope

  • Billing Document and nota fiscal type

    In ABAP program I need to create a Billing Document (VF01). During the creation I need to change the Nota Fiscal Type (J_1BNFDOC-NFTYPE) to include a number of nota fiscal (J_1BNFDOC-NFNUM). This number will be generated by another system. The NF wil