When FileMaker released with support for using the Char() and Code() functions, the fine folks over at SixFriedRice released a useful tool for capturing the keyboard code for key presses.
Here's the original post: Script Triggers: Using the Keystroke Trigger
The file has also been attached for archival purposes.