DEV Community

Discussion on: Secret input in python, Get input secretly and in a personalized way!

Collapse
 
shudo profile image
Shudo

Hello, after several searches I came across your post but I'm a bit annoyed because I can't get the numeric pad keys to listen when I press one of them it displays a code for example ( <96> for the number 0 ) and I can't solve this problem in the documentation it is specified to add this ( num_lock = ) but trying several techniques with this method I can't seem to get the numeric pad to listen would you have the solution please?

Collapse
 
matin profile image
Matin

Hello. Since pynput does not have a converter for the num pad, you have to convert the key number to 0-9 yourself, which is solved by subtracting 96 from the keyboard code.
Thanks for your comment and report :) , the SecretInput class code was updated and the issue was solved.