There is no trigger named "keymodified". There IS a trigger named OnObjectKeystroke.
The instant you depress a key when the focus is in the field where you set this object, the trigger is "tripped" this is a "before the event" trigger so you can end your script with Exit Script [False] to keep the key pressed from entering a character into the field when you don't want it to be entered. This also allows you to use go to field or go to next field to put the focus into another field without the keystroke event then popping you back into the field to enter that character.
Get ( TriggerKeystroke ) and Get ( TriggerModifyKeys ) will return their respective values from within any script that is performed by this script trigger.
For more on script triggers and which can be affected by Exit Script [False], see the table found in Setting up script triggers in FileMaker Help.