Skip to content

PUIKeyboardController

Elijah Cobb edited this page May 15, 2021 · 4 revisions

This controller will allow you to listen to keyboard events using a NodeJS like event. You can supply a handler for onKeyUp and onKeyDown .

import {PUIKeyboardController} from "./pstdl-ui";
PUIKeyboardController.onKeyUp((key: KeyboardEvent) => {
	console.log(key.code + " was just let up.");
})

Clone this wiki locally