mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Improve invoking keybindings on computer always using lowercase keys
Previously CTRL+A would get triggered instead of ctrl+a. CTRL+A is equivalent to ctrl+shift+a. This isn't intended and should be called directly when required. Now key combos like ctrl+a on computer firefox etc. work as expected
This commit is contained in:
@@ -232,7 +232,7 @@ class ComputerEnvironment(Environment):
|
||||
logger.debug(f"Action: {action.type} details: {output or error}")
|
||||
|
||||
case "keypress":
|
||||
mapped_keys = [self.CUA_KEY_TO_PYAUTOGUI_KEY.get(k.lower(), k) for k in action.keys]
|
||||
mapped_keys = [self.CUA_KEY_TO_PYAUTOGUI_KEY.get(k.lower(), k.lower()) for k in action.keys]
|
||||
key_string = "N/A"
|
||||
if not mapped_keys:
|
||||
error = "Keypress action requires at least one key"
|
||||
|
||||
Reference in New Issue
Block a user