This was ineffective because it struggled with the syntax of the k assignment. It did not recognize the letter 'a' (which is used as an example for the sake of documentation) as being included in key.char like I had found in other programs using Pynput, however it did recognize it as being included in key in general so I erased the try and except lines seen to the left and wrote my if statements as "if key in ['a']:" and found that it worked as desired.
|