## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Virtual Keyboard Device Driver

The virtual keyboard device driver (VKBD) consists of virtual support for the keyboard. It allows keystrokes to be passed from the keyboard to the DOS session and text to be pasted from another application into the DOS session as keystrokes. This virtual device driver also allows existing DOS applications that access the keyboard to operate without change. Such applications can access the keyboard through BIOS calls, access to the BIOS data area, or monitoring of the keyboard interrupt, and reading keystroke data directly from the I/O ports.

The virtual keyboard device driver addresses the following issues:

INT 21h Access. DOS applications can access the keyboard by opening the " CON:" (console) device, or by default standard input access.

BIOS Access. DOS applications can access the keyboard through BIOS INT 09h and INT 16h.

I/O Port Access. DOS applications can access the keyboard by reading and writing I/O ports 60h and 64h. This access is not restricted to reading scan codes, and can include other types of access (such as LED control).

Pasting. Data can be pasted from other OS/2 applications.

Internationalization. Keystrokes are translated according to the current keyboard translation table and code page.

Idle Detection. DOS applications must not waste excessive CPU time when in input peek loops.