@domicile-desktop/sdk 0.0.0-alpha-2e805dd4836f → 0.0.0-alpha-e8d68edfa399

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -135,6 +135,11 @@ export type DomicileAppTitledEvent = Event & {
135
135
  };
136
136
  /** A combination claimed with `grabShortcut()` was pressed. */
137
137
  export type DomicileShortcutEvent = Event & {
138
+ /**
139
+ * The chord as {@link DomicileHost.grabShortcut} was given it by name —
140
+ * `Meta+Shift+l` — or empty for one grabbed as a keycode.
141
+ */
142
+ readonly chord: string;
138
143
  readonly keycode: number;
139
144
  readonly altKey: boolean;
140
145
  readonly ctrlKey: boolean;
@@ -784,9 +789,18 @@ export type DomicileHost = {
784
789
  /**
785
790
  * Route a key combination to the page instead of the focused client.
786
791
  *
787
- * Presses arrive as `shortcut` events with the same fields.
792
+ * By name (`grabShortcut("Meta+Shift+l")`, sway's grammar), the engine finds
793
+ * the key the keysym is on, and again on layout change. Presses arrive as
794
+ * `shortcut` events whose `chord` is this string, from a `<webview>` or this
795
+ * page (taken from the page).
796
+ *
797
+ * As a {@link DomicileShortcut}, presses arrive with the same fields and an
798
+ * empty `chord`.
799
+ *
800
+ * @throws `SyntaxError` for a malformed chord; `NotFoundError` for a keysym
801
+ * the keyboard cannot type, once the compositor has described it.
788
802
  */
789
- grabShortcut(shortcut: DomicileShortcut): void;
803
+ grabShortcut(shortcut: string | DomicileShortcut): void;
790
804
  /**
791
805
  * Click an extension's action: grants `activeTab` on the active tab, and
792
806
  * fires `action.onClicked` if there is no popup. The shell opens any popup
package/package.json CHANGED
@@ -150,7 +150,7 @@
150
150
  "test:unit": "bun test"
151
151
  },
152
152
  "type": "module",
153
- "version": "0.0.0-alpha-2e805dd4836f",
153
+ "version": "0.0.0-alpha-e8d68edfa399",
154
154
  "repository": {
155
155
  "type": "git",
156
156
  "url": "git+https://github.com/cprussin/domicile.git",