Jj's web stream

xvkbd and GTK3

I've been using Fluxbox as my desktop window manager for well over a decade and been very happy with it.

For the longest time I've had a pretty stable .fluxbox/keys configuration where I had configured two extra mouse keys to be Enter and Ctrl+U using xvkbd, pretty handy in Linux.

`# ~/.fluxbox/keys

Mouse8 :ExecCommand xvkbd -xsendevent -text "\r"

Mouse9 :ExecCommand xvkbd -xsendevent -text "\Cu" `

I've also been a long time user of Firefox, so these both extra configurations were very useful at all times, but with the introduction of GTK3 to Firefox my configurations stopped working.

The only information I could find was an unanswered email on Gnome's mailing list which gave some hints about GTK2 migrating to X input 2, which is a new input protocol for X which brings many nice features but apparently broke compatibility with the -xsendevent option on xvkdb.

Took me a while to dig around on how to make xvkbd compatible with GTK3 without success, unless I wanted to learn my way around X and GTK hacking.

At the end, it occurred to me that there must be other alternatives to simulate key events and I found xdotool which works just fine. At the end, just ended up changing my config file to use that.

`Mouse8 :ExecCommand xdotool key "Return"

Mouse9 :ExecCommand xdotool key "Control_L+u" `

And I'm good to go.

PD: I asked this on askubuntu since I figured many others have had this issue with everything upgrading to GTK3, but I ended up answering my own question.