Instructions
1. Install Python if you don’t have it.
2. Install pynput in your terminal or command prompt:
pip install pynput
3. Copy the code above into a file, for example, python_global_counter.py.
4. Run the script:
python_global_counter.py
A window will appear. Press any key or mouse button ANYWHERE on your computer—the number goes up!