use uinput for keyboard input when there is no xorg available, and if its robust remove xorg dependent code
Inspired by this stack overflow answer https://unix.stackexchange.com/questions/14879/how-to-inject-keystrokes-via-a-shell-script#14882
Inspired by this stack overflow answer https://unix.stackexchange.com/questions/14879/how-to-inject-keystrokes-via-a-shell-script#14882