Add totp to default keybindings with Shift+Return

This commit is contained in:
Navid Sassan 2026-02-17 22:17:59 +01:00
parent 23c825a71c
commit 846f067b81
2 changed files with 7 additions and 2 deletions

View File

@ -52,6 +52,7 @@ Default keybindings:
|--------------|-------------------|
| Enter | Copy **password** |
| Ctrl+Enter | Copy **username** |
| Shift+Enter | Copy **totp** |
| Escape | Cancel |
Keybindings are configurable — see [Configuration](#configuration) for details.
@ -90,7 +91,7 @@ Config file location: `$XDG_CONFIG_HOME/bw-menu/config.yaml` (or `config.yml`),
keybindings:
password: Return
username: Control+Return
totp: Control+Shift+Return
totp: Shift+Return
```
Each entry maps a vault field to a [rofi key name](https://davatorium.github.io/rofi/current/rofi-keys.5/). Available fields: `password`, `username`, `totp`.

View File

@ -6,7 +6,11 @@ from pathlib import Path
import yaml
DEFAULT_KEYBINDINGS = {"password": "Return", "username": "Control+Return"}
DEFAULT_KEYBINDINGS = {
"password": "Return",
"username": "Control+Return",
"totp": "Shift+Return",
}
VALID_FIELDS = {"password", "username", "totp"}