CKEDITOR.plugins.undo.KeyEventsStack
This class represents a stack of pressed keys and stores information about how many input events each key press has caused.
Filtering
Properties
-  
Defaults to
[] 
Methods
constructor() → KeyEventsStackCKEDITOR.plugins.undo.KeyEventsStack#constructorcleanUp( event )CKEDITOR.plugins.undo.KeyEventsStack#cleanUpCleans the stack based on a provided
keydownevent object. The rationale behind this method is that some keystrokes cause thekeydownevent to be fired in the editor, but not thekeyupevent. For instance, Alt+Tab will firekeydown, but since the editor is blurred by it, then there is nokeyup, so the keystroke is not removed from the stack.Parameters
event : event
getLast( [ keyCode ] ) → ObjectCKEDITOR.plugins.undo.KeyEventsStack#getLastReturns the last key recorded in the stack. If
keyCodeis provided, then it will return the last record for thiskeyCode.Parameters
[ keyCode ] : Number
Returns
ObjectLast matching record or
null.
getLastIndex( [ keyCode ] ) → NumberCKEDITOR.plugins.undo.KeyEventsStack#getLastIndexReturns the index of the last registered
keyCodein the stack. If nokeyCodeis provided, then the function will return the index of the last item. If an item is not found, it will return-1.Parameters
[ keyCode ] : Number
Returns
Number
getTotalInputs() → NumberCKEDITOR.plugins.undo.KeyEventsStack#getTotalInputsincrement( keyCode )CKEDITOR.plugins.undo.KeyEventsStack#incrementIncrements registered input events for stack record for a given
keyCode.Parameters
keyCode : Number
push( keyCode )CKEDITOR.plugins.undo.KeyEventsStack#pushPushes a literal object with two keys:
keyCodeandinputs(whose initial value is set to0) to stack. It is intended to be called on thekeydownevent.Parameters
keyCode : Number
remove( keyCode )CKEDITOR.plugins.undo.KeyEventsStack#removeRemoves the last record from the stack for the provided
keyCode.Parameters
keyCode : Number
resetInputs( [ keyCode ] )CKEDITOR.plugins.undo.KeyEventsStack#resetInputsResets the
inputsvalue to0for a givenkeyCodeor in entire stack if akeyCodeis not specified.Parameters
[ keyCode ] : Number