How to intercept and evaluate the "Light" button on F3

Former Member
Former Member
I am running short of buttons or events with my Golf Scorecard App, and I tried to intercept the "Light" button - which works beautifully on the simulator.

Tested on the F3 nothing happens.

Any ideas?

Apparently there are also no events that would distinguish a long press from a short one (with the exception that invokes the menu, of course), right? It would be nice to have a few more options to get user input without forcing the user to go through the menu (too slow and tedious during activities, even Golf...).

My code looks like this (the example shows 3 buttons being handled. All three work on the simulator. Only the first and last work on the F3):

if( evt.getKey() == Ui.KEY_DOWN ) {
//Sys.println("down");
strokes[hole-1] = strokes[hole-1] - 1;
if (strokes[hole-1] < 0) {
strokes[hole-1] = 0;

}
if (onGreen == true) {
putts[hole-1] = putts[hole-1] - 1;
if (putts[hole-1] < 0) {
putts[hole-1] = 0;
}
}
validstrokeposition = false;
}
if( evt.getKey() == Ui.KEY_LIGHT ) {
//Sys.println("light");
if (onGreen == false) {
onGreen = true;
} else {
onGreen = false;
}
}
if( evt.getKey() == Ui.KEY_ENTER ) {
//Sys.println("enter");
nextHole();
review_round = true;
}
  • Former Member
    Former Member over 10 years ago
    The light key shouldn't work on the simulator. The light key is not passed to ConnectIQ apps.

    We have key pressed/released events planned for a future release, which will allow apps to implement their own held keys if desired.
  • Former Member
    Former Member over 10 years ago
    The light key shouldn't work on the simulator. The light key is not passed to ConnectIQ apps.

    We have key pressed/released events planned for a future release, which will allow apps to implement their own held keys if desired.


    Thanks, Brian. The light key does work on the simulator.

    Would be nice to make use of that physical button on the actual F3 as well. But if that's not planned, I'll wait for additional events to be supported in an SDK update.
  • You found one of those things that probably shouldn't work in the simulator....
  • Former Member
    Former Member over 10 years ago
    You found one of those things that probably shouldn't work in the simulator....

    ...or, preferred, should work on the real device as well. :rolleyes:
  • I forgot to update yesterday, but I've reported this as a simulator bug. It appears to only affect the Fenix 3 in the simulator.