Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@todesktop/client-selected-text
Advanced tools
- [ToDesktop Client Selected Text](#todesktop-client-selected-text) - [Installation](#installation) - [Usage](#usage) - [Architecture](#architecture) - [Development](#development)
This is the repo for the ToDesktop Selected Text client.
This is a zero-dependency package for interacting with @todesktop/plugin-selected-text. This package exposes a set of functions for getting selected text from any application.
Install @todesktop/client-selected-text
in your client-side application using
$ npm install @todesktop/client-selected-text
Installation of the plugin package is also necessary.
Gets selected text by synthesizing the keyboard shortcut "CommandOrControl+c" then reading text from the clipboard
import { getSelectedText } from "@todesktop/client-selected-text";
getSelectedText().then((selectedText) => console.log(selectedText));
Registers a global shortcut of accelerator
. The callback
is called with the selected text when the registered shorcut is pressed by the user
Returns true
if the shortcut was registered successfully
import { registerShortcut } from "@todesktop/client-selected-text";
const isRegistered = registerShortcut("F6", (selectedText) =>
console.log(selectedText)
);
Unregisters a global shortcut of accelerator
and is equivalent to electron.globalShortcut.unregister
import { unregisterShortcut } from "@todesktop/client-selected-text";
unregisterShortcut("F6"); // void
This package requires the following files:
src/index.ts
: exposes plugin functionality through strongly-typed, easy-to-use functions.src/generated/plugin.d.ts
: automatically generated types from @todesktop/plugin-selected-text
's index.ts
file.Refer to the root repo for development instructions.
FAQs
Retrieve the selected text from any application.
The npm package @todesktop/client-selected-text receives a total of 8 weekly downloads. As such, @todesktop/client-selected-text popularity was classified as not popular.
We found that @todesktop/client-selected-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.