Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

HeinrichAD/libxdo

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libxdo

Node.js wrapper to use libxdo/xdotool.

fake keyboard/mouse input, window management, and more using X11’s XTEST extension and other Xlib functions

This project is NOT mantained anymore!

This library is still incomplete. Unfortunaly, I don't have time for this project anymore.

If someone wants to take over the project, I'm happy to give them the appropriate permissions to the repository.

Example

'use strict';

// nvm use lts/*
// node .

//-----------------------------------------------------------------------------
// EXAMPLE IN C   ( gcc -lxdo example.c )
//-----------------------------------------------------------------------------
// #include <xdo.h>
//
// void main() {
//   xdo_t *xdo = xdo_new(NULL);
//   //xdo_send_keysequence_window(xdo, CURRENTWINDOW, "Ctrl+Q", 0);
//   xdo_enter_text_window(xdo, CURRENTWINDOW, "Hello @!", 500*1000);
//   xdo_free(xdo);
// }
//-----------------------------------------------------------------------------


//---------------------------------------------------------
// EXAMPLE VERSION 1
//---------------------------------------------------------

// const libxdo = require('./libxdo.js');

// let xdo = libxdo.xdo_new(null);
// if (xdo.isNull()) { console.log("Oh no! Couldn't create object!"); return -1; }
// //libxdo.xdo_send_keysequence_window(xdo, libxdo.CURRENTWINDOW, "Ctrl+Q", 0);
// libxdo.xdo_enter_text_window(xdo, libxdo.CURRENTWINDOW, "Hello @!", 500*1000);
// libxdo.xdo_free(xdo);


//---------------------------------------------------------
// EXAMPLE VERSION 2   ( a little bit more C feeling )
//---------------------------------------------------------

const {
  xdo_new,
  xdo_enter_text_window,
  //xdo_send_keysequence_window,
  xdo_free,
  CURRENTWINDOW
} = require('libxdo');

let xdo = xdo_new(null);
if (xdo.isNull()) { console.log("Oh no! Couldn't create object!"); return -1; }
//xdo_send_keysequence_window(xdo, CURRENTWINDOW, "Ctrl+Q", 0);
xdo_enter_text_window(xdo, CURRENTWINDOW, "Hello @!", 500*1000);
xdo_free(xdo);

Contribution and Inspirations

About

Node.js wrapper: fake keyboard/mouse input, window management, and more using X11’s XTEST extension and other Xlib functions

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.