qute-pass: Improve fake_key_raw()

This commit is contained in:
cryzed 2018-04-29 15:22:52 +02:00
parent 92aedf84f5
commit 801e9e0334

View File

@ -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):