Open WOSHIZHAZHA120 opened 5 months ago
We can listen for key presses like so:
let readline = require('readline'); readline.emitKeypressEvents(process.stdin); process.stdin.on('keypress', (ch, key) => { console.log('got "keypress"', ch, key); if (key && key.ctrl && key.name == 'c') { process.stdin.pause(); } }); process.stdin.setRawMode(true);
Here's how Vite does it:
I like the idea of a few keyboard shortcuts for the dev server.
Feature Request
Provides a way to reopen the browser. For example, Vite can be restarted using the
r
key.Is your feature request related to a bug?
N/A
What are the alternatives?
Restarted the wxt process but also trigger the build
Additional context