You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to control crankshaft through can bus signals from my radio which should be converted into virtual keyboard key presses.
For testing purposes I made a nodejs script which uses xdotool to press the enter button.
Unfortunately xdotool is not able to press a button:
pi@CRANKSHAFT-NG:~ $ node keypress.js
Fehler beim Ausführen des Befehls: Command failed: xdotool key Return
Error: Can't open display: (null)
Failed creating new xdo instance
My USB Keyboard works just fine so it's an issue with xdotool and it's capability to control crankshaft-ng.
I'm using the latest image (2022-09-11-crankshaft-ng-66525ef.img) on my Raspberry Pi 3 Model B V.1.2.
Do you have any suggestions how to solve or which virtual keyboard to use?
Thanks!
Content of my keypress.js script:
const { exec } = require('child_process');
setInterval(() => {
// Emuliere die "Enter"-Taste mit xdotool
exec('xdotool key Return', (error, stdout, stderr) => {
if (error) {
console.error(`Fehler beim Ausführen des Befehls: ${error.message}`);
return;
}
if (stderr) {
console.error(`Fehlerausgabe des Befehls: ${stderr}`);
return;
}
// Gib eine Nachricht in der Konsole aus
console.log('Enter-Taste gedrückt.');
});
}, 3000);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello guys,
I'm trying to control crankshaft through can bus signals from my radio which should be converted into virtual keyboard key presses.
For testing purposes I made a nodejs script which uses xdotool to press the enter button.
Unfortunately xdotool is not able to press a button:
pi@CRANKSHAFT-NG:~ $ node keypress.js
Fehler beim Ausführen des Befehls: Command failed: xdotool key Return
Error: Can't open display: (null)
Failed creating new xdo instance
My USB Keyboard works just fine so it's an issue with xdotool and it's capability to control crankshaft-ng.
I'm using the latest image (2022-09-11-crankshaft-ng-66525ef.img) on my Raspberry Pi 3 Model B V.1.2.
Do you have any suggestions how to solve or which virtual keyboard to use?
Thanks!
Content of my keypress.js script:
Beta Was this translation helpful? Give feedback.
All reactions