typewriter-for-vscode icon indicating copy to clipboard operation
typewriter-for-vscode copied to clipboard

Use clipboard as source

Open mrichman opened this issue 7 years ago • 2 comments

Hi Dan! This extension is awesome! I'd love to be able to use the clipboard as a source, keeping my code "off camera" and then having it type in as it currently does. This will really be useful for screencasts.

mrichman avatar May 31 '17 17:05 mrichman

agree

David-Tsui avatar Oct 01 '18 02:10 David-Tsui

hiya, I hacked into my local install of this cool extension and added another function into extension.js and package.json...

let playTypewriterClipboardCmd = vscode.commands.registerCommand('typewriter.playbackFromClipboard', () => {
        let minSpeed = vscode.workspace.getConfiguration('typewriter').get('TypingMinSpeed') | 30;
        let maxSpeed = vscode.workspace.getConfiguration('typewriter').get('TypingMaxSpeed') | 120;
		vscode.env.clipboard.readText().then((text)=>{
	        humanTyper_1.type(text, minSpeed, maxSpeed);
		});
    });

now I can type from clipboard contents.

dokipen3d avatar Jun 07 '21 09:06 dokipen3d