Skip to content

Commit

Permalink
feat: add keyboard shortcut for opening file
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis authored and steveoh committed Jan 28, 2022
1 parent 979f98e commit 0554d33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/Data.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export default function Data() {
const history = useHistory();
const handleError = useErrorHandler();

useEffect(() => {
window.addEventListener('keyup', (event) => {
if (event.ctrlKey && event.key === 'o') {
open();
}
});
}, [open]);

useEffect(() => {
window.ugrc
.getConfigItem('streetFields')
Expand Down

0 comments on commit 0554d33

Please sign in to comment.