Skip to content

Commit 33bca26

Browse files
authored
Merge pull request #59 from standardnotes/fix/forward-keyboard-shortcut-events
fix: Fixes forwarding of keyboard shortcut events
2 parents 893561d + 519a148 commit 33bca26

4 files changed

Lines changed: 42 additions & 48 deletions

File tree

dist/@types/ComponentRelay.d.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ export default class ComponentRelay {
2121
deinit(): void;
2222
private registerMessageHandler;
2323
private registerKeyboardEventListeners;
24+
/**
25+
* Only forward keyboard events involving shortcut modifiers (Ctrl, Shift, Meta, Alt).
26+
* Plain typing should stay in the editor and not be sent to the parent app.
27+
*/
28+
private shouldForwardKeyboardEvent;
29+
private forwardKeyboardEvent;
2430
private registerMouseEventListeners;
2531
private handleMessage;
2632
private onReady;
@@ -149,16 +155,6 @@ export default class ComponentRelay {
149155
* @param height The new height.
150156
*/
151157
setSize(width: string | number, height: string | number): void;
152-
/**
153-
* Sends the KeyDown keyboard event to the Standard Notes parent application.
154-
* @param keyboardModifier The keyboard modifier that was pressed.
155-
*/
156-
private keyDownEvent;
157-
/**
158-
* Sends the KeyUp keyboard event to the Standard Notes parent application.
159-
* @param keyboardModifier The keyboard modifier that was released.
160-
*/
161-
private keyUpEvent;
162158
/**
163159
* Sends the Click mouse event to the Standard Notes parent application.
164160
*/

0 commit comments

Comments
 (0)