Check the manual (key_for_str), mouse_left is not listed there. Btw. you can speed your function up a little by calling key_for_str only once for each string and save the result in a variable.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual