What is the best way to support keyboard navigation?

Hi!

We’re working on adding support for arrow down, arrow up, enter keyboard navigation in http://climatescape.org/ (https://github.com/climatescape/climatescape.org/pull/180).

It looks like most algolia search boxes support this including DocSearch, but I dont see where it is implemented.

Is there a preferred way of supporting it?