Mouse shortcuts with xbindkeys

Note: This isn’t directly related to KDE. However, since there isn’t such a tool for KDE at the moment, I figured some KDE users might find it interesting as well.

I recently bought a new mouse for my desktop computer, more specifically a Logitech Corded Mouse M500. Up until then I had been using an old mouse with two buttons and a scroll wheel. Now I suddenly have two extra mouse buttons, and a scroll wheel that you can tilt to the left and right. Let’s see how to take advantage of this.

The freewheel scroll feature is pretty nice as well

The freewheel scroll feature is pretty nice as well

Bind keys with xbindkeys

As the name suggests, xbindkeys is a small program that lets you bind hotkeys to actions under X. Although it doesn’t include a GUI, it’s very easy to use. There is a graphical configuration tool called xbindkeys-config (GTK frontend), but in this guide I’ll edit the config file directly.

  1. First of all you need to install xbindkeys, preferably through your package manager.
  2. You can create a default configuration file with the command
    xbindkeys --defaults > $HOME/.xbindkeysrc
  3. Open ~/.xbindkeysrc in your your favorite text editor. (If you can’t find it, make sure you have “Show hidden files” enabled).
    [This guide aims to be quite comprehensive - if you don't want to read everything, you can look at the default configuration file and try to figure out the rest yourself. It's not difficult if you read the included comments]
  4. Let’s check the syntax. Everything after # are comments, which means that the program will ignore them.
    You can find the following text in the default file: 

    # The format of a command line is:
    #    "command to start"
    #       associated key

    Below are also some examples – great. It’s probably a good idea to include a short comment (start the line with #) before each command, for example

    # short comment
        "command to start"
           associated key
  5. "command to start" is simply a shell command (that you can run from a terminal). I’ll talk more about it under Actions.
  6. associated key is the hotkey. Let’s take a closer look at how to find what we should write here. But before that, don’t forget the last step.
  7. Start xbindkeys by running the command in a terminal.

Keyboard shortcuts

This section deals with keyboard shortcuts. If you’re only interested in mouse shortcuts, please see the next section Mouse shortcuts.

The first example in the generated .xbindkeysrc shows how you can define a hotkey:

 control+shift + q

A list of modifiers is included in the comments.

# List of modifier:
#   Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
#   Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events
#
# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.

Pretty straightforward, don’t you think? You can also use raw keycodes, as shown in the next example:

c:41 + m:0x4

Now this might look cryptic, but it’s really no problem – you can easily find the keycodes with the --key option. Run

xbindkeys -k

in a terminal and a window pops up. Press the desired hotkey and you should get an output similar to this:

Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
 m:0x15 + c:34
 Control+Shift+Mod2 + q

In this case I pressed Ctrl+Shift+Q. Mod2 corresponds to Numlock which is ignored by default, as explained in the earlier text about modifiers. Apparently the  keycodes for this hotkey are m:0x15 + c:34.

Mouse shortcuts

Now that we know how to deal with keyboard hotkeys, mouse shortcuts should be a piece of cake. The first mouse button (left) is called b:1, the second (right) b:2 and so forth. Take a look at the third example and you’ll see how a mouse shortcut can be defined:

control + b:2

That’s right, you can combine mouse and keyboard shortcuts – great for those who don’t have a fancy mouse with extra buttons. I used to bind Super+ mouse buttons to various actions with my old mouse (Super is the Windows key on most keyboards).

To find out what a mouse button is called, you can use xev. Similar to xbindkeys -k that you used earlier, it pops up a window. However, this one isn’t closed automatically, and it also grabs mouse movement and clicks. Try to click/scroll in the window (without too much mouse movement), and you should see something like

ButtonPress event, serial 31, synthetic NO, window 0x3a00001,
 root 0x189, subw 0x0, time 55432271, (4,0), root:(1102,842),
 state 0x10, button 9, same_screen YES

in the terminal output. According to the last line, I just pressed mouse button 9, which translates to b:9 in .xbindkeysrc.

Actions

command to start is a command that you can run from a terminal, for example an application (dolphin) or a shell script (out of scope for this article).

Let’s take a concrete example. I want to bind wheel tilt -> switch to previous/next desktop. To do this I have to communicate with KWin, the default KDE window manager. KDE applications use D-Bus to communicate with each other, and you can “talk” to them with D-Bus as well. (This is for KDE SC4, in the KDE SC3 series DCOP is used instead).

I’m not very familiar with D-Bus myself, but with the help of the qdbusviewer tool and some Googling I found that I can use the following command to switch desktop:

qdbus org.kde.kwin /KWin org.kde.KWin.nextDesktop
Find the dbus call with qdbusviewer

Find the D-Bus call with qdbusviewer

According to xev (explained in Mouse shortcuts) the tilt to the left and right corresponds to b:6 and  b:7. Therefore, a part of my .xbindkeysrc looks like this:

# Previous desktop
"qdbus org.kde.kwin /KWin org.kde.KWin.previousDesktop"
  b:6

# Next desktop
"qdbus org.kde.kwin /KWin org.kde.KWin.nextDesktop"
  b:7

Don’t forget the quotation marks ("") around the commands!

Another tool you can use to find D-Bus calls is dbus-monitor, as suggested by Balden in the comments. Run it in a terminal and trigger a command the normal way, for example by hitting a keyboard combination, and dbus-monitor will show the call(s).

Emulate key presses

Now I want to map the two other mouse buttons to the KWin effects “Present Windows” and “Desktop Grid”. I couldn’t find any D-Bus calls for this, so let’s try to achieve it in another way. The effects are already mapped to some keyboard shortcuts – maybe we can find a command to “emulate” these key presses?

The tool for doing this is called xte, and is included in the xautomation package. Again, install it with your package manager.

The default shortcut for “Show Desktop Grid” is Ctrl+F8. The following command should then activate the effect:

xte 'keydown Control_L' 'key F8' 'keyup Control_L'

Whether we choose Control_L or Control_R doesn’t really matter. After confirming that it works, I added the following lines to .xbindkeysrc:

# Present Windows
"xte 'keydown Control_L' 'key F10' 'keyup Control_L'"
  b:8

# Desktop Grid
"xte 'keydown Control_L' 'key F8' 'keyup Control_L'"
  b:9

If nothing happens for you, make sure you emulate the right key presses. Have you changed any shortcuts?

This trick can also be used to map the back/forward buttons on the mouse. Here we can’t use D-Bus, since we want to “talk” to the active window and not a specific application. Fortunately for us, most applications use the key shortcuts Alt+Left and Alt+Right for Back and Forward, respectively. In other words, we can do something like this:

# Back
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
  b:6

# Forward
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
  b:7

This’ll work in Dolphin, Konqueror, Firefox, and basically any application that use the same shortcut for Back/Forward.

xte can also be used to simulate mouse clicks, as pointed out by Rahul (see comment for an example).

Want to know more about xte? xte --help displays some helpful text that you might find useful.

Apply settings and make xbindkeys autostart

Now we’re almost done! Remember that you have to restart xbindkeys to apply the changes:

killall xbindkeys && xbindkeys

As a final touch, let’s make xbindkeys autostart with KDE. It’s very easy to do with the new Autostart module.

  1. Open System Settings.
  2. Go to Advanced tab -> Autostart.
  3. Click on “Add Program…”.
  4. Write xbindkeys and press OK. A new dialog pops up. Press OK again.
  5. Done!
Make xbindkeys autostart

Make xbindkeys autostart

Closing words

In this tutorial we’ve learned how to use the xbindkeys program to bind keyboard and mouse shortcuts to different commands. We also took a quick look at how to communicate with an application using qdbus and emulate key presses with xte. Finally, we made xbindkeys autostart.

I think it would be great if the “Input Actions” module in System Settings also supported mouse shortcuts. A more simple module for assigning mouse buttons to actions would be nice as well.

Hope that you found this guide helpful, don’t hesitate to leave a comment below if there’s anything on your mind.

54 Responses to “Mouse shortcuts with xbindkeys”

  1. Ryan Says:

    You shouldn’t have to edit your .xbindkeysrc file at all. There’s a GUI program called xbindkey-config to do it for you.

  2. Hans Says:

    If you read the blog post, I already mentioned xbindkeys-config. However, I’m more of a KISS person, and wanted to show how simple it is to edit .xbindkeys.

  3. atomopawn Says:

    Absolutely excellent. Well done, Hans!

  4. Gianvacca Says:

    Cool guide, very useful. Thanks a lot.

  5. Mickaël Sibelle Says:

    Hi!

    Thank you, it is very clear.
    My girlfriend and I oftenly use the same PC with a x-session opened for each…
    One question: what about multi-user/multi-X-session mode?

    Will we have to have the same xbindkey configuration?
    Will we be able to have two configurations (one for each) running at the same time?

    Thank you for your KISS approach on text files: GUIs are oftenly a source of problem in configuration processes ; moreover for beginners, while they know how to modify a text file ;)

  6. bbandi Says:

    And what if I want to map a keyboard button to a mouse button (Like XF86AudioRaiseVolume)?

  7. bbandi Says:

    Ehh, sorry, I see now, you wrote about it.

  8. David Says:

    Editing a text file isn’t easier than running a GUI program. You have the wrong mentality and are making in fact things worse for new users.

  9. Hans Says:

    @Mickaël Sibelle:
    Unfortunately I don’t know about multiple X session, but I think it should be fine to have two different configurations.

    @David:
    Have I claimed that editing a text file is easier? I do think it’s easier for some users (myself included), but not for everyone.

    I also fail to see how this makes it worse for new users. Apparently there are people who appreciate it. For those who prefer GUI, I already pointed out that I would work with text files, and that there is a tool called xbindkeys-config. Maybe I should make this part bold to make it harder to miss?

    Edit:
    OK changed the text to bold, and also edited the “aimed at beginners” part.

  10. dave Says:

    Well, maybe its simple but not for me.

    It’s not plug and play and this is to advanced for me. This is was keeping me from Linux (I’m leaning) Now everything is working for me, KDE 4 is like a dream (only renaming is not good, i did that and after that action all my extensions are gone so Windows can’t read them anymore :( ) but I’m learning… Why is this not plug and play or is there not a resend Gui, delivered whit KDE (all distributions). a lot of people have a mouse whit a back and forward button.

    Ps. completely off topic i know, but rotation a image inside dolphin is not possible and if you opened inside the viewer it’s ok but can’t save it in that state, you have to rotate it to the left and back again than save the file and it’s ok, is this a bug?

  11. Mickaël Sibelle Says:

    David, I think you are too “sure” of what you say.
    Modifying a file to modify a parameter is easier than using a GUI made to configure the entire application.
    It is a fact.
    File:
    1) open the text file;
    2) modify the line;
    3) save the text file.

    Configuration GUI:
    1) Find the GUI (it may change whether you use this WM KDE or this one Gnome, etc).
    2) Find the right tab, pannel, place, etc. as there are often MANY parameters, so they are “organized” :fear:.
    3) Find the right parameter name (may be translated), IF the GUI guy thought about creating this parameter GUI element.
    4) Set the value.

    Ok, it would be easier if the GUI were better, but they are NOT.

    Let me also give you an example about GUI and command line: VLC. I tried to use the GUI to diffuse music. It is HORRIBLE. In command line it is Easy.
    I know this is a “VLC” problem, BUT it is an real example about “GUI creates limits and complexity”.

    I wish GUI were more easy to use because “end-user” people like them. But “end-user” are often lost, GUI and commandlines/text files, so text files remains more efficient (I meant: for “complex” configuration – keys in this case).

  12. Hans Says:

    @dave:
    There’s a simple reason why no KCM module for this exists in System Settings – no one has written it yet. But as I wrote, I hope to see it in the near future (may even give it a try myself if I find the time).

    “Well, maybe its simple but not for me.”

    It is even for you, but not necessary easier. The ‘simple’ I speak of is not the same thing as ‘easy’ (see the KISS principle).

    For example, it’s often more simple to install an application from the command line (a) than using a graphical tool (b). Just look at the different descriptions:

    (a) Run ‘pacman -Sy xbindkeys’ in a terminal.

    (b) Open “Shaman” from the application launcher, click on the search field, enter ‘xbindkeys’, click on xbindkeys in the list, click on “Mark for installation”, click on “Process Queue”.

    See what I mean?

    “This is was keeping me from Linux”

    One important thing in the FOSS world is ‘freedom’. There are distributions and applications aimed at beginners, and also those intended for more “advanced” users. Saying that one way is wrong is, in my opinion, wrong.

    I don’t blame people who prefer GUIs, but this is the way I like to do it – and the way I’ll teach others. If you don’t like it, I already pointed out an alternative way.

    “Now everything is working for me, KDE 4 is like a dream (only renaming is not good, i did that and after that action all my extensions are gone so Windows can’t read them anymore :(

    Glad to hear that you like it. File extensions shouldn’t be a problem, you can just add them again if you can’t open the files in Windows. By default renaming (F2) in e.g. Dolphin only selects the file name.

    “Ps. completely off topic i know, but rotation a image inside dolphin is not possible and if you opened inside the viewer it’s ok but can’t save it in that state, you have to rotate it to the left and back again than save the file and it’s ok, is this a bug?”

    I don’t quite understand what you mean, but I’m sure you’ll get better support at the KDE Community Forums.

  13. TheBlackCat Says:

    “But as I wrote, I hope to see it in the near future (may even give it a try myself if I find the time).”

    I wouldn’t hold your breath, there are wishlist items in bugs.kde.org asking for this going back 8 years.

  14. Jonas Says:

    Like you, I too just switched from a simple 2 buttons + wheel and managed to get a setup like the one described work to my advantage. Back and forth to switch desktop only really but still…

    However, I ran into one obstacle I haven’t found a way around yet. According to xev, two of my mouse buttons are considered one and the same (namely clicking on the wheel and one button below it designed by Logitech to flip between windows – at least that’s what the logo on the button suggests…). Both give me the same button id.

    Do you know if there’s a way around that?

  15. Hans Says:

    @TheBlackCat:

    I won’t hold my thumbs either – they are better used on the space bar. ;)
    You never know though, many old wishlists I’ve voted for have been implemented in KDE4.

    @Jonas:

    Sorry, I have no idea. Which mouse model do you use?

  16. Andi Says:

    Hi Hans.

    Thank you very much for this description. I allways missed to use the back and froth buttons of my mouse during browsing. Your really made my day!
    Thanks!

  17. dave Says:

    Thanks for all the reply, I know that Linux stand for freedom, thats the main reason I try to switch to Linux. (and I’m getting there ;) ). I Agree that editing a file can be easier that using a GUI, But I prefer a still a gui. Thats freedom you talking about I think.

    Ps. renaming WITH the original extension works, now Windows accepts the files again, but I know now what went wrong. I did select all my images (200) and rename it to foto1 foto2 etc. But Dolpin removes the extension. If you do this on Vista it select only the name and leave the extension alone, so you rename it to “foto1.jpg” and not “foto1″ And if you change it to “Foto1″ without a extension the explorer gifs a warning if you want to do that action.

    Well, I will make a bug report on the KDE site for this and the other problem. Again… Thanks for all the reply that why I want to use Linux p-)

  18. dave Says:

    One small thing, you say that you have to install a gui etc.

    I would like to see a entry inside the KDE setting,… a mouse icon and there you can select the type of mouse you have, or you can select a action for all the buttons. That don’t have to be that advanced.

  19. Splash Says:

    Thanks for this great introduction. I wanted to have something like this for quite some time. I’ve never recognized xbindkeys.

  20. Hans Says:

    @Everyone:

    Thanks for your comments, it makes me happy to hear that you appreciated the guide!

    It would be nice to hear how you’ve mapped your mouse buttons. Personally I find “Present Windows” for the thumb button incredibly useful when I use the mouse (I prefer the keyboard for most tasks).

    @dave:
    “I would like to see a entry inside the KDE setting”

    That’s what a KCM module is. :)

  21. Jonas Says:

    I was afraid so…that you wouldn’t know I mean. I’m using a Logitech mx518, and it works great except for that button (well, and two buttons marked with + and – respectively that are supposed to increase/decrease the dpi – I haven’t bothered with those since they’re located in such awkward positions I wouldn’t use them even if they worked).

    I bought the mouse for two reasons: it fits my hand great which is a rare thing when to comes to my hands, and its resolution makes precise work much easier. The extra buttons are a bonus really, so not a big deal it’s proving impossible (so far at least) to get that button to work. It’s just one of those “I’m gonna get it to work just because!” annoyances…;)

    Anyhow, it seems as if I either need to provide a custom xorg.conf file or a new HAL-rules file for all buttons to work, and as yet I haven’t had time to look into how that works except that it probably has to do with x.org’s ButtonMapping option.

  22. Hans Says:

    @Jonas:
    Do you use evdev? Which distro?

    Here everything worked by just plugging it in, which made me pretty impressed. I still remember the time when you had to add "ZAxisMapping" "4 5" to your xorg.conf to get the scroll wheel to work.

  23. Jonas Says:

    Evdev is installed by the core x-packages, according to the package manager (openSuse 11.1). I assume it’s in use since I can’t see a reason for it not to be used, but I can’t be sure since I don’t really know how it’s supposed to look in xorg.conf. Right now it’s like this:

    Section “InputDevice”
    Driver “mouse”
    Identifier “Mouse[1]”
    Option “CorePointer”
    Option “Buttons” “10″
    Option “Device” “/dev/input/mice”
    Option “Name” “ImPS/2 Logitech Wheel Mouse”
    Option “Protocol” “explorerps/2″
    Option “Vendor” “Sysp”
    Option “ZAxisMapping” “4 5″
    Option “Resolution” “1800″
    Option “ButtonMapping” “1 2 3 6 7″
    EndSection

    Is that how it’s supposed to look when evdev is used? My knowledge of how a xorg.conf file is supposed to look is VERY rusty….

    That being said, MOST things worked out of the box – including the thumb buttons. They worked as back and forth in firefox without me having to do anything. All I needed to do was to make sure the buttons did what I wanted them to do. There’s just this one button…oh, and that “out of the box” experience applies to the “special” keys on my new keyboard as well. Start system-settings, and applying them to my prefered actions was all that was required.

  24. Hans Says:

    As far as I know, these sections in xorg.conf will be ignored if you have hotplugging enabled and use a newer version of Xorg. I don’t know which version or if it applies to openSUSE. (I’m an Arch user myself).

    Sorry I can’t help you, you’ll most likely get better support in the openSUSE forum (for example). Good luck!

  25. ioannis Says:

    Thanks for this howto.

    I have a question. I’ve tried to map the side buttons of my microsoft inteli mouse, to perform back and forward in dolphin. I’ve used this command for backwards action:
    qdbus org.kde.dolphin /dolphin/Dolphin_1/actions/go_back com.trolltech.Qt.QAction.trigger

    and a similar for forward, but then realised that this triggers irrespectively if Dolphin is the application in focus or not. Also, the back/forward in the internet browser stopped working.

    Is there a way to have a conditional expression I can use, that checks if dolphin is the application in focus and if not forwards through the event to whatever app is active (so it can handle it as normal) ?

    thanks

  26. Hans Says:

    @ioannis:
    I would map the mouse buttons to Alt+Left and Alt+Right instead. That way it only affects the focused window, and it works for most applications with Back/Forward actions.

    You can use xte to do this (as explained in the text), for example:

    "xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"

  27. ioannis Says:

    @Hans

    yeah that works. Thanks !

  28. Tony Says:

    Thanks, it works great for the forward and back mouse buttons in dolphin on KDE 4.4.

  29. Hans Says:

    That’s very nice to hear. I think I’ll add the back/forward example to the article, since many persons seem to want to remap the buttons like this.

    Update Jan 27, 2010: Added a small section about back/forward mouse buttons.

  30. Isaac Says:

    Thanks! Have been looking to do something exactly like this. Works great.

  31. Hans Says:

    Glad that you found it useful, and thanks for the feedback.

  32. Clod Says:

    Thank you so much!
    I wasted two days before arriving here and learn about “xte”! ;)

    Thanks again,
    Clod

  33. Michael Says:

    Hello.
    I can’t use the Meta key in xbindkeys.
    I’m writng this in .xbindkeysrc

    "xte 'keydown Super_L' 'key z' 'keyup Super_L'"
       Mod4 + Super_L + b:5
    

    Can you try to use meta key and give me the code?
    Best regards…

  34. Hans Says:

    Hey Michael,

    I mistook your first comment as spam and deleted it, sorry about that. Anyway it read:

    Thanks for the good stuff. Those are really helpful for me…

    Regarding your question, I’ll give it a try when I get hold of a computer that runs Linux (not at home at the moment).

  35. Michael Says:

    I’m still waiting :)

  36. Hans Says:

    Not sure which is your Meta key, but the problem with your configuration seems to be Super_L (xbindkeys doesn’t list it as a supported modifier).

    On this computer Super_L corresponds to Mod2+Mod4, so you can try somethings like this:

    "xte 'keydown Super_L' 'key z' 'keyup Super_L'"
       Mod2 + Mod4 + b:5

    (I get Mod2+Mod4 + Super_L from xbindkeys -k when I press my left Win key, which is where I guess you got the Super_L from. However when I hit Super_L + letter, xbindkeys suggests Mod2+Mod4 + letter.)

  37. Michael Says:

    Thanks.
    This worked!

  38. Balden Says:

    Thanks this is a really clear and useful guide.
    It’s amazing that KDE 4 is still lacking this functionality.
    Just for the record, with the lastest KDE 4.5.2, I was able to trigger several KWin actions directly with the dbus trick, without using “xte”. For instance adding those lines :

    “qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut view_zoom_in”
    Mod4 + b:4

    “qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut view_zoom_out”
    Mod4 + b:5

    in my “.xbindkeysrc” allowed me to zoom in and out using the usual “Compiz” shortcut (Left Windows key + wheel up/down).

    For the record : I was able to figure out the names of many other KWin actions shortcuts by running dbus-monitor in the background and triggering the effects with their “official” keyboard shortcuts (from the central KDE config). Note that I’m not at all dbus-literate (nor kde4-literate) myself so there may well be a much easier way to find this information.

  39. Hans Says:

    Thank you for your kind words Balden, and for the tip about dbus-monitor. I’ve added a small comment about it in the main text.

    Update Oct 12, 2010: Added comment about using dbus-monitor to find D-Bus calls.

  40. Rahul Says:

    Really useful information and well written post. Thanks.

  41. Rahul Says:

    xte can also be used to simulate mouse clicks. Below is an example.

    “xte ‘mouseclick 1′ ‘keydown Control_L’ ‘key v’ ‘keyup Control_L’ ‘key F2′”
    b:2 + Release

    I use this configuration when I use Openoffice calc. What it does is that when you do a middle click, it will evaluate to a left click (for selecting the cell under the cursor) followed by Ctrl+V (for pasting) followed by F2 (for editing the cell).

    Combination of xbindkeys+xte is really useful.

    Hans you could perhaps consider adding this example to your main post.

  42. Hans Says:

    Thank you Rahul. I don’t want to add too much to the guide, but I’ve included a link to your comment in the main post.

    Update Jan 18, 2011: Added link to comment about using xte to simulate mouse clicks.

  43. 7 ways to switch activities « Who Says Penguins Can't Fly? Says:

    [...] calls to achieve this, so instead I’ll use a tool called xte. You can read more about xte in this post under “Emulate key presses”. All you really need to do now is to install xte, which is [...]

  44. drman Says:

    Many Thanks!!!
    Hopeful and clear!!!

  45. Dmitry Says:

    A very useful article. I was using xvkdb instead of xte for quite a while and experienced occasional glitches. Sometimes the assigned key combination was generated multiple times on a single mouse button press: a single wheel tilt switched through several desktops (instead of one), mouse button with Ctrl+W assigned to it closed multiple tabs in Firefox etc. Mostly occured when the overall CPU load was heavy. Switching to xte has solved the problem so far. Using KDE 4.5.2 with desktop effects enabled.

  46. alex Says:

    It works perfectly, thank you :D

  47. Hans Says:

    @drman, Dmitry and alex:

    Thank you for your comments!

  48. 33kg Says:

    @David: I quite like the fact I didn’t have to install xbindkeys-config and I’m pretty used to editing configuration files (I’m using arch linux). GUI configuration tools are sometimes limiting.
    Also, there is no such thing as a wrong mentality.

  49. Zoffix Znet Says:

    I seems to be the only unlucky one here. Trying to bing a Alt+Mouse button 2 to bring the desktop cube…

    If I specify “xterm” as a command to run, it works fine, but when I use xte, it does nothing.

    I even went and created a script and placed xte command in it; if I run the script the command works, but not when I trigger it through xbindkeys.

    Any idea on what’s wrong?

  50. Zoffix Znet Says:

    It gets even weired. If I modify my script to call xterm first, then xte works after I close xterm… :S :S :S what’s going on ? :/

  51. Zoffix Znet Says:

    Sorry for comment spam, but I made it work with dbus after finding the dbus string with dbus-monitor.

    To active the cube I used this tring: “qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut Cube”

    Awesome guide! Thanks so much!

  52. Hans Says:

    @Zoffix Znet:

    No worries; I’m glad that you solved the issue by yourself. If you’re still curious about the xte issue, you can post the part from .xbindkeysrc here so I can look at it. (My initial guess would be problems with ‘ and ” characters.)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.