Identifies the type of input device currently being used. Useful for displaying appropriate button prompts to the user.
import { InputDeviceType } from '@happy-pixels/input-forge';manager.activeInputDevice$.subscribe((device) => { if (device === InputDeviceType.Xbox) { showXboxPrompts(); }}); Copy
import { InputDeviceType } from '@happy-pixels/input-forge';manager.activeInputDevice$.subscribe((device) => { if (device === InputDeviceType.Xbox) { showXboxPrompts(); }});
Keyboard input detected
Other gamepad/controller detected
PlayStation controller detected (DualShock 3/4, DualSense)
Xbox controller detected (includes Xbox 360, Xbox One, Xbox Series)
Identifies the type of input device currently being used. Useful for displaying appropriate button prompts to the user.
Example