Python getting what the user is typing in another application
<p>Hi i am using python to make a program that will read what the user is typing in another applications (Chrome for example)and save it on file.txt
For example if i am signing in to Gmail or writing something in Microsoft office word i want my python program to get what i am typing and save it all in a text file
is there a way to do that in python ?!
if not what kind of programming language should i use?!</p>

<pre><code> what_user_is_typing=get what the user is writing
 text_file = open("Output.txt", "w")
 text_file.write(what_user_is_typing)
 text_file.close()
</code></pre>
