简体   繁体   中英

How i can get the data from CMD console nodeJS?

I can get data from cmd console in node.js using process.stdout to ask for data and process.stdin for getting the answer.

It is good, but how i can get the current text that the user is typing? like onkeypress event, and also without asking the user anything. If not that every time the user types something, I can get it.

在此处输入图片说明

您可以使用ioHook这样的模块https://www.npmjs.com/package/iohook

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM