Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7fae965
Menu item with context arrows and custom color + other UI improvements
tadeubas Nov 15, 2025
93bd168
Vertical bar for menus with more than one page + changelog
tadeubas Nov 17, 2025
6bae18c
Add missing context arrow
tadeubas Nov 17, 2025
86b3063
Merge branch 'develop' into ux_imporvements
tadeubas Nov 17, 2025
426eb58
Merge branch 'develop' into ux_imporvements
tadeubas Nov 17, 2025
d8762ea
Remove swipe_threshold in favor of industry standard
tadeubas Nov 19, 2025
885a83c
Discard diagonal swipes
tadeubas Nov 19, 2025
97c743d
Discard long-hold swipes
tadeubas Nov 20, 2025
ebdcca7
Highlight the touched menu item
tadeubas Nov 20, 2025
daad4a1
Touch-feedback highlight and better touch handling on keypads
tadeubas Nov 21, 2025
b3780a9
Fix keypad highlight
tadeubas Nov 22, 2025
f8aac05
prompt highlight + code reuse
tadeubas Nov 22, 2025
8c7064a
Add highlight to stackbit
tadeubas Nov 22, 2025
d336ab8
Add highlight to tinyseed
tadeubas Nov 22, 2025
06c0124
Tinyseed avoid highlight disabled bits
tadeubas Nov 22, 2025
b4bde20
Add touch-feedback highlighting to mnemonic editor
tadeubas Nov 22, 2025
8c9e466
Changed highlight style for prompt
tadeubas Nov 23, 2025
251aa77
Change highlight style for mnemonic_editor
tadeubas Nov 23, 2025
ddcb7b4
Hold enter on tinyseed change index to Go
tadeubas Nov 23, 2025
e12ad5d
Change highlight style on keypad
tadeubas Nov 23, 2025
1f953c7
Merge branch 'develop' into ux_imporvements
tadeubas Nov 23, 2025
d5634a2
change highlight style on stack1248
tadeubas Nov 23, 2025
e74d807
optimize touch region detection
tadeubas Nov 24, 2025
7aab01d
Optimization: right-shift instead of // 2 mnemonicEditor
tadeubas Nov 24, 2025
1bfaac5
minor UI changes for small screens
tadeubas Nov 24, 2025
365b3a8
black
tadeubas Nov 24, 2025
0a8d660
Test coverage
tadeubas Nov 25, 2025
b4a5a9a
Fix edge case for touch index
tadeubas Nov 25, 2025
3954ed8
Stack1248: v_line only for touch devices
tadeubas Nov 25, 2025
fe2a470
test coverage 100%
tadeubas Nov 25, 2025
bc9c7ab
Category Settings touch/btn highlight
tadeubas Nov 25, 2025
4d197e5
Merge branch 'develop' into ux_imporvements
tadeubas Nov 26, 2025
688a297
Fix edge cases for touch
tadeubas Nov 28, 2025
216bd70
Merge branch 'develop' into ux_imporvements
tadeubas Nov 28, 2025
353f08a
Merge branch 'develop' into ux_imporvements
tadeubas Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ Krux now displays a warning instead of blocking QR-encoded passphrases that cont
### Easier to Scan UR QR Codes
Exported Uniform Resource (UR) QR codes, a widely adopted standard for exchanging PSBTs, now use uppercase data to reduce QR density, improving scan reliability without increasing the number of frames.

### Improved UI
- Added new context arrows, customizable colors, touch-feedback highlighting and a page index for menu navigation.
- Refined keypad visuals with a clearer keyset index and touch-feedback highlighting.
- Added touch-feedback highlighting to confirmation prompts, Category Settings, Stackbit 1248, Tinyseed and Mnemonic editor.

### Other Bug Fixes and Improvements
- Settings: Reduced default _Buttons Debounce_ value (with an even lower default on _M5StickV_)
- Settings: Expanded value ranges for _Touch Threshold_ and _Buttons Debounce_
- Swipe handling: Detection threshold has been slightly reduced
- Swipe handling: Diagonal and long-hold swipes are now discarded, and the swipe detection threshold has been slightly reduced
- Touch handling: Discards touches near edges of adjacent regions
- Keypad: Added backtick **`**
- Bugfix: Screensaver not activating in menu pages without statusbar
- Embit: Improved BIP39 mnemonic validation
- Bug Fix: Corrected handling of certain binary-encoded QR codes
- UI: Other small changes and optimizations
- Fix fingerprint unset warn message for rare case
- Improved QR code decoding performance and added inverted color QR code detection

Expand Down
1 change: 0 additions & 1 deletion i18n/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Gerätetests",
"Display": "Bildschirm",
"Do not power off, it may take a while to complete.": "Schalten Sie das Gerät nicht aus, es kann eine Weile dauern.",
"Done Converting": "Konvertierung abgeschlossen",
"Done?": "Fertig?",
"Double mnemonic": "Doppelte Gedächtnisstütze",
"Driver": "Driver",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/es-MX.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Pruebas del dispositivo",
"Display": "Pantalla",
"Do not power off, it may take a while to complete.": "No apagues el dispositivo, puede tardar un tiempo en completarse.",
"Done Converting": "Listo para convertir",
Comment thread
tadeubas marked this conversation as resolved.
"Done?": "¿Listo?",
"Double mnemonic": "Doble mnemónico",
"Driver": "Operador",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Tests de l'appareil",
"Display": "Affichage",
"Do not power off, it may take a while to complete.": "Ne pas éteindre, cela peut prendre un certain temps.",
"Done Converting": "Conversion terminée",
"Done?": "Terminé ?",
"Double mnemonic": "Double mnémonique",
"Driver": "Pilote",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "デバイステスト",
"Display": "ディスプレイ",
"Do not power off, it may take a while to complete.": "完了するまで電源を切らないでください.",
"Done Converting": "変換を完了する",
"Done?": "完了?",
"Double mnemonic": "ダブルニーモニック",
"Driver": "ドライバー",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "장치 테스트",
"Display": "디스플레이",
"Do not power off, it may take a while to complete.": "전원을 끄지 마십시오. 완료하는 데 시간이 걸릴 수 있습니다.",
"Done Converting": "변환 완료",
"Done?": "완료되었습니까?",
"Double mnemonic": "이중 니모닉",
"Driver": "드라이버",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Apparaattests",
"Display": "Weergave",
"Do not power off, it may take a while to complete.": "Schakel het apparaat niet uit, het kan even duren voordat het klaar is.",
"Done Converting": "Converteren gedaan.\r",
"Done?": "Klaar?",
"Double mnemonic": "Dubbel geheugensteuntje",
"Driver": "Driver",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Testes do Dispositivo",
"Display": "Display",
"Do not power off, it may take a while to complete.": "Não desligue, pode demorar um pouco para concluir.",
"Done Converting": "Concluída a conversão",
"Done?": "Concluído?",
"Double mnemonic": "Mnemônico duplo",
"Driver": "Driver",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Испытания устройства",
"Display": "Дисплеи",
"Do not power off, it may take a while to complete.": "Не выключайте питание, это может занять некоторое время.",
"Done Converting": "Конвертация завершена",
"Done?": "Готово?",
"Double mnemonic": "Двойная мнемоника",
"Driver": "Драйвер",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Cihaz Testleri",
"Display": "Ekran",
"Do not power off, it may take a while to complete.": "Kapatmayın, tamamlanması biraz zaman alabilir.",
"Done Converting": "Dönüştürme Tamamlandı",
"Done?": "Tamamlandı mı?",
"Double mnemonic": "Çifte anımsatıcı",
"Driver": "Sürücü",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/vi-VN.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "Kiểm tra thiết bị",
"Display": "Hiển thị",
"Do not power off, it may take a while to complete.": "Không được tắt máy, có thể mất một lúc để hoàn thành.",
"Done Converting": "Hoàn tất chuyển đổi",
"Done?": "Hoàn tất?",
"Double mnemonic": "Từ gợi nhớ kép",
"Driver": "Driver",
Expand Down
1 change: 0 additions & 1 deletion i18n/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"Device Tests": "设备测试",
"Display": "显示",
"Do not power off, it may take a while to complete.": "请勿断电,可能需要一段时间完成.",
"Done Converting": "完成转换",
"Done?": "完成了吗?",
"Double mnemonic": "双重助记词",
"Driver": "驱动程序",
Expand Down
35 changes: 23 additions & 12 deletions src/krux/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# pylint: disable=unnecessary-lambda

import time
import board
from .wdt import wdt
Expand All @@ -35,6 +37,7 @@
SWIPE_LEFT = 5
SWIPE_UP = 6
SWIPE_DOWN = 7
SWIPE_FAIL = 99
FAST_FORWARD = 8
FAST_BACKWARD = 9

Expand All @@ -47,6 +50,7 @@
QR_ANIM_PERIOD = 300 # milliseconds
LONG_PRESS_PERIOD = 1000 # milliseconds
KEY_REPEAT_DELAY_MS = 100
TOUCH_HIGHLIGHT_MS = 100

BUTTON_WAIT_PRESS_DELAY = 10
ONE_MINUTE = 60000
Expand Down Expand Up @@ -175,29 +179,30 @@ def touch_event(self, validate_position=True):
return self.touch.event(validate_position)
return False

def swipe_right_value(self):
"""Intermediary method to pull touch gesture, if touch available"""
def _swipe_check_value(self, swipe_fnc):
if kboard.has_touchscreen:
return self.touch.swipe_right_value()
return swipe_fnc()
return RELEASED

def swipe_none_value(self):
"""Intermediary method to pull touch gesture, if touch available"""
return self._swipe_check_value(lambda: self.touch.swipe_none_value())

def swipe_right_value(self):
"""Intermediary method to pull touch gesture, if touch available"""
return self._swipe_check_value(lambda: self.touch.swipe_right_value())

def swipe_left_value(self):
"""Intermediary method to pull touch gesture, if touch available"""
if kboard.has_touchscreen:
return self.touch.swipe_left_value()
return RELEASED
return self._swipe_check_value(lambda: self.touch.swipe_left_value())

def swipe_up_value(self):
"""Intermediary method to pull touch gesture, if touch available"""
if kboard.has_touchscreen:
return self.touch.swipe_up_value()
return RELEASED
return self._swipe_check_value(lambda: self.touch.swipe_up_value())

def swipe_down_value(self):
"""Intermediary method to pull touch gesture, if touch available"""
if kboard.has_touchscreen:
return self.touch.swipe_down_value()
return RELEASED
return self._swipe_check_value(lambda: self.touch.swipe_down_value())

def wdt_feed_inc_entropy(self):
"""Feeds the watchdog and increments the input's entropy"""
Expand Down Expand Up @@ -310,6 +315,10 @@ def _handle_touch_input():
while self.touch_value() == PRESSED:
self.wdt_feed_inc_entropy()
self.buttons_active = False

# Check if was a swipe
if self.swipe_none_value() == PRESSED:
return SWIPE_FAIL
if self.swipe_right_value() == PRESSED:
return SWIPE_RIGHT
if self.swipe_left_value() == PRESSED:
Expand All @@ -318,6 +327,8 @@ def _handle_touch_input():
return SWIPE_UP
if self.swipe_down_value() == PRESSED:
return SWIPE_DOWN

# was a simple touch
return BUTTON_TOUCH

if btn in [BUTTON_ENTER, BUTTON_PAGE, BUTTON_PAGE_PREV]:
Expand Down
Loading
Loading