Jump to content

This topic is 4693 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello ;

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

can someone point me in right direction?

thanks

-

Posted

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.

Posted

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

Posted

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

Posted




[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.

Posted

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...
Posted

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.

This topic is 4693 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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