input events are not supported for data fields?

https://developer.garmin.com/connect-iq/api-docs/Toybox/WatchUi/InputDelegate.html

"

InputDelegate handles basic input events.

Note that on wearable products, input events are not supported for data fields.

"

Is there any way around this for a datafield/activity?  I would like to change the "lap button" to be "play/next song".

Top Replies

All Replies

  • This makes no sense. If your device supports music then you already have this, long press the music button (usually == down button)

    If it doesn't support music then what are you trying to do? There's no way to have an inout only to your DF. You can however catch the lap button being pressed: https://developer.garmin.com/connect-iq/api-docs/Toybox/WatchUi/DataField.html#onTimerLap-instance_function but all the other datafields will also catch it, so you'll add a real lap to your activity.

    You could create an app instead, and record the activity, while you have full* control of the buttons

    *) not really, because you can't catch the light button or shortcuts, but deffinitely more than you can do in a DF

  • Because I don't use the lap button and I do change songs frequently and a single press to skip a song is preferable than long pressing music followed by a short press.  I have a useless button just sitting there doing nothing....  so that's the reason.

    Your first sentence is really a pet peeve of mine when people respond that way.  Just because you don't understand something doesn't mean it's not worth doing.  But anyway you followed it up with being helpful (or trying).

    I'll look into apps but I don't have a means of signing up for the dev program if it requires that.

  • Then maybe see if you can set up a shortcut for "Next song". That way you would maybe be able to do a long press on the lap button (and not need the short press after)

  • I'll look into apps but I don't have a means of signing up for the dev program if it requires that.

    TL;DR unfortunately there's no way to do what you want afaik, either as a Connect IQ app or with native functionality.

    By "app" he meant a CIQ device app / watch app, which is just another kind of CIQ app type (as is a CIQ data field). The difference is that a CIQ data field enhances a built-in activity (such as running) while a CIQ device app replaces it. That's the reason input events aren't allowed in CIQ data fields - because the built-in activity handles all the input. On Edge devices (but not watches), CIQ data fields do support touch input.

    Developing a device app won't help because device apps don't let you control music. Only music provider apps like Spotify can control music, but that's clearly not what you have in mind.

    You don't need to sign up for a dev program to make CIQ apps, although you do need to verify your identity if you want your apps to be available in EU. (If you're making an app for private purposes, you can always sideload the app and forgo the store completely.)

    The other suggestion of setting a "shortcut" (aka hot key) won't help, because the only music-related hot key is "Music Controls" (which opens the music controls).

    I def feel your pain about the music controls, especially on 5-button touchscreen watches. Everything is optimized for buttons, which would be fine if they also fully utilized the touchscreen (which they don't, since touch is optional on 5-button watches.) So you end up with an interface that would work perfectly if the touchscreen was disabled and nothing more. Ideally I'd like to see all or most of the controls on the main music page, even if some require touch. Similarly, it would be great if there was a music controls data page in activity where at least the most useful controls were accessible via touch (to avoid extra button presses when you do have touch enabled.)

    I know this isn't what you want to hear, but your best bet is to run with earbuds that have controls to skip to the next/previous track. (Yeah I'm aware some earbuds have pretty limited controls - in some cases you have to choose 1 or 2 of controlling the volume, controlling noise cancelling, or skipping tracks.)

  • I have a useless button just sitting there doing nothing....

    Another thing about Connect IQ is that Garmin is pretty strict about controlling the user experience on their devices, which is another reason CIQ data fields can't override most things (such as the lap button), and even device apps have limits on what they can do.

    CIQ apps don't come close to having the freedom of a general purpose app that you'd see on a phone or a different kind of smartwatch. (To be fair, most of the physical controls on an Apple Watch are reserved for system use too.)

  • Yeah, I can understand them not wanting to open that can of worms (please let me soft lock my own watch).  But in all honesty, there are quite a few disappointments all around and it's a let down that you can't have full control of your own data and watch.