Closed jjgalvez closed 2 years ago
Hi, ydotool support would be much appreciated.
Alternatively, wtype
also seems to work.
diff --git a/nerd-dictation b/nerd-dictation
index 1d6b626..1df4372 100755
--- a/nerd-dictation
+++ b/nerd-dictation
@@ -61,11 +61,9 @@ USER_CONFIG = "nerd-dictation.py"
def run_xdotool(subcommand: str, payload: List[str]) -> None:
- cmd_base = "xdotool"
+ cmd_base = "wtype"
cmd = [
cmd_base,
- subcommand,
- "--clearmodifiers",
] + payload
try:
subprocess.check_output(cmd)
@@ -1052,8 +1050,8 @@ def main_begin(
def handle_fn(text: str, delete_prev_chars: int) -> None:
if delete_prev_chars:
- run_xdotool("key", ["BackSpace"] * delete_prev_chars)
- run_xdotool("type", ["--", text])
+ run_xdotool("key", ["-P","BACKSPACE"] * delete_prev_chars)
+ run_xdotool("type", [text])
elif output == "STDOUT":
wtype currently does not work with KDE Plasma because Plasma has not yet implemented some specific protocol, however ydotool does work with Plasma, perhaps it can also be added to the list of tools similar to wtype
First, very cool application! I use wayland on KDE and found that ydotool (https://github.com/ReimuNotMoe/ydotool) works pretty well as a replacement for xdotool. To use ydotool I changed the command from xdotool to ydotool, removed the --clearmodifiers and changed the backspace command from ["backspace" to ['14', '14:0'] Ydotool is a bit harder to use because of wayland, but it works with both x and wayland so I find that a plus