title: xvkbd and GTK3
link: http://jj.isgeek.net/2015/08/xvkbd-and-gtk3/
author: Jj
description: 
post_id: 999
date: 2015/08/17 01:19:06
created_gmt: 2015/08/17 06:19:06
comment_status: open
slug: xvkbd-and-gtk3

I've been using [Fluxbox](http://www.fluxbox.org/) 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](http://homepage3.nifty.com/tsato/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](https://bugzilla.mozilla.org/show_bug.cgi?id=627699) my configurations stopped working. 

The only information I could find was an [unanswered email on Gnome's mailing list](https://mail.gnome.org/archives/gtk-list/2012-May/msg00001.html) which gave some hints about GTK2 migrating to [X input 2](http://www.x.org/releases/X11R7.7/doc/inputproto/XI2proto.txt), 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](http://www.semicomplete.com/projects/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](http://askubuntu.com/questions/661609/xvkbd-not-working-on-gtk3-apps) since I figured many others have had this issue with everything upgrading to GTK3, but I ended up answering my own question.