• function

key

 

Types a single key. The key should be a string that matches a [Syn.static.keycodes].

The following sends a carridge return to the 'name' element.

Syn.key('\r','name')
For each character, a keydown, keypress, and keyup is triggered if appropriate.