ESP32 Display Controller and Graphics Library

◆ begin() [1/2]

void begin ( bool  generateVirtualKeys,
bool  createVKQueue,
int  PS2Port 

Initializes Keyboard without initializing the PS/2 controller.

A reset command (Keyboard.reset() method) is automatically sent to the keyboard.
This method does not initialize the PS2Controller.

generateVirtualKeysIf true creates a task which consumes scancodes and produces virtual keys, so you can call Keyboard.isVKDown().
createVKQueueIf true creates a task which consunes scancodes to produce virtual keys and put them in a queue, so you can call Keyboard.isVKDown(), Keyboard.virtualKeyAvailable() and Keyboard.getNextVirtualKey().
PS2PortThe PS/2 port to use (0 or 1).


// Setup pins GPIO33 for CLK and GPIO32 for DATA on port 0
PS2Controller.begin(GPIO_NUM_33, GPIO_NUM_32); // clk, dat
Keyboard.begin(true, true, 0); // port 0

Definition at line 67 of file keyboard.cpp.