You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've done some tests, one very simple in FeatureInfo.js that allows user to browse through infoclick results using keyboard arrows. It's implemented roughly like this:
componentDidMount(){[…]// TODO: Optimize. De-activate when not needed.window.onkeyup=e=>{varpressed=e.keyCode;switch(pressed){case37:
this.changeSelectedIndex(-1);break;case39:
this.changeSelectedIndex(1);break;default:
break;}console.log(pressed);};}
While this works, I think we should have a more app-wide mechanism for this.
I haven't looked further into it, but there are some libraries, such as react-hotkeys that could work.
Update
The following has been implemented so far:
Idea
The shortcuts should be global, work all the time when Hajk is in focus, except:
input
fields (e.g. user types search phrase)Examples of actions that could benefit from shortcuts (in no particular order):
Proposed implementation
Github's HotKey, although other options are possible.
The text was updated successfully, but these errors were encountered: