From 846f067b81de61d960ce7a800630a45e8ae45d3e Mon Sep 17 00:00:00 2001 From: Navid Sassan Date: Tue, 17 Feb 2026 22:17:59 +0100 Subject: [PATCH] Add totp to default keybindings with Shift+Return --- README.md | 3 ++- src/bw_menu/config.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8ecc75..24296fe 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/src/bw_menu/config.py b/src/bw_menu/config.py index c3a5b4e..61d855e 100644 --- a/src/bw_menu/config.py +++ b/src/bw_menu/config.py @@ -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"}