xdotool
в странице справочника говорится:
ключ: Введите данное нажатие клавиши.
тип: Типы, как будто Вы ввели его.
Это вне моего понимания. Вы могли объяснить, как они отличаются?
В основном type
введет строку, key
введет отдельные ключи или ключевые комбинации. Например, вот два способа ввести "Привет мир!":
xdotool type "Hello world!"
xdotool key H e l l o space w o r l d exclam
Больше информации от man xdotool
(обрезанный вниз немного):
key keystroke [keystroke ...] Type a given keystroke. Examples being "alt+r", "Control_L+J", "ctrl+alt+n", "BackSpace". Multiple keys are separated by '+'. Example: Send the keystroke "F2" xdotool key F2 Example: Send 'a' with an accent over it (not on English keyboards, but still works with xdotool) xdotool key Aacute Example: Send ctrl+l and then BackSpace as separate keystrokes: xdotool key ctrl+l BackSpace type something to type Types as if you had typed it. Supports newlines and tabs (ASCII newline and tab). Example: to type 'Hello world!' you would do: xdotool type 'Hello world!'