Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-printable-keycode

mynamesleon3.8kMIT1.0.3

Detect if keycode is a width affecting character (including spaces and deletion)

readme

is-printable-keycode

Detect if keycode is a width affecting character (including spaces and deletion)

npm install is-printable-keycode
import isPrintableKeycode from 'is-printable-keycode';

input.addEventListener('keydown', (e) => {
    if (isPrintableKeycode(e.keyCode)) {
        // do something
    }
}, false);