Perform Auto-Type is broken

Bug #801415 reported by macho
This bug affects 7 people
Affects Status Importance Assigned to Milestone
keepass2 (Ubuntu)

Bug Description

Strange behaviour for "Perform Auto-Type"/Ctrl+V. As soon as it's pressed, the main window minimizes, and a superfluous "Open Database" dialog opens up. After correctly entering the credentials, it performs the auto-type, but with incorrect characters. I created a username of "abcdefghijklmnopqrstuvwxyz" and it auto-typed "abideyuhijkpmlorqrstuvwxtz". Interestingly, when my keyboard is set in dvorak layout (which I normally use), it autotypes "axceḟgdchtlmnrpṕoygky".

This is with Ubuntu 11.04 version 2.15+dfsg-2+ppa2.

Tags: patch
Revision history for this message
macho (macho) wrote :

I should mention, Ctrl+B and Ctrl+C work just fine for copying usernames and passwords, and the autotype problem affects the passwords just the same as the user names.

Revision history for this message
Julian Taylor (jtaylor) wrote :

I can only reproduce the autotype problems when I have more than one keyboard layout set up.
If I remove all layouts but one in the keyboard layout settings autotype works with dvorak and my default (german elimate deadkeys)
This is probably a xdotool problem as the typing is also wrong when invoking it directly from a terminal:
xdotool type abcdexyz

I can't reproduce the "Open Database" dialog opening.

Changed in keepass2 (Ubuntu):
status: New → Confirmed
Revision history for this message
macho (macho) wrote :

I can confirm this works with a single keyboard layout.

I suspect the open database dialog is related to bug #801414. I am getting it at a few different unexpected times.

Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :


I'm experimenting a similar bug with Ubuntu 11.10.

I have one keyboard layout defined (Belgian, ie azerty). When I perform autotype it types as if the keyboard was querty (ie, replacing a with q etc).

Running "setxkbmap be" before launching keepass2 solves the issue.

It used to work correctly with Ubuntu 11.04 and the jtaylor ppa.

Best regards,


Revision history for this message
Amir (amiryal) wrote :

This patch applies cleanly on both 2.16 and 2.17 source zip archives.

Unfortunately, I could not get this thing to run from source in MonoDevelop, so I need somebody else with a working configuration to test the patch. Thanks!

Also submitted the same patch here:
And here:


Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch against version 2.17 source zip" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Julian Taylor (jtaylor) wrote :

great thank you very much, the patch appears to work for me.
I'll test it a bit further and if there are no issues I'll add it to the package.

To apply it to the source package do the following:
apt-get install devscripts
apt-get source keepass2
apt-get build-dep keepass2
cd keepass2-*
quilt import path/to/patch.file
quilt push
quilt refresh
debuild -us -uc

the package source should also compile in monodevelop, open KeePass/KeePass.csproj

Revision history for this message
Amir (amiryal) wrote :

Thanks for the detailed instructions, Julian!

It now works much more predictably, but still has a bug: if the target window is using the default keyboard layout (listed at the top in my Gnome keyboard settings), then Auto-Type works as expected; but if the target window is using a different layout, then xdotool weirdnesses start to show up again.

The current implementation with the patch applied works well enough for me. I hope somebody is looking into incorporating it upstream.

Revision history for this message
Amir (amiryal) wrote :

To anyone who is interested, received update from upstream developer (see

> I now rewrote the auto-type key sending engine, and the new one uses a similar solution like you suggested.
> More information:
> Thanks and best regards,
> Dominik


Revision history for this message
Alexander Buchner (alexander-buchner) wrote :

And when will this bug be fixed?
As of today a friend of mine still struggles with this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.