• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Setting focus on a popup helper app with all data fields disabled

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting focus on a popup helper app with all data fields disabled

    When creating a helper app that pops up via a URL Widget, where all the fields are disabled, the app does not have focus set without clicking on the app somewhere. Is there a way to have focus set? I currently have a script on the app that allows the function keys F12 and F3 to behave the same way they do on the green screen, but the they do not work unless focus is set on the app.

    image.png??

  • #2
    Could you please share your script so we can better understand how you're listening for the function keys? Thanks

    Comment


    • #3
      I use the open-source code located at https://www.openjs.com/scripts/event...ts/shortcut.js
      And added as the StartUp script and at the end of it, I add this

      /*


      remove existing shortcuts

      */
      shortcut.remove("F3"); //Exit
      shortcut.remove("F4"); //List
      shortcut.remove("F6"); //Create or New
      shortcut.remove("F12"); //Cancel

      /*

      Add F3, F4, F6, F12 shortcuts

      */

      shortcut.add("F3",function() {
      fireEvent('F3Pressed');
      });

      shortcut.add("F4",function() {
      fireEvent('F4Pressed');
      });

      shortcut.add("F6",function() {
      fireEvent('F6Create');
      });

      shortcut.add("F12",function() {
      fireEvent('F12Pressed');
      });
      ?

      Comment


      • #4
        the code works fine as long as the helper app is focused (by clicking on it). Is it not possible to set focus on a display only helper app?

        Comment


        • #5
          So you have a helper pgm that disables all the fields in the form?

          Comment


          • #6
            FYI, in the next 6.3 update, you will be able to add behaviors for a function key when pressed, if you choose to do so. When adding an event listener on the local tab, you will see a new checkbox to show function key events. Once a function key event is added, you can add behaviors to it, just like other local events.

            Screenshot 2025-04-25 at 9.50.32?AM.png

            Screenshot 2025-04-25 at 9.51.19?AM.png

            Comment

            Working...
            X