lib hook and simulate keyboard