Your post appears to be using a library of some sorts. For peripheral devices in Windows you can use raw input. Follow the link below to learn more.

Raw Input (Windows)

Once you get a grasp on...