(e)
| 411 | k === 'KeyD' ? 'ArrowRight' : k : k; |
| 412 | } |
| 413 | function onMouseDown(e) |
| 414 | { |
| 415 | if (isTouchDevice && touchInputEnable) return; |
| 416 | |
| 417 | // fix stalled audio requiring user interaction |
| 418 | if (soundEnable && !headlessMode && audioContext && !audioIsRunning()) |
| 419 | audioContext.resume(); |
| 420 | |
| 421 | isUsingGamepad = false; |
| 422 | inputData[0][e.button] = 3; |
| 423 | |
| 424 | const mousePosScreenLast = mousePosScreen; |
| 425 | mousePosScreen = mouseEventToScreen(vec2(e.x,e.y)); |
| 426 | mouseDeltaScreen = mouseDeltaScreen.add(mousePosScreen.subtract(mousePosScreenLast)); |
| 427 | |
| 428 | if (inputPreventDefault && e.cancelable && document.hasFocus()) |
| 429 | e.preventDefault(); |
| 430 | } |
| 431 | function onMouseUp(e) |
| 432 | { |
| 433 | if (isTouchDevice && touchInputEnable) return; |
nothing calls this directly
no test coverage detected