Skip to content

KeyboardDeviceConnected

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

KeyboardDeviceConnected

KeyboardDeviceConnected:Int32 device:Int32
Parameter Mode Type Default Description
device In Int32 required The keyboard to ask, counted from 0 in the order they were seen.

Returns: 1 if the keyboard is connected, otherwise 0 (also for a number that no keyboard has).

Description

Tells if a keyboard is still plugged in. A keyboard that was removed keeps its number, so a number never means a different keyboard later on; one that is plugged in again gets its old number back.

Differences

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

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Repeat
	Cls
	For i = 0 To KeyboardDeviceCount() - 1
		Text 10, 10 + i * 16, KeyboardDeviceName(i) + ": " + KeyboardDeviceConnected(i)
	Next
	Flip
Until KeyHit(1)

Related Commands

KeyboardChanged, KeyboardDeviceCount, KeyboardDeviceName, LastKeyboardDevice

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally