KeePass   KeePass Help Center Home KeePass Home | Package Downloads | Flag Translations | Blocks Plugins | Donate Donate 
Home Help Center Home | People Forums | Award Awards | Link Links 


Auto-Type on Wayland

Details about auto-type on systems with Wayland.

Help General

For Unix-like systems with Wayland compositors, there is a plugin called KPUInput, which allows KeePass to use the /dev/uinput device for sending keypresses to other windows.

With the KPUInput plugin, KeePass can auto-type the default sequence (as specified on the 'Auto-Type' tab of the entry editing dialog) of the currently selected entry (command 'Perform Auto-Type').

Auto-Type Context Menu

Furthermore, you can select an entry and auto-type fixed sequences (via the context menu), if the option 'Show additional auto-type menu commands' (in 'Tools' → 'Options' → tab 'Interface') is turned on.

Advanced auto-type features that need the title of the target window (like window-sequence associations and a system-wide hot key) are not supported, because Wayland does not seem to provide any way to get the title of the currently active window (in contrast to X11 and Windows).

If an API is added to Wayland for getting the title of the currently active window or if a layer/library (between Wayland and desktop environments) is developed, we will consider using this. Some desktop environments provide own APIs, but we are not planning to use these directly, due to the large number of desktop environments (more than 30). It does not make sense that every application has to use custom code for each desktop environment; one common API (like the ones provided by X11 and Windows) is much more reasonable.

On some systems, physically pressed keys cannot be released programmatically. Therefore, if you press Ctrl+V (in order to invoke the 'Perform Auto-Type' command), please release both keys within 1 second after pressing the V key. Furthermore, make sure that Caps Lock is off when invoking auto-type.

Due to the complicated setup of the KPUInput plugin, the potential security issues and the limitations, we recommend to use X11 instead of Wayland, if possible.

User Key Security

Wayland does not seem to provide any API for sending keypresses to other windows. Therefore, the KPUInput plugin uses an API from a lower level, namely the /dev/uinput device (Linux kernel level). For security reasons, this device by default is not accessible by regular users. The setup steps make the device usable by regular users (every user in the uinputg group). On a system that is used by one user only, this typically is not a problem. However, on a system with multiple users, it may be a security issue, and we advise against this solution in this case.

On X11 and Windows, there is no such problem, because X11 and Windows provide APIs for sending keypresses to other windows that are limited to the current user, i.e. no access to devices on a lower level is required.

System Setup

In order to install the KPUInput plugin and configure the system for it, follow these steps:

  1. Make sure that the following packages are installed:
    PrerequisiteTypical Package Name
    GNU C++ compilerg++
    Linux header fileslinux-headers-ARCHITECTURE
    Systemd utility library - development fileslibsystemd-dev
    XKB compiler - development fileslibxkbcommon-dev
    Mono development tools and librariesmono-complete
  2. The following commands grant the current user the permission to use /dev/uinput:
    sudo groupadd uinputg
    sudo usermod -a -G uinputg $USER
    echo "KERNEL==\"uinput\", GROUP=\"uinputg\", MODE=\"0660\", OPTIONS+=\"static_node=uinput\"" | sudo tee /etc/udev/rules.d/89-uinput-u.rules > /dev/null
    If your system does not support sudo, log in as administrator/root (with su) and run the commands above (without sudo, and replace $USER by the name of your regular user account).
  3. Reboot your machine.
  4. Download the KPUInput plugin package: Package KPUInput 1.1.
    If you are a developer and want to have a look at the source code of the KPUInput plugin, here it is: Package KPUInput 1.1 Source Code.
  5. Unpack the KPUInput plugin ZIP file and run the script file. Example:
    chmod +x; ./
    If successful, a file called is generated.
  6. Move all plugin files (KPUInput*) into the KeePass application directory (directly, i.e. the plugin files must be in the same folder as the KeePass.exe file, not in any subfolder of it).

Please note that these steps are required on every machine on which you want to use auto-type. The file (generated by running the script file) is not portable, i.e. copying the file to a different machine will not work in general.

Text Version History

Changes in the KPUInput plugin:

  • 1.1
    • Added support for event-based engine creation.
    • Minor other improvements.
  • 1.0
    • Initial release.

Get KeePass