0

I know there are a lot of posts about detecting keypresses. Now I'm looking to make a simple script for some custom shortcuts to help me with my school work.

For that i need someway to detect keypresses. Alot of posts suggest pyglet.window problem is this is a non standard library that I need to install. Which I can't do on a school computer.

So my question is can I somehow either have a library for Python "on the go" so I can take my script with the library without any installation and still run it on a school computer?

Or can I somehow detect keypresses using the standard Python library?

Using Windows.

zero323
  • 322,348
  • 103
  • 959
  • 935
Jimmy Joe
  • 31
  • 4
  • https://stackoverflow.com/q/24072790 – Fahid Mohammad Apr 15 '18 at 07:42
  • The problem with msvcrt is that it seems to only record keypresses from the console. i want a script that sits in the background and waits for me to press F1 for example – Jimmy Joe Apr 15 '18 at 07:53
  • @JimmyJoe for that I believe you need to go call native window API. because listen to a keypress on background service can be dangerous use. Also, you will be required to run your app under admin privileges. – digitake Apr 15 '18 at 11:30

0 Answers0