pynput
pynput copied to clipboard
Sending capital letter returns; a
When I use the folowing;
keyboard.press(key) keyboard.release(key)
and key is a capital letter like T, it actually returns the letter a
Oh thank god someone else was having this issue, I only get A back. Numbers get pressed and release just fine but when I use keyboard.type(some numbers as a string) they too get turned to just the letter a. This is fairly critical for my project
That does indeed sound strange. What platforms are you using?
On Wed, 13 Feb 2019, 07:00 willstout <[email protected] wrote:
Oh thank god someone else was having this issue, I only get A back. Numbers get pressed and release just fine but when I use keyboard.type(some numbers as a string) they too get turned to just the letter a. This is fairly critical for my project
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/moses-palmer/pynput/issues/136#issuecomment-463070845, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjOYwgJpQ0DRj9aV27Hzu-urRO2oxdLks5vM6oSgaJpZM4a0BQY .
I'm using it on both windows and osx. The problem only occurred on osx. The workaround I use (@willstout) is using shift and a string.lower() that works; Keyboard.press(Key.shift) Keyboard.press(convertedString) Keyboard.release(convertedString) Keyboard.release(Key.shift)
I did not test the keyboard.type functionality completely
Currently using OSX and Pynput version 1.4.
Thanks for the workaround @JeffreyDavidsz !
@moses-palmer I see an other issue whit Keyboard.type. This sometimes returns an a also. Did not see it myself but I think it's related. Maybe in newer versions of OSX something changed in the layout of the keyboard (command wise?)
Same kind of problem here (PC, Windows 10, Pynput version 1.4). Tried to execute code I had written on an older PC. When I type S, the listener returns special key Key.shift pressed key 's' pressed key 's' released key Key.shift released. How can I teach it that "shift s" is "S"?
Not quite sure what your question is. The workaround works, untill the problem is fixed, I stay to that
Sorry, so I need the listener to give me a big S, but so far I'm only getting shift+s. Is there an easy way to implement this?
I've got this problem too:
>>> from pynput import keyboard
>>> controller = keyboard.Controller()
>>> controller.press("S")
>>> a
I'm running MacOS 10.14.5