January 7, 201016 yr 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!
January 7, 201016 yr Try returning a value of False from your triggered script using Exit Script[0]. Edited January 7, 201016 yr by Guest
January 7, 201016 yr Doesn't 'exit script[false]' stop the character from being entered? That is what I make of this
January 7, 201016 yr 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.
January 7, 201016 yr 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.
January 7, 201016 yr 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