TechStark / opencv-js

OpenCV JavaScript version for node.js or browser
Apache License 2.0
357 stars 32 forks source link

cv.waitKey() is missing #17

Closed DOEHOONLEE closed 9 months ago

DOEHOONLEE commented 1 year ago

cv.waitKey() is missing is missing.

Is there some other way to achieve the same behavior? or is this going to be added in the future?

Thanks!

ttt43ttt commented 1 year ago

@DOEHOONLEE I don't think it will be added in the future. Because JavaScript is single-threaded, but cv.waitKey() blocks the current thread. If you want to monitor keyboard events, you can use library like https://github.com/ccampbell/mousetrap or https://github.com/jaywcjlove/hotkeys.