Skip to content

Commit

Permalink
fix caps issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaisakhkm2625 committed Sep 14, 2024
1 parent c8553f9 commit 22a8707
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion type_paste.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ def _type_clipboard_content(self):
for char in clipboard_content:
if self._stop_event.is_set():
break # Stop typing if the event is set
self.keyboard.type(char)

if char.isupper() or char in "~!@#$%^&*()_+{}:\"<>?": # Characters that require Shift
with self.keyboard.pressed(Key.shift):
self.keyboard.type(char)
else:
self.keyboard.type(char)
time.sleep(random.uniform(float(self.type_delay_lower_bound),float(self.type_delay_upper_bound)))


# Optionally, press Enter after typing
if not self._stop_event.is_set():
self.keyboard.press(Key.enter)
Expand Down

0 comments on commit 22a8707

Please sign in to comment.