From 801e9e0334dcc58cbe52b936951d93c1e3c1e3c7 Mon Sep 17 00:00:00 2001 From: cryzed Date: Sun, 29 Apr 2018 15:22:52 +0200 Subject: [PATCH] qute-pass: Improve fake_key_raw() --- misc/userscripts/qute-pass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass index fc897be07..892f9c5da 100755 --- a/misc/userscripts/qute-pass +++ b/misc/userscripts/qute-pass @@ -111,7 +111,9 @@ def dmenu(items, invocation, encoding): def fake_key_raw(text): for character in text: - qute_command('fake-key {}'.format(character)) + # Escape all characters by default, space requires special handling + sequence = '" "' if character == ' ' else '\{}'.format(character) + qute_command('fake-key {}'.format(sequence)) def main(arguments):