How to enter keystrokes and combos via CLI?

I want to make KDE Connect work better.

Examples:

  • F11
  • Meta+W
  • Ctrl+Q

If those can be entered via a command that might work better

Switching to “hackers keyboard” all the time is annoying

Thanks!

If you’re on X11: GitHub - jordansissel/xdotool: fake keyboard/mouse input, window management, and more
If you’re on Wayland: GitHub - atx/wtype: xdotool type for wayland

You can find out what you’re on by starting Info Center if you’re on Plasma and looking at the Graphics Platform line.

wtype does not seem to work anymore, even on Wayland. Give a “Compositor does not support the virtual keyboard protocol”, and the wtype devs are not going to fix it or give a good explanation as to how to fix it.

I have also tried ydotool and that is also giving errors and doesn’t work with KDE Connect remote commands. Are there any other tools that could be used to send remote keyboard inputs? I would really like to use my phone as a TV remote for KDE Bigscreen on my TV.