-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more keyboard shortcuts and fix various shortcut related issues #314
Commits on May 26, 2020
-
Convert all shortcuts to act on keydown already
Contrary to mouse clicks, when pressing keys on a keyboard the standard behavior is to perform the associated action immediately, not only when releasing the key again. This should also improve the perceived performance slightly. Note that the 'D' shortcut had formerly been handled by Leaflet, which we now have to do on our own. While at it, move the character codes over to the options variable, as found in other parts of the codebase already. Also removing the listener from the container does not seem needed anymore nowadays.
Configuration menu - View commit details
-
Copy full SHA for 36d8a20 - Browse repository at this point
Copy the full SHA 36d8a20View commit details
Commits on May 27, 2020
-
Add missing shortcut tooltips to control buttons
Those shortcuts were already working before, but not really discoverable for users. To achieve a consistent UI and keep the wording in line with existing conventions and future shortcuts (i.e. no whole sentences, shortcut in parenthesis), the mute tooltip is changed again to occupy two lines (to limit the width of the tooltip), to be less wordy (so it is faster to read), to use the "mute" term (to help memorizing the M shortcut, at least in English), and to align with the parenthesis style.
Configuration menu - View commit details
-
Copy full SHA for fbd3d3d - Browse repository at this point
Copy the full SHA fbd3d3dView commit details
Commits on May 28, 2020
-
Prevent more accidental shortcut triggers
Do not allow browser keyboard shortcuts to trigger route functions, e.g. pressing Ctrl+P triggers printing in most browsers, but should not at the same time switch BRouter-Web to POI mode. This can be prevented by filtering for modifiers. In the same fashion, when modal dialogs or dropdowns are open it should not be possible to activate map functions in the background now. Finally, inhibit shortcuts in number input fields too, as found in the editable number input fields in the customize profile options. Previously only regular text input fields were protected. To make those checks easier to use, they are deduplicated and moved to Util.js.
Configuration menu - View commit details
-
Copy full SHA for 08c8cfa - Browse repository at this point
Copy the full SHA 08c8cfaView commit details
Commits on May 29, 2020
-
Fix mute shortcut not working for color coded routes
The mute shortcut would only work for regular routes before. Note that no-go areas, POIs and tracks continue to be unaffected by muting, so e.g. peeking at a track below the route is still possible.
Configuration menu - View commit details
-
Copy full SHA for d6c648d - Browse repository at this point
Copy the full SHA d6c648dView commit details
Commits on May 30, 2020
-
Add shortcut to toggle color coding button
Press 'C' repeatedly to switch between the various color coding options. When the last one is reached, we show the regular route again.
Configuration menu - View commit details
-
Copy full SHA for 8e78c85 - Browse repository at this point
Copy the full SHA 8e78c85View commit details
Commits on May 31, 2020
-
Add shortcut to trigger geolocation
Press 'L' to initiate the "Show me where I am" function.
Configuration menu - View commit details
-
Copy full SHA for fd97019 - Browse repository at this point
Copy the full SHA fd97019View commit details
Commits on Jun 1, 2020
-
Allow translation of the search field placeholder text
It was not translated before, since the string was coming from an external dependency.
Configuration menu - View commit details
-
Copy full SHA for f23e375 - Browse repository at this point
Copy the full SHA f23e375View commit details
Commits on Jun 2, 2020
-
Add shortcut for geocoder search field
Press 'F', type a query and press 'Enter' to find places effortlessly. Note that the button already triggers on mousedown events, even though by convention it should react on mouseup (i.e. a regular click) only. However, that's an issue in the external dependency, and can be worked around for now.
Configuration menu - View commit details
-
Copy full SHA for 37ab053 - Browse repository at this point
Copy the full SHA 37ab053View commit details
Commits on Jun 3, 2020
-
Press 'R' to swap start and end of the route.
Configuration menu - View commit details
-
Copy full SHA for 2848e4d - Browse repository at this point
Copy the full SHA 2848e4dView commit details
Commits on Jun 4, 2020
-
Add shortcut to create no-go areas
Press 'N' to initiate drawing a no-go area. 'Escape' will cancel, similar to how drawing a route works.
Configuration menu - View commit details
-
Copy full SHA for a852acb - Browse repository at this point
Copy the full SHA a852acbView commit details
Commits on Jun 5, 2020
-
Add shortcut to delete last point
Press 'Z' to undo adding the last point.
Configuration menu - View commit details
-
Copy full SHA for 48f8fe3 - Browse repository at this point
Copy the full SHA 48f8fe3View commit details
Commits on Jun 6, 2020
-
Stop deleting points once there are no more points left
Prevents "Uncaught TypeError: Cannot read property 'off' of null" in L.Routing.js
Configuration menu - View commit details
-
Copy full SHA for 2953091 - Browse repository at this point
Copy the full SHA 2953091View commit details
Commits on Jun 7, 2020
-
Add shortcut for clear route dialog
Use 'Backspace' to show the dialog allowing to clear the route. The 'Del' key could then be used in the future to possibly allow to delete individual selected items like POIs or no-go areas.
Configuration menu - View commit details
-
Copy full SHA for e4e1c8a - Browse repository at this point
Copy the full SHA e4e1c8aView commit details
Commits on Jun 8, 2020
-
Add shortcut to toggle Strava layer
Press 'S' to show the Strava buttons (if the API key has been set) as well as the Strava segments layer (once it has been fetched). Note that fetching and updating data from Strava still needs to be triggered manually by clicking the respective biking or running button.
Configuration menu - View commit details
-
Copy full SHA for ba0bb39 - Browse repository at this point
Copy the full SHA ba0bb39View commit details
Commits on Jun 9, 2020
-
Add shortcut to toggle profile switcher
Press 'G' to open the profile switcher, select a profile with the arrow keys, apply with 'Enter' and close the switcher with 'Escape'. While 'T' and 'P' will be / were already taken, 'G' is at least easily reachable with the left hand for users using a mouse with their right hand at the same time. Since Bootstrap keeps updating the tooltip when changing options in the dropdown (which is useful in case the text is longer than the width of the control), the shortcut text needs to be applied dynamically too.
Configuration menu - View commit details
-
Copy full SHA for 6da520e - Browse repository at this point
Copy the full SHA 6da520eView commit details
Commits on Jun 10, 2020
-
Press 'X' to trigger the export route dialog. Automatically populating the trackname field should work too.
Configuration menu - View commit details
-
Copy full SHA for a420ad5 - Browse repository at this point
Copy the full SHA a420ad5View commit details
Commits on Jun 11, 2020
-
Add shortcuts to load tracks and no-go areas
Press 'O' or 'Shift+O' to open/load tracks or no-go areas respectively.
Configuration menu - View commit details
-
Copy full SHA for d106552 - Browse repository at this point
Copy the full SHA d106552View commit details
Commits on Jun 12, 2020
-
Add shortcut to show about dialog
Press 'H' to get to the helpful about dialog.
Configuration menu - View commit details
-
Copy full SHA for e56d213 - Browse repository at this point
Copy the full SHA e56d213View commit details
Commits on Jun 13, 2020
-
Add shortcuts to toggle sidebar and switch tabs
The 'T' key will show/hide the most recent sidebar tab. Pressing 'Shift+T' will switch to the next sidebar tab, possibly wrapping around to the first tab. If the Itinerary tab is hidden, it will be skipped.
Configuration menu - View commit details
-
Copy full SHA for 844a903 - Browse repository at this point
Copy the full SHA 844a903View commit details
Commits on Jun 14, 2020
-
Add shortcut to toggle elevation chart
Press 'E' to show/hide the elevation chart.
Configuration menu - View commit details
-
Copy full SHA for b8b1e43 - Browse repository at this point
Copy the full SHA b8b1e43View commit details