Skip to content

KeyboardDeviceCount

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

KeyboardDeviceCount

KeyboardDeviceCount:Int32

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

Description

Tells how many keyboards the program has seen. A keyboard that is unplugged is still counted, and goes on having its number, see KeyboardDeviceConnected.

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 KeyboardDeviceCount() - 1
	Text 10, 10 + i * 16, i + ": " + KeyboardDeviceName(i)
Next
Flip
WaitKey

Related Commands

KeyboardChanged, KeyboardDeviceConnected, KeyboardDeviceName, LastKeyboardDevice

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally