addHotKey

adds the hot key handler

void addHotKey(string key,function handler, [object|string view] );
keystringstring with the key name
handlerfunctionthe hot key handler
viewobject|stringoptional: providing a view reference will add the handler to that view specifically; if set as a string, the hotkey will be added to all the relevant view instances (the string must be a valid view name)

Example

//global key handler
webix.UIManager.addHotKey("up", my_function);
 
//activates the handler only when focus is inside of myview
webix.UIManager.addHotKey("ctrl-up", my_function, myview);

See also
Back to top