keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.94k stars 1.45k forks source link

[MacOS] Cmd+W keyboard shortcut binding #6837

Open kujass opened 3 years ago

kujass commented 3 years ago

Summary

I like to minimize the KeePassXC window instead of a closing database when I'm using the [Cmd+W] keyboard shortcut. I believe this shortcut is a part of Apple guidelines. [CMD+W] is almost always docking macOS apps like iMessage, Signal, Spotify, Slack, Mail, Calendar, etc.

Fast fix:

Change keyboard binding for [Database>Close Database] command and add a new tab in the main menu for [Window] functions like Minimize, Close, etc. [CMD+W] should hide the app in the macOS dock without closing the database.

Alternative: Add biding option for shortcuts. Remember that mac os users can't create a shortcut themselves for a function that is not listed in the menu.

Context

I'm docking all my apps with the [CMD+W] shortcut which is dedicated to closing database in the KeePassXC. So after that, I have to type down my password again to unlock the database and minimize correctly with my mouse. Retyping database password 10-15 times per day is a bit hindering.

tunbridgep commented 3 years ago

I don't use a Mac, but more configurable keybinds in general would be nice.

gerritgriebel commented 2 years ago

Closing a Window on macOS by clicking the red button should just close the window and not close the app and the database. That's the way it is for most apps, but unfortunately not for KeePassXC.

droidmonkey commented 2 years ago

You can set that behavior in the application settings, minimize instead of close.

phoerious commented 2 years ago

I think we should make the whole behaviour here more macOS-like on macOS. It behaves weirdly compared to other apps, even with the tray icon enabled.

nmajin commented 2 years ago

Still no traction on this? Would be nice to have this work like every single macOS app out there.

nathanzanon commented 1 year ago

Still doesn't appear to be a way to achieve this behaviour natively.

As a workaround I've used BetterTouchTool to do this. Created a keyboard shortcut for KeePassXC.app specifically that uses [CMD+W] to hide the app, see screenshot for exact config

BetterTouchTool-KeePassXC
seanbethard commented 9 months ago

Have Minimize instead of app exit checked. Keep closing the database accidentally when I mean to close the window (minimize the app).

@nathanzanon I love BTT for adding functionality to apps that didn't exist before but I'd hope to avoid using it to get defaults that you expect from every app