Feature(hotkeys): add H to jump to home location

This commit is contained in:
Pieter Vander Vennet 2025-02-10 02:47:44 +01:00
parent e66391fc03
commit 2b34547902
2 changed files with 10 additions and 0 deletions

View file

@ -225,6 +225,14 @@ export class UserMapFeatureswitchState extends WithUserRelatedState {
this.geolocationControl.handleClick()
})
Hotkeys.RegisterHotkey({ nomod: "H" }, Translations.t.hotkeyDocumentation.homeLocation, () => {
const home = this.userRelatedState.osmConnection.userDetails.data?.home
if (!home) {
console.log("No home location set")
}
this.mapProperties.location.set(home)
})
Hotkeys.RegisterHotkey(
{
shift: "T",