From 22a8707884972250658a9ec5d3d345e0bc36a607 Mon Sep 17 00:00:00 2001 From: vaisakh Date: Sat, 14 Sep 2024 21:14:28 +0530 Subject: [PATCH] fix caps issue --- type_paste.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/type_paste.py b/type_paste.py index 24a48c2..5bf62d3 100644 --- a/type_paste.py +++ b/type_paste.py @@ -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)