From 7b577f018f1fb21c6490622817e204550074724e Mon Sep 17 00:00:00 2001 From: Tirth Bhavesh Shah Date: Fri, 25 Oct 2024 18:36:31 -0700 Subject: [PATCH] Fixed Replace ENTER with SHIFT-ENTER for sending a message to the llm. Use ENTER for new lines. --- interpreter/core/computer/keyboard/keyboard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interpreter/core/computer/keyboard/keyboard.py b/interpreter/core/computer/keyboard/keyboard.py index b656ceea10..d6cdfdbd5d 100644 --- a/interpreter/core/computer/keyboard/keyboard.py +++ b/interpreter/core/computer/keyboard/keyboard.py @@ -47,7 +47,10 @@ def write(self, text, interval=None, delay=0.30, **kwargs): self.computer.clipboard.paste() if ends_in_enter: - self.press("enter") + if self.shift_pressed: + pyautogui.hotkey('shift', 'enter') + else: + pyautogui.press('enter') try: self.computer.clipboard.copy(clipboard_history)