Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core/emu): handle arrow buttons as swipes #3619

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

obrusvit
Copy link
Contributor

The PR adds capability to perform swipe gestures using arrow keys for touch models.

Current implementation. Arrow key dictates direction of swipe.

  • intuitive for following some instructions (e.g. "Swipe up" is performed by arrow key "Up")
  • not intuitive for scrolling (the direction is mirrored, scroll down is performed by arrow key "Up")

I can switch it up but it depends on what's more useful.

@obrusvit obrusvit self-assigned this Mar 17, 2024
@obrusvit obrusvit requested a review from prusnak as a code owner March 17, 2024 17:28
@obrusvit obrusvit added the emulator only Issue which does not appear on the physical device - but on emulator only. label Mar 17, 2024
@obrusvit obrusvit requested review from cepetr and removed request for prusnak March 17, 2024 17:29
@Hannsek
Copy link
Contributor

Hannsek commented Mar 18, 2024

I believe it should be vice versa. When you want to swipe up, you should use down arrow.

@obrusvit obrusvit force-pushed the obrusvit/sim-use-arrow-as-swipe branch 2 times, most recently from ef4db2d to 9ca45d0 Compare March 20, 2024 11:32
@obrusvit
Copy link
Contributor Author

Updated based on comments AFK:

  • there should be no interference of mouse events and button events
  • the direction of arrow buttons determine scroll direction (i.e. opposite of swipe)

core/embed/trezorhal/unix/touch/touch.c Outdated Show resolved Hide resolved
core/embed/trezorhal/unix/touch/touch.c Outdated Show resolved Hide resolved
core/embed/trezorhal/unix/touch/touch.c Outdated Show resolved Hide resolved
core/embed/trezorhal/unix/touch/touch.c Outdated Show resolved Hide resolved
Copy link

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T2B1 Safe 3 3280 test(screens) main(screens) 2724
T3T1 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

core/embed/trezorhal/unix/touch/touch.c Outdated Show resolved Hide resolved
core/embed/trezorhal/unix/touch/touch.c Show resolved Hide resolved
core/embed/trezorhal/unix/touch/touch.c Outdated Show resolved Hide resolved
@obrusvit obrusvit force-pushed the obrusvit/sim-use-arrow-as-swipe branch from bedeb8a to 29d192a Compare March 21, 2024 10:39
@obrusvit obrusvit force-pushed the obrusvit/sim-use-arrow-as-swipe branch from 29d192a to adcb613 Compare March 21, 2024 10:45
@obrusvit obrusvit merged commit 54468ab into main Mar 21, 2024
75 checks passed
@obrusvit obrusvit deleted the obrusvit/sim-use-arrow-as-swipe branch March 21, 2024 11:37
@bosomt
Copy link

bosomt commented Jun 13, 2024

QA OK

Info:

  • Suite version: desktop 24.6.1 (9d8fc586194255068350256208cbd828cc880876)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/24.6.1 Chrome/118.0.5993.159 Electron/27.3.8 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T3T1 2.7.2 regular (revision da75d8f)
  • Transport: BridgeTransport 2.0.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emulator only Issue which does not appear on the physical device - but on emulator only.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants