Questions & Answers

How to give a different base class to the keyboard

As you may have seen on the code samples, this is the default setup that simple-keyboard uses:

<div class="simple-keyboard">
const keyboard = new Keyboard({ // Add options here });

You can however change this by setting up simple-keyboard like so:

<div class="myFavouriteClass"></div>
const keyboard = new Keyboard(".myFavouriteClass", { // If you want the default CSS styles theme: "simple-keyboard hg-theme-default hg-layout-default", // other options ... });

This can come in handy especially when dealing with multiple simple keyboard instances.