You are not logged in.

#1 2014-05-14 10:23:49

fANZY
Member
Registered: 2014-04-27
Posts: 7

Application specific keymap

Hello,

I'm trying to map Alt to my middle mouse button but only in World of warcraft.
I'm using openbox as WM and downloaded xdotool, i tried modifying my rc.xml as follow :

<mousebind action="Press" button="Middle">
  <action name="If">
    <title type="exact">World of Warcraft</title>
    <focused>yes</focused>
    <then>
      <command>xdotool key alt</command>
    </then>
  </action>
</mousebind>

This didn't work so i'm looking for some help.

Last edited by fANZY (2014-05-14 15:14:20)

Offline

#2 2014-05-14 10:51:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Application specific keymap

Is that actually the title of the world of warcraft window?  You can check with `xprop | grep -i class` then click on the window.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2014-05-14 10:54:11

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: Application specific keymap

title could be one of WM_NAME or WM_CLASS so should

| grep -iE 'name|class'

Last edited by HiImTye (2014-05-14 10:54:31)

Offline

#4 2014-05-14 11:02:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Application specific keymap

Also, you should try isolating each one of the conditions: does it work (on all windows) when you remove the title condition?  Does it work on W.o.W. when you remove the focused condition?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2014-05-14 13:33:41

fANZY
Member
Registered: 2014-04-27
Posts: 7

Re: Application specific keymap

Ok so "World of Warcraft" is the actual name of the window.
I tried removing the conditions and used it on other windows it didn't work either so i tryed simulating a rightclick instead of alt and it worked. I, then, tried with the condition <title> and it worked on wow aswell. then i tried with a letter instead of right click and it worked aswell, but it only work if i dont press another key at the same time which is disapointing since its WoW and you have to juggle with arround 35 keybind (we'll see that later). Then i tried again with alt and with alt it still doesnt work for some reason.

Offline

#6 2014-05-14 15:13:23

fANZY
Member
Registered: 2014-04-27
Posts: 7

Re: Application specific keymap

Ok so i've found another solution to simulate Alt with my mouse middle button. Im using evrouter instead of xdotool. it Work very nicely i'm just missing the app specific feature.

Any idead ? Basically i want this feature to be enabled when i'm on WoW and disabled othewise so for instance if i alt tab i dont want my middle button to act as Alt
I could use a script to start evrouter with wow and stop it when i alt tab or close wow but id like a cleaner solution.

Last edited by fANZY (2014-05-14 15:17:08)

Offline

Board footer

Powered by FluxBB