MCPcopy Index your code
hub / github.com/DHTMLX/gantt / addModifierNames

Function addModifierNames

samples/common/codehighlight/codemirror.js:6783–6790  ·  view source on GitHub ↗
(name, event, noShift)

Source from the content-addressed store, hash-verified

6781 }
6782
6783 function addModifierNames(name, event, noShift) {
6784 var base = name;
6785 if (event.altKey && base != "Alt") { name = "Alt-" + name; }
6786 if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
6787 if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }
6788 if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
6789 return name
6790 }
6791
6792 // Look up the name of a key as indicated by an event object.
6793 function keyName(event, noShift) {

Callers 2

keyNameFunction · 0.85
handleMappedButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected