Skip to content

PressKeyParams.window?

PressKeyParams › window?

Type: Window

The Obsidian window to press the key in: the main window or a popout. Pass the window that owns the focused target, e.g. leaf.view.containerEl.win for a popout leaf. Each Obsidian window is its own Electron web contents, so the key goes to the DOM-focused element of the window named here, whichever window the OS has focused, and never reaches another window.

**On mobile** there are no popouts, so any window but the main one throws.