1. Set the custom keyboard shortcut `sh -c 'pgrep -i keepassxc > /dev/null || keepassxc'` to Alt+V
2. Keep KeePassXC's default autotype prompt keybinding, which is Alt+V
One disables the other. I thought that going the `grep` route might make the program opener conditionally inactive, but apparently that's not doing anything. I would really like to avoid using a separate keybinding if possible. Otherwise, I guess I'd just have to have it open on launch.
20 May 2026 14:40
The problem is that your desktop environment's shortcut handler intercepts Alt+V before KeePassXC ever sees it, so the internal keybinding never fires. And when pgrep finds the process running, your command simply does nothing.
The fix is to use KeePassXC's --auto-type CLI flag, which sends the auto-type signal to a running instance:
Command for your custom shortcut (Alt+V):
```
bash -c 'pgrep -x keepassxc > /dev/null && keepassxc --auto-type || keepassxc'
```
Not sure how keepass behaves though. Maybe you don't need the condition at all and can just run `keepassxc --auto-type` from the shortcut and if there is no running instance it will start it.
20 May 2026 15:25
Wow, it works; you're a genius!!! Thanks so much!!! Hmm, Lemmy doesn't seem to have post flair, but it _does_ allow title-editing, so I'll just update the post title, haha.
.lol, it is actually failing after all. It only pulls up the auto-type window the first time. Then it only summons the main window from thereafter until it closes...
20 May 2026 17:07
If you use Hyperland, you can simply setup the keybind in hypr.config (also makes it easier to change your default file manager, etc)
20 May 2026 17:40
Huh? It's in the comments...
21 May 2026 05:23
Do you mean the one about hyprland? That's the only other comment I see
21 May 2026 07:25
Interesting... There's a comment here by
.lol, so perhaps your instance doesn't federate with lemy.lol?
In their comment they suggested this command:
```
bash -c 'pgrep -x keepassxc > /dev/null && keepassxc --auto-type || keepassxc'
```
21 May 2026 07:48
Actually, this code didn't work after all! It brings up the autotype window once, but then it brings up the main window thereafter...
21 May 2026 15:08
Yeah you probably have to play around with the flags to figure out the right approach. I can not look into it right now
21 May 2026 16:07
I don't really understand how to figure out flags, so I just set it to start up on boot and just log in from the start and that basically fixes it.
7 Jun 2026 06:20