新增图片批量处理
This commit is contained in:
@ -14,13 +14,19 @@ export function initKeypress() {
|
||||
process.stdin.removeAllListeners("keypress");
|
||||
currentHandler = null;
|
||||
|
||||
// 确保raw mode关闭再重新开启
|
||||
ensureRawMode(false);
|
||||
|
||||
// 初始化readline(只需一次)
|
||||
if (!initialized) {
|
||||
readline.emitKeypressEvents(process.stdin);
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
ensureRawMode(true);
|
||||
// 短暂延迟后再开启raw mode
|
||||
setImmediate(() => {
|
||||
ensureRawMode(true);
|
||||
});
|
||||
}
|
||||
|
||||
export function onKey(handler) {
|
||||
|
||||
Reference in New Issue
Block a user