mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
Increase scroll amount on horizontal scroll in computer environment
This commit is contained in:
@@ -222,9 +222,9 @@ class ComputerEnvironment(Environment):
|
|||||||
elif action.scroll_direction == "down":
|
elif action.scroll_direction == "down":
|
||||||
await self._execute("scroll", -total_scroll_clicks)
|
await self._execute("scroll", -total_scroll_clicks)
|
||||||
elif action.scroll_direction == "left":
|
elif action.scroll_direction == "left":
|
||||||
await self._execute("hscroll", -total_scroll_clicks)
|
await self._execute("hscroll", -total_scroll_clicks * 3)
|
||||||
elif action.scroll_direction == "right":
|
elif action.scroll_direction == "right":
|
||||||
await self._execute("hscroll", total_scroll_clicks)
|
await self._execute("hscroll", total_scroll_clicks * 3)
|
||||||
output = f"Scrolled {action.scroll_direction} by {amount} units at ({target_x}, {target_y})"
|
output = f"Scrolled {action.scroll_direction} by {amount} units at ({target_x}, {target_y})"
|
||||||
else:
|
else:
|
||||||
error = "Scroll action requires either scroll_x/y or scroll_direction"
|
error = "Scroll action requires either scroll_x/y or scroll_direction"
|
||||||
|
|||||||
Reference in New Issue
Block a user