Bottom Page

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()
Quote
#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.
Quote
#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.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Replacing all letters in a string apart from the first letter in each word Carbonix 9 267 Jan-17-2019, 09:29 AM
Last Post: buran
  Sorting lists prioritizing letters before numbers Ratherfastmofo 5 222 Nov-21-2018, 06:44 PM
Last Post: woooee
  Problem with updating file to attach/pynput jameseroni 7 328 Nov-02-2018, 03:47 AM
Last Post: jameseroni
  Replacing letters on a string via location Owenix 2 252 Sep-16-2018, 10:59 AM
Last Post: gruntfutuk
  Python Hangman Replacing "_" with letters. 2skywalkers 6 1,084 Jun-25-2018, 12:01 PM
Last Post: gruntfutuk
  Pynput while not using text field Superbit 2 668 Mar-07-2018, 04:35 AM
Last Post: Superbit
  make a list of string in capital by using a function anancba 3 746 Nov-23-2017, 06:42 AM
Last Post: heiner55
  Ending loop with string (capital & lowercase) MattWilk97 3 808 Oct-22-2017, 09:13 PM
Last Post: sparkz_alot
  Can 'len(s)' be used to just count letters? Bryan_Buster 3 1,289 Jun-08-2017, 05:13 PM
Last Post: DeaD_EyE
  CSV import results in listing of all letters of elements Bigshow23 3 1,298 May-23-2017, 08:00 PM
Last Post: buran

Forum Jump:


Users browsing this thread: 1 Guest(s)