1.1.21 • Published 7 months ago
@todesktop/electron-selected-text-prebuild v1.1.21
Electron Selected Text
Get selected text from any application using Electron's clipboard and robotjs
For Electron 9 and later, this module should only be used in the main process because robotjs is not context aware
Install
$ npm install electron-selected-text
Usage
import { app } from "electron";
import { getSelectedText, registerShortcut } from "electron-selected-text";
const printSelectedText = (selectedText) => {
console.log(`Selected Text: ${selectedText}`);
};
getSelectedText().then(printSelectedText);
app.whenReady().then(() => {
const ret = registerShortcut("F6", printSelectedText);
if (!ret) {
console.warn("registration failed");
}
});
1.1.19
7 months ago
1.1.18
7 months ago
1.1.17
7 months ago
1.1.21
7 months ago
1.1.20
7 months ago
1.1.16
7 months ago
1.1.15
7 months ago
1.1.14
1 year ago
1.1.12
2 years ago
1.1.13
2 years ago
1.1.11
2 years ago
1.1.10
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago