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

Suppress character entry when using OnLayoutKeystroke?

Featured Replies

Hi all -

I've recently started replacing all the plug-in based script triggers in our solution with FileMaker script triggers.

I'm using the OnLayoutKeystroke trigger and I'm wondering if anyone knows a way to prevent the character that's associated with the keystroke from being entered into the current field.

I'm using a seldom used keystroke("`") to bring up a pop-up window and I don't want that character entered into the field.

Thanks for any ideas!

Try returning a value of False from your triggered script using Exit Script[0].

Edited by Guest

If a field is active, then the keystroke goes there, not to the layout.

Doesn't 'exit script[false]' stop the character from being entered?

That is what I make of this

The way I understand it, an active field (and you mention a current field) will receive the keystroke before the layout. That is, it'll take the keystroke before your OnLayoutKeystroke trigger fires. You need an OnObjectKeystroke.

Which is, I believe, what comment said.

No, because the script needs to run in order to return false.

it'll take the keystroke before your OnLayoutKeystroke trigger fires.

Actually, it will take the keystroke and that's it. The OnLayoutKeystroke trigger will NOT fire.

  • Author

Thanks all for taking the time to reply to my question. As always, I appreciate it.

TheTominator and Reinder your idea worked great. All I really had to do was read the FileMaker Help topic(the one Reinder included a link to) a little more carefully.

Exit Script[0] does the trick.

Thanks a bunch!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.