I’m creating an electron app which is going to be deployed on a linux tablet without keyboard.
I installed onboard and I’d like it to pop up when I select an input field. I managed to open whenever I want, but my app stays on top and I can’t see the keyboard.
This is how I start my app
const { app, BrowserWindow } = require('electron');
const { exec } = require('child_process');
app.whenReady().then(() => {
const myWindow = new BrowserWindow({
fullscreen: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
},
});
myWindow.loadFile('view/login.html');
});
And how I open/close the keyboard
function openVirtualKeyboard() {
console.log('Opening virtual keyboard');
exec('onboard', (err, stdout, stderr) => {
if (err) {
console.error(`Error launching virtual keyboard: ${stderr}`);
}
});
}
function closeVirtualKeyboard() {
console.log('Closing virtual keyboard');
exec('pkill onboard', (err, stdout, stderr) => {
if (err) {
console.error(`Error closing virtual keyboard: ${stderr}`);
}
});
}