This version is old school.
Please find jQuery plugins on npm.
Keyboard-navigable
This jQuery plugin make any elements in a container navigable with the keyboard. A class attribute \"active\" is added to the active element. By default, UP and DOWN arrows and ENTER are enabled in conjunction with the CTRL meta key (i.e. you must hold the CTRL key and DOWN arrow to move down for example). You can customize nearly everything like the enabled keys, which meta key shall be used (or no meta key), and a few callbacks are available to hook your own functions. Note that if you don't use a meta key, you may have conflicts with the native behaviour of arrow up/down for example. The keyboard events will also be ignored if an input element has the focus like an INPUT or a TEXTAREA.