4 Replies Latest reply on Feb 6, 2012 11:15 PM by Mfun

    How to open iOS keyboard to accept keystrokes from onLayoutKeystroke

    Mfun

      I have script to trap keyboard keystrokes using OnLayoutKeystroke and it works fine in FMP. However, in FM Go the keyboard does not appear (because the cursor is not in a field), this sort of makes it difficult to input anything. Anyone come across this before and should this be considered a bug? The obvious solution is for a future version to have FM Go specific script steps to open/close the keyboard, or am I missing something obvious. If it is in FMI speak "expected behaviour", does anyone have a workaround (besides creating a pseudo keyboard in a layout specifically for FM Go)? Thanks.

        • 1. Re: How to open iOS keyboard to accept keystrokes from onLayoutKeystroke
          chris.schmitz

          The keyboard in Go (and any other iOS application I believe) will not come up if there is nothing active to add text into or if you have a bluetooth keyboard tethered. If your field is not selected (does not have a cursor in it) then the keyboard has no reason to come up. What's build that's keeping you from selecting the field to enter the text?

           

          Do you have any triggers attached to the field itself that would force the user out of the field once they select it?

           

          I created an onLayoutKeystroke script trigger that wrote any keystroke on the layout into a notes field and it worked fine on my computer and on my iphone so the process does work. I'd imagine that if you track down what's keeping you from entering the field in the first place you'll find what's holding you up.

          • 2. Re: How to open iOS keyboard to accept keystrokes from onLayoutKeystroke
            Mfun

            Thanks, that pretty much confirms what I thought. I've had other solutions using onLayoutKeystroke where a field is active and works in Go just as well (just slower). The problem I have with this one is that I'm entering into a 2 dimensional matrix in both horizontal and vertical directions. Each cell is a repetition and I 'show' where the cursor is by graphically highlighting the current cell. The other issue is, the script can handle multiple repeating fields representing different matrices, so I'm using a set field by name to put the entered value into the cell. Since entering a value in a cell requires the input to move to the next cell (horizontally or vertically), I need an equivalent 'go to field by name', unless there's some sort of work around.

            • 3. Re: How to open iOS keyboard to accept keystrokes from onLayoutKeystroke
              RayCologon

              Mfun wrote:

              ...Each cell is a repetition and I 'show' where the cursor is by graphically highlighting the current cell....

               

              Hi Michael,

               

              Is there any reason why you can't actually make the relevant cell active - with or without grpahically highlighting it? If so, that would cause the keyboard to display (if there's no bluetooth keyboard available) and solve your problem.

               

              Regards,

              Ray

              ------------------------------------------------

              R J Cologon, Ph.D.

              FileMaker Certified Developer

              Author, FileMaker Pro 10 Bible

              NightWing Enterprises, Melbourne, Australia

              http://www.nightwingenterprises.com

              ------------------------------------------------

              • 4. Re: How to open iOS keyboard to accept keystrokes from onLayoutKeystroke
                Mfun

                Hi Ray,


                thanks for your response. Originally I didn't want to make the cell active for cosmetic reasons, I didn't want a flashing cursor. Also, since I'm entering data into a matrix, I need to automatically move the focus to the 'next' cell after the current cell is full (usually 1 character), it also needs to data both horizontally or vertically. I thought about keeping the cell active, but since the script is re-usable and the same script could also be used for multiple matrices, I pass it the name of the field and I have to use a set field by name. Like I said before, everything's fine in FMP, I assume it probably works with a bluetooth keyboard in FM Go. The only other option I can think of is to have a faux keyboard on the FM Go layouts - not the ideal solution, but it does have the advantage of allowing me to change the keyboard layout. There's no urgency in this as no client solution relies on this, it's basically just a brain exercise, I just thought it's about time I wrote some matrix routines :-)


                regards,


                Michael