pynput
pynput copied to clipboard
Canonical() suddenly returns KeyCode for F keys
On Pynput 1.7.7, the behaviour of canonical() changed so that now it caused an exception in my program.
pynput.keyboard.Listener().canonical(pynput.keyboard.Key.f1) used to return pynput.keyboard.Key.f1 but now returns <65470> of type KeyCode. This is missing the attribute name which would have returned "f1" and makes the key code clearly understandable. It seems that in https://github.com/moses-palmer/pynput/commit/e7964a607b4a1b73dd2f58192cf10baeee921feb, an exception should be made for special keys.