mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
src/trezor/ui/passphrase: keyboard fix multitouch on space
This commit is contained in:
parent
901b0a53a1
commit
b8cf98b78b
@ -122,16 +122,18 @@ class PassphraseKeyboard(ui.Widget):
|
|||||||
return content
|
return content
|
||||||
for btn in self.keys:
|
for btn in self.keys:
|
||||||
if btn.touch(event, pos) == BTN_CLICKED:
|
if btn.touch(event, pos) == BTN_CLICKED:
|
||||||
# key press, add new char to input or cycle the pending button
|
if isinstance(btn.content[0], str):
|
||||||
if self.pbutton is btn:
|
# key press, add new char to input or cycle the pending button
|
||||||
index = (self.pindex + 1) % len(btn.content)
|
if self.pbutton is btn:
|
||||||
content = content[:-1] + btn.content[index]
|
index = (self.pindex + 1) % len(btn.content)
|
||||||
|
content = content[:-1] + btn.content[index]
|
||||||
|
else:
|
||||||
|
index = 0
|
||||||
|
content += btn.content[0]
|
||||||
else:
|
else:
|
||||||
index = 0
|
index = 0
|
||||||
if isinstance(btn.content[0], str):
|
content += ' '
|
||||||
content += btn.content[0]
|
|
||||||
else:
|
|
||||||
content += ' '
|
|
||||||
self.edit(content, btn, index)
|
self.edit(content, btn, index)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user