@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.
- package/dist/domicile-host.d.ts +16 -2
- package/package.json +1 -1
package/dist/domicile-host.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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