第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:04:21 +08:00
commit 7a73b38bd5
764 changed files with 166417 additions and 0 deletions

28
node_modules/keypress/test.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
var keypress = require('./')
keypress(process.stdin)
if (process.stdin.setRawMode)
process.stdin.setRawMode(true)
else
require('tty').setRawMode(true)
process.stdin.on('keypress', function (c, key) {
console.log(0, c, key)
if (key && key.ctrl && key.name == 'c') {
process.stdin.pause()
}
})
process.stdin.on('mousepress', function (mouse) {
console.log(mouse)
})
keypress.enableMouse(process.stdout)
process.on('exit', function () {
//disable mouse on exit, so that the state is back to normal
//for the terminal.
keypress.disableMouse(process.stdout)
})
process.stdin.resume()