Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hello ;

i am wanting a Tutorial or advice on building a keyboard using repeating fields.

can someone point me in right direction?

thanks

-

I never thought of doing that, but it seems like a clever idea. Is this for some kind of touchscreen kiosk?

First, I think you should read about Bruce Robertson's virtual list technique. (Just Google it and you should find a couple of examples.) You'd want a repeating field with as many repetitions as there are characters in the alphabet you want your keyboard to type; say, 37 for A-Z, 0-9, and space, for example. When you navigate to a layout using the keyboard, you'd set a global variable ($$KEYBOARD.ALPHABET) with a string of all the characters you want on the keys, in order. For example:

Set Variable [$$KEYBOARD.ALPHABET; Value:"1234567890qwertyuiopasdfghjklzxcvbnm " // keys in row order of qwerty keyboard]

Use a calculated repeating field defined something like this:

Middle ( $$KEYBOARD.ALPHABET ; Get ( CalculationRepetitionNumber ) ; 1 )

This field serves as both the labels for the keys and the values typed by the keys. Arrange several keyboard-lookalike copies of this field on your layout, and set each copy to use a different repetition of the repeating field via the Data tab of the Inspector Palette. Also set each "key" of the keyboard to be non-enterable, just to be safe, even though they'll all be defined as buttons later. Define a script that uses the "Insert Calculated Text" script step to insert the script parameter at the current cursor position in whatever the active field is. Make each keyboard key a button that calls this script, passing that repetition's value as the parameter.

If you also want to have a "Shift" key, that button can swap out the $$KEYBOARD.ALPHABET for another set of values, "!@#$%^&*()QWERTYUIOPASDFGHJKLZXCVBNM ", for example.

  • Author

Yes it is for a kiosk type aspect to my solution for touchscreen ability.

Talk about an example. Thanks JBAnte. Will do. Saw an example over @ Filemakermagazine.com as well. Little different than what you suggested, but i am sure with all of this, i can figure it out.

-i

  • Author

Define a script that uses the "Insert Calculated Text" script step to insert the script parameter at the current cursor position in whatever the active field is. Make each keyboard key a button that calls this script, passing that repetition's value as the parameter.

The only thing i see is" Insert Text; or Insert Calculated Result. HOwever,

I also dont know how to get current cursor position or is that a custom function?

-i

  • Author




[b]InsertCalcText Copy[/b]

[b]Go to Field [/b][ sd_Dec2011::text ]

[b]Insert Calculated Result [/b][ sd_Dec2011::text[Get ( CalculationRepetitionNumber )]; Get(ScriptParameter) ] [ Select ]

Only issue now is making sure not to overwrite what was already written.

See also:

http://fmforums.com/forum/topic/58194-can-you-script-a-10-key-pad/

And, of course:

http://fmforums.com/forum/topic/52413-using-a-keypad-graphic-to-enter-numbers-in-kiosk-mode/page__view__findpost__p__246087

  • Author

Works like a charm. Thanks Comment & Jeremy!!! Appreciate that.

Only thing i changed was instead of using onLoad Script to load the keyboard's keys, i did the following:


Let ( [

    row1 = "1234567890";

    row2 = "qwertyuiop";

    row3 = "asdfghjkl";

    row4 = "zxvbnm";

    alpha = row2 & row3 & row4

] ;



    Middle ( row1 & alpha ; Get( CalculationRepetitionNumber) ; 1 ) //this i dont completely understand, but that requires studying the middle function i am sure.



)

  • 3 months later...
  • Author

I never thought of doing that, but it seems like a clever idea. Is this for some kind of touchscreen kiosk?

First, I think you should read about Bruce Robertson's virtual list technique. (Just Google it and you should find a couple of examples.) You'd want a repeating field with as many repetitions as there are characters in the alphabet you want your keyboard to type; say, 37 for A-Z, 0-9, and space, for example. When you navigate to a layout using the keyboard, you'd set a global variable ($$KEYBOARD.ALPHABET) with a string of all the characters you want on the keys, in order. For example:

Set Variable [$$KEYBOARD.ALPHABET; Value:"1234567890qwertyuiopasdfghjklzxcvbnm " // keys in row order of qwerty keyboard]

Use a calculated repeating field defined something like this:

Middle ( $$KEYBOARD.ALPHABET ; Get ( CalculationRepetitionNumber ) ; 1 )

This field serves as both the labels for the keys and the values typed by the keys. Arrange several keyboard-lookalike copies of this field on your layout, and set each copy to use a different repetition of the repeating field via the Data tab of the Inspector Palette. Also set each "key" of the keyboard to be non-enterable, just to be safe, even though they'll all be defined as buttons later. Define a script that uses the "Insert Calculated Text" script step to insert the script parameter at the current cursor position in whatever the active field is. Make each keyboard key a button that calls this script, passing that repetition's value as the parameter.

If you also want to have a "Shift" key, that button can swap out the $$KEYBOARD.ALPHABET for another set of values, "!@#$%^&*()QWERTYUIOPASDFGHJKLZXCVBNM ", for example.

You now Jeremy, i am just getting back to this as using shift has become an issue. You were right from the beginning.

You da man!!

thanks for that.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.