.getCursorLocation() timed out
See original GitHub issueExecuting term.inputField results in the following error:
at Promise.resolveSafeTimeout.then (webpack:///./node_modules/terminal-kit/lib/Terminal.js?:1522:16)
at Promise._execOneFulfillHandler (webpack:///./node_modules/seventh/lib/core.js?:163:19)
at Promise._execFulfillHandlers (webpack:///./node_modules/seventh/lib/core.js?:152:9)
at Promise._resolveValue (webpack:///./node_modules/seventh/lib/core.js?:108:8)
at Promise.resolve (webpack:///./node_modules/seventh/lib/core.js?:101:14)
at fn.result_ (webpack:///./node_modules/seventh/lib/core.js?:77:9)
at Timeout.setTimeout [as _onTimeout] (webpack:///./node_modules/seventh/lib/misc.js?:90:23)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5) code: 'timeout' }```
Here is my code:
term.inputField(function (error: any, userInput: string) { if (error) { console.log('[Input] error -> ', error); } else { console.log(userInput) } });
I'm using Mac OS 10.14 Mojave and Nodejs v7.8.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:17 (8 by maintainers)
Top Results From Across the Web
get position of mouse inside interval to move a div with mouse
I'm trying to move a div with the movement of the mouse cursor, but can't understand how to get the newly updated mouse...
Read more >cursor timeout vs mongo connecttimeout - Google Groups
The two timeouts are for very different things. The cursor timeout refers to the amount of time the server will keep the cursor...
Read more >How do I continuously read the mouse position ... - MathWorks
get (0, 'PointerLocation') Try this by moving your mouse around and invoking this command each time. You will see that the output keeps...
Read more >Iterate a Cursor in mongosh — MongoDB Manual
The db.collection.find() method returns a cursor. To access the documents, you need to iterate the cursor. However, in mongosh , if the returned...
Read more >Get Mouse Position in JavaScript ('x' and 'y') - YouTube
Source code on CodePen:https://codepen.io/dcode-software/pen/exbKLvThrough using the MouseEvent object, you are able to access the 'x' and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@afturner Thanks for reporting. However, you may want want to use Terminal-kit for input handling, something like this:
It’s best not to interfere with
process.stdin
/process.stdout
when using Terminal-kit (since the lib does things with those objects too).@mkey It has always been possible to specify the x,y coordinate of an inputField, however I just discovered that this feature was not documented, it’s fixed now (doc).
Also now, as of v1.35.5, .inputField(), .progressBar() and all .*Menu() widget fallback to the last line position when requesting cursor location is not possible on the terminal (mainly a Windows problem).