nl_tokens: handles a character key event
pl_tokens: function _handleKey ( character , modifiers , e ) { var <mask> = this ; if ( ! self . recording ) { _origHandleKey . apply ( self , arguments ) ; return ; } // remember this character if we're currently recording a sequence if ( e . type == 'keydown' ) { if ( character . length === 1 && _recordedCharacterKey ) { _recordCurrentCombo ( ) ; } for ( i = 0 ; i < modifiers . length ; ++ i ) { _recordKey ( modifiers [ i ] ) ; } _recordKey ( character ) ; // once a key is released, all keys that were held down at the time // count as a keypress } else if ( e . type == 'keyup' && _currentRecordedKeys . length > 0 ) { _recordCurrentCombo ( ) ; } }