Skip to content

Files

Latest commit

 

History

History

j-Movement

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

j-Movement

This component captures basic keyboard keys like arrows, enter and esc.

  • jComponent v19|v20

Methods:

  • component.assign(ondown(key, e), [onunassign])

The assign method will clear previous assignments and applies new ones. We recommend calling the assign method to your elements when they are focused, or the user clicks on them.

Usage:

SETTER('movement/assign', function(key, e) {
	// @key {String}
	// @ {Event}
	switch (key) {
		case 'up':
		case 'down':
		case 'right':
		case 'left':
		case 'esc':
		case 'enter':
			break;
	}
});

Author