https://github.com/bubkoo/get-cursor-position
🐾 Get the cursor's current position in your terminal.
https://github.com/bubkoo/get-cursor-position
Last synced: 12 months ago
JSON representation
🐾 Get the cursor's current position in your terminal.
- Host: GitHub
- URL: https://github.com/bubkoo/get-cursor-position
- Owner: bubkoo
- License: mit
- Created: 2016-03-03T12:43:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-09-30T01:28:23.000Z (almost 4 years ago)
- Last Synced: 2025-04-30T17:04:17.172Z (about 1 year ago)
- Language: C++
- Homepage:
- Size: 26.4 KB
- Stars: 29
- Watchers: 3
- Forks: 15
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# get-cursor-position
> Get the cursor's current position in your terminal.
[](https://github.com/bubkoo/get-cursor-position/blob/master/LICENSE)
[](http://packagequality.com/#?package=get-cursor-position)
## Install
```
$ npm install get-cursor-position --save
```
## Usage
Async:
```js
var getCursorPosition = require('get-cursor-position');
getCursorPosition.async(function(pos) {
console.log('row: ' + pos.row);
console.log('col: ' + pos.col);
});
```
Sync:
```js
var getCursorPosition = require('get-cursor-position');
var pos = getCursorPosition.sync();
console.log('row: ' + pos.row);
console.log('col: ' + pos.col);
```
## Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please [create an issue](https://github.com/bubkoo/get-cursor-position/issues/new).