Mon 21 Jul 22:43:21 CEST 2025

This commit is contained in:
sbosse 2025-07-21 23:05:59 +02:00
parent 524b6c04ae
commit 95a4fab307

View File

@ -0,0 +1,13 @@
var x11 = require('../../lib');
x11.createClient(function(err, display) {
var X = display.client;
var wid = X.AllocID();
X.CreateWindow(wid, display.screen[0].root, 100, 100, 400, 300);
X.ChangeWindowAttributes(wid, { eventMask: x11.eventMask.PointerMotion|x11.eventMask.KeyPress });
X.MapWindow(wid)
X.on('event', function(ev) {
if (ev.type === 2) // keypress
X.terminate();
console.log(ev);
});
});