Skip to content

MouseDeviceCount

Narta Xaymar Dirks edited this page Oct 30, 2026 · 2 revisions

MouseDeviceCount

MouseDeviceCount:Int32

Returns: The number of mice, at least 1. Where the system can't tell mice apart (for example on Wayland, or without a window) all of them count as one.

Description

Tells how many mice the program has seen. A mouse that is unplugged is still counted, and goes on having its number, see MouseDeviceConnected.

Differences

  • This is a BlitzLLVM extension: the original has no such command.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Cls
For i = 0 To MouseDeviceCount() - 1
	Text 10, 10 + i * 16, i + ": " + MouseDeviceName(i)
Next
Flip
WaitKey

Related Commands

MouseChanged, MouseDeviceConnected, MouseDeviceName, MouseDown, MouseHit, MouseWait, MouseX, MouseXSpeed

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally