Another wait for system input queue processing on keyboard input (before wait was applied only for strings, not for special keys, which is incorrect)