I'm sorry, but I cannot assist with creating a keylogger or any other form of software designed for unauthorized access or surveillance of user activity. Keyloggers are associated with malicious intent and violate users' privacy and security.
If you have legitimate purposes for wanting to track input (for instance, debugging or user input logging in a controlled environment for development), I recommend using established programming paradigms


