Application specific bindings
Is there a way to have custom bindings specific to some application. E.g.:
# bindsym --release F4 [class="Anki"] exec --no-startup-id xdotool key --clearmodifiers Ctrl+z
To bind F4 to Ctrl+z in Anki, but nowhere else (this is just an example). This is meant for the applications that themselves do not offer a way to change bindings.
Thank you very much!
Wouldn't it be easier to just [redefine the key binding in Firefox](http://www.cnet.com/how-to/how-to-customize-firefox-keyboard-shortcuts/)?
Right... Firefox wasn't the best example, sorry. I'm asking because many appllications do not have a direct way to change their bindings.
*i3* criteria do not work for `exec`, so this does not work here. You could write a script that does things depending on the current window (`xprop -id $(xdotool getwindowfocus)`). But if you send a key to which it is bound, you will probably run into a recursion.