From fd54ad7314f1d9766704b76ee4d3da0fa2c78067 Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Thu, 28 Mar 2024 00:08:20 +0100 Subject: [PATCH] bugfix: fix emulated keystrokes --- releases/QChangeLog.md | 1 + shared/usb.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/releases/QChangeLog.md b/releases/QChangeLog.md index 31a588f3..9dc207cc 100644 --- a/releases/QChangeLog.md +++ b/releases/QChangeLog.md @@ -116,3 +116,4 @@ - most other exports fit into a reasonable QR (large / lower rez). - Tweak: Default idle timeout when on battery, was reduced to 10 minutes from 30. - Tweak: Cursor movements wrap around if menu is longer than screen height. +- Bugfix: fixed `Type Passwords` a.k.a emulated keystrokes \ No newline at end of file diff --git a/shared/usb.py b/shared/usb.py index 04f355b7..80c8a39e 100644 --- a/shared/usb.py +++ b/shared/usb.py @@ -974,10 +974,10 @@ class EmulatedKeyboard: for i, ch in enumerate(keystroke_string, start=1): cap = False to_press = self.char_map.get(ch, None) - if ch is None: + if to_press is None: cap = True to_press = self.char_map.get(ch.lower(), None) - if ch is None: + if to_press is None: # problem: we don't know how to type this char to_press = 0x1B # X