From d1943b3bfb5533e341f3a48999a1de3a8be0b0d7 Mon Sep 17 00:00:00 2001 From: Dave Solares <50599569+PolygonalSun@users.noreply.github.com> Date: Tue, 19 Jul 2022 10:08:06 -0700 Subject: [PATCH] Added mouse buttons 4 and 5 to InputManager mouse handling --- packages/dev/core/src/Inputs/scene.inputManager.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/dev/core/src/Inputs/scene.inputManager.ts b/packages/dev/core/src/Inputs/scene.inputManager.ts index 4f0753c9263..841e27e8f76 100644 --- a/packages/dev/core/src/Inputs/scene.inputManager.ts +++ b/packages/dev/core/src/Inputs/scene.inputManager.ts @@ -877,7 +877,13 @@ export class InputManager { this._deviceSourceManager.onDeviceConnectedObservable.add((deviceSource) => { if (deviceSource.deviceType === DeviceType.Mouse) { deviceSource.onInputChangedObservable.add((eventData) => { - if (eventData.inputIndex === PointerInput.LeftClick || eventData.inputIndex === PointerInput.MiddleClick || eventData.inputIndex === PointerInput.RightClick) { + if ( + eventData.inputIndex === PointerInput.LeftClick || + eventData.inputIndex === PointerInput.MiddleClick || + eventData.inputIndex === PointerInput.RightClick || + eventData.inputIndex === PointerInput.BrowserBack || + eventData.inputIndex === PointerInput.BrowserForward + ) { if (attachDown && deviceSource.getInput(eventData.inputIndex) === 1) { this._onPointerDown(eventData); } else if (attachUp && deviceSource.getInput(eventData.inputIndex) === 0) {