Skip to content

Commit

Permalink
Expose active status of a VMKeyboardService instance.
Browse files Browse the repository at this point in the history
Issue #130.

␄
  • Loading branch information
Mike Castle committed Oct 26, 2023
1 parent f5312be commit 62666aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions linkedin-tool.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,11 @@
VMKeyboardService.#services.add(this);
}

/** @type {boolean} */
get active() {
return this.#active;
}

/** @type {Shortcut[]} - Well, seq and desc properties only. */
get shortcuts() {
return this.#shortcuts;
Expand All @@ -1732,6 +1737,7 @@
this.logger.log('would enable keyboard', keyboard);
// TODO: keyboard.enable();
}
this.#active = true;
}

/** @inheritdoc */
Expand All @@ -1740,6 +1746,7 @@
this.logger.log('would disable keyboard', keyboard);
// TODO: keyboard.disable();
}
this.#active = false;
}

/** Add listener. */
Expand Down Expand Up @@ -1817,6 +1824,8 @@
}
}

#active = false;

#rebuildShortcuts = () => {
this.#shortcuts = [];
for (const instance of this.#keyboards.keys()) {
Expand Down

0 comments on commit 62666aa

Please sign in to comment.