Fix text test with '0' as input
This commit is contained in:
parent
d1cf81aa1d
commit
9c0fa84d3b
|
@ -128,7 +128,7 @@ $server->addMessageHandler('key', function (ConnectionInterface $from, array $da
|
||||||
$server->addMessageHandler('text', function (ConnectionInterface $from, array $data) use ($shell) {
|
$server->addMessageHandler('text', function (ConnectionInterface $from, array $data) use ($shell) {
|
||||||
$value = $data['value'] ?? null;
|
$value = $data['value'] ?? null;
|
||||||
|
|
||||||
if (!empty($value)) {
|
if (trim($value) !== '') {
|
||||||
$shell->exec('xdotool type %s', escapeshellarg($value));
|
$shell->exec('xdotool type %s', escapeshellarg($value));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue