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.

Scripting buttons for touch screen keyboard

Featured Replies

Hi all. I'm working on a project that utilizes touch screen monitors and I am wanting to find the most efficient way of scripting an on-screen keyboard for users to enter data when prompted. The typical QWERTY keyboard with backspace, left/right arrows, Enter, etc.

If possible, if someone could direct me on how to script a single letter (say, "Q"), spacebar and Backspace I should be able to figure out the rest. Many thanks.

4 hours ago, madman411 said:

how to script a single letter (say, "Q"), spacebar and Backspace

For any character, including space, you could do:

Insert Calculated Result [ Get ( ScriptParameter ) ]

Backspace is a bit more complex:

If [ not Get ( ActiveSelectionSize ) ]
  Set Selection [ Start PositionGet ( ActiveSelectionStart ) - 1; End PositionGet ( ActiveSelectionStart ) ]
End If 
Clear [ ]

 

  • Author
21 hours ago, comment said:

For any character, including space, you could do:


Insert Calculated Result [ Get ( ScriptParameter ) ]

Backspace is a bit more complex:


If [ not Get ( ActiveSelectionSize ) ]
  Set Selection [ Start PositionGet ( ActiveSelectionStart ) - 1; End PositionGet ( ActiveSelectionStart ) ]
End If 
Clear [ ]

 

Comment - your backspace works perfectly. However I'm not sure if the get(scriptparameter) is functioning as intended, though admittedly utilizing a script parameter isn't something I'm versed very well in. The User is presented a pop-up dialogue with the keyboard laid out so it can be hidden if necessary. The script I have attached to "keys" so far is:

 

Insert Calculated Result [Target: testtext ; Get(ScriptParameter)]
Go to Object [ Object Name: "keyboard" ]

Am I missing a step?

If you have a script that inserts the script parameter, and the button is set to perform the script with a parameter of "Q", then the character "Q" will be inserted at the current insertion point. 

I am not sure I understand your description. If you exit the target field after each character, you will lose the current insertion point - thus preventing the user from editing previously entered text.

Note that there are other complications. You specifically asked for a simple starter -but implementing shift/caps lock, for example, is not as simple.

 

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.