JSPM

x11-keyboard

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q20761F
  • License MIT

Extremely simple X11 keyboard input driver

Package Exports

  • x11-keyboard

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (x11-keyboard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

X11-Keyboard

Simple X11 keyboard input module.

There doesn't appear to be any way of getting decent keybaord input within Node that specifies things like the keyRelease event.

This module creates a dummy X11 window and attaches a keyboard listener to it so you can extract detailed keyboard information.

It inherits the generic Node EventEmitter class so you can use all the normal callback functions like on(), off(), once() etc.

Examples

var keyboard = new require('./app.js');

keyboard.on('key.down:a', function() {
    console.log('A key pressed');
});

keyboard.on('key.up:a', function() {
    console.log('A key released');
});

keyboard.on('key.up:ctrl+b', function() {
    console.log('Ctrl+B pressed');
});