MCPcopy
hub / github.com/witheve/Eve / e_button

Function e_button

src/codemirror.js:8160–8169  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

8158
8159 function e_target(e) {return e.target || e.srcElement;}
8160 function e_button(e) {
8161 var b = e.which;
8162 if (b == null) {
8163 if (e.button & 1) b = 1;
8164 else if (e.button & 2) b = 3;
8165 else if (e.button & 4) b = 2;
8166 }
8167 if (mac && e.ctrlKey && b == 1) b = 3;
8168 return b;
8169 }
8170
8171 // EVENT HANDLING
8172

Callers 2

onMouseDownFunction · 0.85
leftButtonSelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected