Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pynput - no capital letters
#1
Is there a known issues with Windows 10 to where it doesn't recognize characters modified by shift or Caps Lock?
It does record the key event of the shift press.

Anyone know if I'm missing something ?

from pynput.keyboard import Listener

def look_for_key(key):
        
    letter = str(key)
    letter = letter.replace("'", "")
        
    if letter == 'Key.esc':
        return False
    
    print(letter)


with Listener(on_press = look_for_key) as l:
    l.join()
Reply
#2
The key controller works, allowing me to send "Hello World", but I am unable to identify a 'H' only 'h'. I tried running under admin with the same result.
Reply
#3
Made a Win7 VM machine with the same result (I was really hoping it would be a win10 issue), same result. Also tried installing PyCharm as that's what a few of the videos show (youtu.be/WkE0QJu3ug8?t=374)
I believe it should be catching all Alt key actions, otherwise we wouldn't be able to code for laptops with often unique Alt key actions.

Anyhow, I'll let this die until I have an answer for others to post.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with "from pynput" LFreitas 1 129 Mar-24-2024, 02:23 AM
Last Post: deanhystad
  Pynput - One content on screen, another in the variable Valjean 4 884 Sep-18-2023, 06:00 PM
Last Post: Valjean
  Pynput Library not Working with Windows jacknewport 1 2,246 Mar-26-2022, 07:09 PM
Last Post: snippsat
  Solve Pynput Problem when changing language? ppel123 0 2,244 Feb-19-2020, 03:38 PM
Last Post: ppel123
  import pynput Sherlock42 2 3,295 Feb-08-2020, 04:01 PM
Last Post: Sherlock42
  List capital letters ricardodepaula 8 4,579 Jul-23-2019, 03:23 AM
Last Post: ricardodepaula
  Pynput doesn't recognize shift button and special characters VirtualDreamer 0 2,983 Jul-17-2019, 11:55 AM
Last Post: VirtualDreamer
  Problem with updating file to attach/pynput jameseroni 7 4,403 Nov-02-2018, 03:47 AM
Last Post: jameseroni
  Pynput while not using text field Superbit 2 4,169 Mar-07-2018, 04:35 AM
Last Post: Superbit
  make a list of string in capital by using a function anancba 3 3,411 Nov-23-2017, 06:42 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020