diff --git a/src/Models/ThemeViewState/WithLayoutSourceState.ts b/src/Models/ThemeViewState/WithLayoutSourceState.ts index 552686f27..ecfacb711 100644 --- a/src/Models/ThemeViewState/WithLayoutSourceState.ts +++ b/src/Models/ThemeViewState/WithLayoutSourceState.ts @@ -7,6 +7,8 @@ import LayerState from "../../Logic/State/LayerState" import { Store } from "../../Logic/UIEventSource" import { FeatureSource, IndexedFeatureSource } from "../../Logic/FeatureSource/FeatureSource" import { Tag } from "../../Logic/Tags/Tag" +import Hotkeys from "../../UI/Base/Hotkeys" +import Translations from "../../UI/i18n/Translations" export class WithLayoutSourceState extends WithSelectedElementState { readonly layerState: LayerState @@ -50,6 +52,15 @@ export class WithLayoutSourceState extends WithSelectedElementState { this.floors = WithLayoutSourceState.initFloors(this.featuresInView) this.initFilters() + + Hotkeys.RegisterHotkey( + { nomod: "n" }, + Translations.t.hotkeyDocumentation.addNew, + () => { + this.openNewDialog() + } + ) + } /** @@ -121,4 +132,5 @@ export class WithLayoutSourceState extends WithSelectedElementState { this.featureProperties.trackFeature(feature) this.selectedElement.setData(feature) } + }