Acknowledged

Feature request: Suppress user shortcuts

I'd like to let my user cycle through input/menus quickly in my app by holding the up or down keys. I built an implementation using onKeyPressed() and onKeyReleased() that can detect the state of the key and works well on a simulator.

Unfortunately on my Fenix 6, holding the down key causes the music player to open on top of my app. Worse still, when it launches it prevents the onKeyReleased() callback from reaching my app/view, so when I return to my app it thinks the key is still being held and is caught cycling endlessly until my code receives more user input and detects the issue.

This known limitation has been raised before: https://forums.garmin.com/developer/connect-iq/f/discussion/351737/disable-shortcut#pifragment-1298=1

Long presses are a highly useful feature in general. By enabling two different behaviors for each key, it effectively doubles the size of the user input space and enables much richer functionality. So I'd really like to see support for long presses.

Here is my feature request:

1) I would like to see the API changed so that the developer can decide to suppress a user shortcut, which may not be appropriate/intended behavior in the context of some apps. Maybe this can happen whenever true is returned from onKeyPressed()?

Additionally, the behavior I described where my app loses track of user input is not ideal.  I would like to see either or both of the following features added to enable workarounds:

2) Provide a mechanism where I can access the current state of the buttons, so my view/delegate can check in onShow() whether a key is still held and prevent an erroneous long press behavior.

3) Provide a mechanism to check whether there is a shortcut registered on a button. This way if there is, an app can smartly disable long press behavior in the context, but in other contexts/for other users it can still provide the richer functionality.

Parents
  • Even though as a developer I wanted to do something similar, as a user I might not be happy if your app would be able to "disable" my system shortcut. For example I might want to send you a screenshot, and your app blocks me doing it because it uses the same shortcut.

    However as a user I could live with the following: if a long keypress shortcut is not defined in the system, then that would work in the app. However as an app developer probably this would not be very useful...

Comment
  • Even though as a developer I wanted to do something similar, as a user I might not be happy if your app would be able to "disable" my system shortcut. For example I might want to send you a screenshot, and your app blocks me doing it because it uses the same shortcut.

    However as a user I could live with the following: if a long keypress shortcut is not defined in the system, then that would work in the app. However as an app developer probably this would not be very useful...

Children
No Data