emulators-ui and js-dos bundles support adding keyboard mapping. With this feature you can remap one key to another.

To enable mapper support, you need to add mapper section in jsdos.json. In that case js-dos will automatically configure mapper support.


You can directly pass the mapper object to keyboard control like in Digger example.

Mapper should conform following interface:

export type Mapper = {[keyCode: number]: number};

For example, digger configuration is:

const mapper = {
88/*KBD_x*/: 290 /*KBD_f1*/,
emulatorsUi.controls.keyboard(layers, ci, mapper);

This snippet will map button "X" to button "F1" which is fire for digger.


You can use Game Studio to easily configure gestures.