pynput icon indicating copy to clipboard operation
pynput copied to clipboard

keyboard.type/key.press printing gibberish after 14k characters.

Open Pietschnitzel opened this issue 3 years ago • 2 comments

using the keyboard.type function i first tried to print lorem ipsum sample text but after 14k characters it only printed gibberish. Is that a limit or is it something else on my end ? here is the text originally in a txt file:https://pastebin.com/WSFyFdzc and in the pynput output:https://pastebin.com/Da47HuZq TIA

Pietschnitzel avatar Mar 17 '21 22:03 Pietschnitzel

Thank you for your report.

Can you please provide a small sample that reproduces your issue? I just updated the issue template to include a request for that.

moses-palmer avatar Mar 29 '21 19:03 moses-palmer

This is the entire code,i hope it´s ok

from pynput.keyboard import Key, Controller
import time
import os

#variables
keyboard = Controller()
datadir = 'C:\\Users\\User\\Desktop\\Coding\\\\Python\\pynput'

os.chdir(datadir)
with open("data.txt", 'r') as file:
    data = file.read()
keyboard = Controller()
time.sleep(5) 
for word in data:
    keyboard.type(data)

Pietschnitzel avatar Mar 31 '21 15:03 Pietschnitzel