• I have created a menu on a Pixl, and this is normally controlled with the small buttons on the card.

    I would like, instead, to control this menu with external buttons connected to D1 ... D4.

    To understand what the internal events handlers of the menu really do, I tried to replace the setWatch calls by the suggestions of the link Graphical Menu:

    setWatch(function() {
      m.move(-1); // up
    }, BTN1, {repeat:true,debounce:50,edge:"rising"})­;
    
    setWatch(function() {
      m.move(1); // down
    }, BTN4, {repeat:true,debounce:50,edge:"rising"})­;
    
    setWatch(function() {
      m.select(); // select
    }, BTN3, {repeat:true,debounce:50,edge:"rising"})­;
    

    It works for a simple menu, but not for editing the value of a number, for example.

    So the questions are:

    1. Is it possible to reuse the event handlers of the menu (up/down etc...) and call them from another type of event ? (D1 ...)
    2. Or is there another way to use a menu with different events ?

    Many thanks in advance.

About

Avatar for rchateauneu @rchateauneu started