It would probably be easiest if YOU gave some examples of what you are trying to do. I am a bit confused by your post.
II am designing an invoicing/inventory/purchasing system for my business and many of the layouts have buttons for various scripts. Some of the buttons will have corresponding custom menu items, so keyboard shortcuts for those are straightforward. Buttons with shortcuts will have an underlined letter so that users will know what the shortcut would be. Most of the standard FileMaker keyboard shortcuts will be disabled because the solution will be using custom menus throughout.I would rather not create a custom menu item for every single button throughout the solution for the purpose of creating a keyboard shortcut. My question is can I use OnLayoutKeystroke to create a keyboard shortcut which would trigger a script on specific layouts? And if so, could you show me a simple example to get me startedI hope this clears up my question! Sorry for the confusion.
Sorry for the delayed response.
In short, you cannot use OnLayoutKeystroke to create traditional shortcuts that use the apple or control key. Potentially, you could use a letter alone to trigger a script. For example, you could use a script like this:
If [ IsEmpty ( Get ( ActiveFieldName ) ) // there is no active field ]
If [ Get ( TriggerKeystroke ) = "a" ]
Show All Records
ElseIf [ Get ( TriggerKeystroke ) = "f" ]
Enter Find Mode [ ]
ElseIf [ Get ( TriggerKeystroke ) = "n" ]
Exit Script 
That would allow the user to type any of the keys to run the commands when a field is not active.
The initial test is to ensure that the user is not trying to type into a field.
The Exit Script with false is needed to cancel the trigger event (typing the character).
I have not fully tested this to see what other effects it might have. But it might be what you are looking for?
Thanks for the reply. I'm not sure if I will use this function in my application, but I certainly will experiment to get a better understanding of how it works. You've given me a good starting point - thanks again!