new Shortcut( seq, desc, func )

Description

Self-decorating class useful for integrating with a hotkey service.

Parameters
Name Type Description
seq string

Key sequence to activate this function.

desc string

Human readable documentation about this function.

func NexusHoratio.web~SimpleFunction

Function to wrap, usually in the form of an arrow function. Keep JS this magic in mind!

Examples
// Wrap an arrow function:
			foo = new Shortcut(
			  'c-c',
			  'Clear the console.',
			  () => {
			    console.clear();
			    console.log('I did it!', this);
			  }
			);
			
			// Search for instances:
			const keys = [];
			for (const prop of Object.values(this)) {
			  if (prop instanceof Shortcut) {
			    keys.push({seq: prop.seq, desc: prop.seq, func: prop});
			  }
			}
			... Send keys off to service ...
Details

Function