Skip to content

VKeyHit

Narta Xaymar Dirks edited this page Nov 1, 2026 · 1 revision

VKeyHit

VKeyHit:Int32 scancode:Int32
Parameter Mode Type Default Description
scancode In Int32 required The SDL scancode of the key, 1 to 511.

Returns: How many times the key was pressed since the last call.

Description

Counts how often a key was pressed since the last time this asked about that same key, asking for the key by its SDL scancode instead of the DirectInput code that KeyHit takes. The count starts again from zero on every call. See Scan Codes for the table.

Differences

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

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
While Not KeyHit(1)
	Cls
	Text 10, 10, "Press F16 (SDL scancode 107), Escape ends"
	If VKeyHit(107) Then Text 10, 30, "F16"
	Flip
Wend

Related Commands

GetKey, KeyDown, KeyHit, KeyWait, VKeyDown, WaitKey

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally