[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PYJ6D634Z5RSACDB7MYM4J":3,"skill-same:01M6PYJ6D634Z5RSACDB7MYM4J":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M6PYJ6D634Z5RSACDB7MYM4J","desktop-control-1-0-0",null,"Advanced desktop automation with mouse, keyboard, and screen control","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28],"desktop","control","1 0 0","desktop control","desktop control 1 0 0","automation","desktop automation","keyboard","screen","with","advanced","2026-11-10 10:12:30",false,"---\ndescription: Advanced desktop automation with mouse, keyboard, and screen control\n---\n\n# Desktop Control Skill\n\n**The most advanced desktop automation skill for OpenClaw.** Provides pixel-perfect mouse control, lightning-fast keyboard input, screen capture, window management, and clipboard operations.\n\n## ? Features\n\n### Mouse Control\n- ✅ **Absolute positioning** - Move to exact coordinates\n- ✅ **Relative movement** - Move from current position\n- ✅ **Smooth movement** - Natural, human-like mouse paths\n- ✅ **Click types** - Left, right, middle, double, triple clicks\n- ✅ **Drag & drop** - Drag from point A to point B\n- ✅ **Scroll** - Vertical and horizontal scrolling\n- ✅ **Position tracking** - Get current mouse coordinates\n\n### Keyboard Control\n- ✅ **Text typing** - Fast, accurate text input\n- ✅ **Hotkeys** - Execute keyboard shortcuts (Ctrl+C, Win+R, etc.)\n- ✅ **Special keys** - Enter, Tab, Escape, Arrow keys, F-keys\n- ✅ **Key combinations** - Multi-key press combinations\n- ✅ **Hold & release** - Manual key state control\n- ✅ **Typing speed** - Configurable WPM (instant to human-like)\n\n### Screen Operations\n- ✅ **Screenshot** - Capture entire screen or regions\n- ✅ **Image recognition** - Find elements on screen (via OpenCV)\n- ✅ **Color detection** - Get pixel colors at coordinates\n- ✅ **Multi-monitor** - Support for multiple displays\n\n### Window Management\n- ✅ **Window list** - Get all open windows\n- ✅ **Activate window** - Bring window to front\n- ✅ **Window info** - Get position, size, title\n- ✅ **Minimize\u002FMaximize** - Control window states\n\n### Safety Features\n- ✅ **Failsafe** - Move mouse to corner to abort\n- ✅ **Pause control** - Emergency stop mechanism\n- ✅ **Approval mode** - Require confirmation for actions\n- ✅ **Bounds checking** - Prevent out-of-screen operations\n- ✅ **Logging** - Track all automation actions\n\n---\n\n## ? Quick Start\n\n### Installation\n\nFirst, install required dependencies:\n\n```bash\npip install pyautogui pillow opencv-python pygetwindow\n```\n\n### Basic Usage\n\n```python\nfrom skills.desktop_control import DesktopController\n\n# Initialize controller\ndc = DesktopController(failsafe=True)\n\n# Mouse operations\ndc.move_mouse(500, 300)  # Move to coordinates\ndc.click()  # Left click at current position\ndc.click(100, 200, button=\"right\")  # Right click at position\n\n# Keyboard operations\ndc.type_text(\"Hello from OpenClaw!\")\ndc.hotkey(\"ctrl\", \"c\")  # Copy\ndc.press(\"enter\")\n\n# Screen operations\nscreenshot = dc.screenshot()\nposition = dc.get_mouse_position()\n```\n\n---\n\n## ? Complete API Reference\n\n### Mouse Functions\n\n#### `move_mouse(x, y, duration=0, smooth=True)`\nMove mouse to absolute screen coordinates.\n\n**Parameters:**\n- `x` (int): X coordinate (pixels from left)\n- `y` (int): Y coordinate (pixels from top)\n- `duration` (float): Movement time in seconds (0 = instant, 0.5 = smooth)\n- `smooth` (bool): Use bezier curve for natural movement\n\n**Example:**\n```python\n# Instant movement\ndc.move_mouse(1000, 500)\n\n# Smooth 1-second movement\ndc.move_mouse(1000, 500, duration=1.0)\n```\n\n#### `move_relative(x_offset, y_offset, duration=0)`\nMove mouse relative to current position.\n\n**Parameters:**\n- `x_offset` (int): Pixels to move horizontally (positive = right)\n- `y_offset` (int): Pixels to move vertically (positive = down)\n- `duration` (float): Movement time in seconds\n\n**Example:**\n```python\n# Move 100px right, 50px down\ndc.move_relative(100, 50, duration=0.3)\n```\n\n#### `click(x=None, y=None, button='left', clicks=1, interval=0.1)`\nPerform mouse click.\n\n**Parameters:**\n- `x, y` (int, optional): Coordinates to click (None = current position)\n- `button` (str): 'left', 'right', 'middle'\n- `clicks` (int): Number of clicks (1 = single, 2 = double)\n- `interval` (float): Delay between multiple clicks\n\n**Example:**\n```python\n# Simple left click\ndc.click()\n\n# Double-click at specific position\ndc.click(500, 300, clicks=2)\n\n# Right-click\ndc.click(button='right')\n```\n\n#### `drag(start_x, start_y, end_x, end_y, duration=0.5, button='left')`\nDrag and drop operation.\n\n**Parameters:**\n- `start_x, start_y` (int): Starting coordinates\n- `end_x, end_y` (int): Ending coordinates\n- `duration` (float): Drag duration\n- `button` (str): Mouse button to use\n\n**Example:**\n```python\n# Drag file from desktop to folder\ndc.drag(100, 100, 500, 500, duration=1.0)\n```\n\n#### `scroll(clicks, direction='vertical', x=None, y=None)`\nScroll mouse wheel.\n\n**Parameters:**\n- `clicks` (int): Scroll amount (positive = up\u002Fleft, negative = down\u002Fright)\n- `direction` (str): 'vertical' or 'horizontal'\n- `x, y` (int, optional): Position to scroll at\n\n**Example:**\n```python\n# Scroll down 5 clicks\ndc.scroll(-5)\n\n# Scroll up 10 clicks\ndc.scroll(10)\n\n# Horizontal scroll\ndc.scroll(5, direction='horizontal')\n```\n\n#### `get_mouse_position()`\nGet current mouse coordinates.\n\n**Returns:** `(x, y)` tuple\n\n**Example:**\n```python\nx, y = dc.get_mouse_position()\nprint(f\"Mouse is at: {x}, {y}\")\n```\n\n---\n\n### Keyboard Functions\n\n#### `type_text(text, interval=0, wpm=None)`\nType text with configurable speed.\n\n**Parameters:**\n- `text` (str): Text to type\n- `interval` (float): Delay between keystrokes (0 = instant)\n- `wpm` (int, optional): Words per minute (overrides interval)\n\n**Example:**\n```python\n# Instant typing\ndc.type_text(\"Hello World\")\n\n# Human-like typing at 60 WPM\ndc.type_text(\"Hello World\", wpm=60)\n\n# Slow typing with 0.1s between keys\ndc.type_text(\"Hello World\", interval=0.1)\n```\n\n#### `press(key, presses=1, interval=0.1)`\nPress and release a key.\n\n**Parameters:**\n- `key` (str): Key name (see Key Names section)\n- `presses` (int): Number of times to press\n- `interval` (float): Delay between presses\n\n**Example:**\n```python\n# Press Enter\ndc.press('enter')\n\n# Press Space 3 times\ndc.press('space', presses=3)\n\n# Press Down arrow\ndc.press('down')\n```\n\n#### `hotkey(*keys, interval=0.05)`\nExecute keyboard shortcut.\n\n**Parameters:**\n- `*keys` (str): Keys to press together\n- `interval` (float): Delay between key presses\n\n**Example:**\n```python\n# Copy (Ctrl+C)\ndc.hotkey('ctrl', 'c')\n\n# Paste (Ctrl+V)\ndc.hotkey('ctrl', 'v')\n\n# Open Run dialog (Win+R)\ndc.hotkey('win', 'r')\n\n# Save (Ctrl+S)\ndc.hotkey('ctrl', 's')\n\n# Select All (Ctrl+A)\ndc.hotkey('ctrl', 'a')\n```\n\n#### `key_down(key)` \u002F `key_up(key)`\nManually control key state.\n\n**Example:**\n```python\n# Hold Shift\ndc.key_down('shift')\ndc.type_text(\"hello\")  # Types \"HELLO\"\ndc.key_up('shift')\n\n# Hold Ctrl and click (for multi-select)\ndc.key_down('ctrl')\ndc.click(100, 100)\ndc.click(200, 100)\ndc.key_up('ctrl')\n```\n\n---\n\n### Screen Functions\n\n#### `screenshot(region=None, filename=None)`\nCapture screen or region.\n\n**Parameters:**\n- `region` (tuple, optional): (left, top, width, height) for partial capture\n- `filename` (str, optional): Path to save image\n\n**Returns:** PIL Image object\n\n**Example:**\n```python\n# Full screen\nimg = dc.screenshot()\n\n# Save to file\ndc.screenshot(filename=\"screenshot.png\")\n\n# Capture specific region\nimg = dc.screenshot(region=(100, 100, 500, 300))\n```\n\n#### `get_pixel_color(x, y)`\nGet color of pixel at coordinates.\n\n**Returns:** RGB tuple `(r, g, b)`\n\n**Example:**\n```python\nr, g, b = dc.get_pixel_color(500, 300)\nprint(f\"Color at (500, 300): RGB({r}, {g}, {b})\")\n```\n\n#### `find_on_screen(image_path, confidence=0.8)`\nFind image on screen (requires OpenCV).\n\n**Parameters:**\n- `image_path` (str): Path to template image\n- `confidence` (float): Match threshold (0-1)\n\n**Returns:** `(x, y, width, height)` or None\n\n**Example:**\n```python\n# Find button on screen\nlocation = dc.find_on_screen(\"button.png\")\nif location:\n    x, y, w, h = location\n    # Click center of found image\n    dc.click(x + w\u002F\u002F2, y + h\u002F\u002F2)\n```\n\n#### `get_screen_size()`\nGet screen resolution.\n\n**Returns:** `(width, height)` tuple\n\n**Example:**\n```python\nwidth, height = dc.get_screen_size()\nprint(f\"Screen: {width}x{height}\")\n```\n\n---\n\n### Window Functions\n\n#### `get_all_windows()`\nList all open windows.\n\n**Returns:** List of window titles\n\n**Example:**\n```python\nwindows = dc.get_all_windows()\nfor title in windows:\n    print(f\"Window: {title}\")\n```\n\n#### `activate_window(title_substring)`\nBring window to front by title.\n\n**Parameters:**\n- `title_substring` (str): Part of window title to match\n\n**Example:**\n```python\n# Activate Chrome\ndc.activate_window(\"Chrome\")\n\n# Activate VS Code\ndc.activate_window(\"Visual Studio Code\")\n```\n\n#### `get_active_window()`\nGet currently focused window.\n\n**Returns:** Window title (str)\n\n**Example:**\n```python\nactive = dc.get_active_window()\nprint(f\"Active window: {active}\")\n```\n\n---\n\n### Clipboard Functions\n\n#### `copy_to_clipboard(text)`\nCopy text to clipboard.\n\n**Example:**\n```python\ndc.copy_to_clipboard(\"Hello from OpenClaw!\")\n```\n\n#### `get_from_clipboard()`\nGet text from clipboard.\n\n**Returns:** str\n\n**Example:**\n```python\ntext = dc.get_from_clipboard()\nprint(f\"Clipboard: {text}\")\n```\n\n---\n\n## ⌨️ Key Names Reference\n\n### Alphabet Keys\n`'a'` through `'z'`\n\n### Number Keys\n`'0'` through `'9'`\n\n### Function Keys\n`'f1'` through `'f24'`\n\n### Special Keys\n- `'enter'` \u002F `'return'`\n- `'esc'` \u002F `'escape'`\n- `'space'` \u002F `'spacebar'`\n- `'tab'`\n- `'backspace'`\n- `'delete'` \u002F `'del'`\n- `'insert'`\n- `'home'`\n- `'end'`\n- `'pageup'` \u002F `'pgup'`\n- `'pagedown'` \u002F `'pgdn'`\n\n### Arrow Keys\n- `'up'` \u002F `'down'` \u002F `'left'` \u002F `'right'`\n\n### Modifier Keys\n- `'ctrl'` \u002F `'control'`\n- `'shift'`\n- `'alt'`\n- `'win'` \u002F `'winleft'` \u002F `'winright'`\n- `'cmd'` \u002F `'command'` (Mac)\n\n### Lock Keys\n- `'capslock'`\n- `'numlock'`\n- `'scrolllock'`\n\n### Punctuation\n- `'.'` \u002F `','` \u002F `'?'` \u002F `'!'` \u002F `';'` \u002F `':'`\n- `'['` \u002F `']'` \u002F `'{'` \u002F `'}'`\n- `'('` \u002F `')'`\n- `'+'` \u002F `'-'` \u002F `'*'` \u002F `'\u002F'` \u002F `'='`\n\n---\n\n## ?️ Safety Features\n\n### Failsafe Mode\n\nMove mouse to **any corner** of the screen to abort all automation.\n\n```python\n# Enable failsafe (enabled by default)\ndc = DesktopController(failsafe=True)\n```\n\n### Pause Control\n\n```python\n# Pause all automation for 2 seconds\ndc.pause(2.0)\n\n# Check if automation is safe to proceed\nif dc.is_safe():\n    dc.click(500, 500)\n```\n\n### Approval Mode\n\nRequire user confirmation before actions:\n\n```python\ndc = DesktopController(require_approval=True)\n\n# This will ask for confirmation\ndc.click(500, 500)  # Prompt: \"Allow click at (500, 500)? [y\u002Fn]\"\n```\n\n---\n\n## ? Advanced Examples\n\n### Example 1: Automated Form Filling\n\n```python\ndc = DesktopController()\n\n# Click name field\ndc.click(300, 200)\ndc.type_text(\"John Doe\", wpm=80)\n\n# Tab to next field\ndc.press('tab')\ndc.type_text(\"john@example.com\", wpm=80)\n\n# Tab to password\ndc.press('tab')\ndc.type_text(\"SecurePassword123\", wpm=60)\n\n# Submit form\ndc.press('enter')\n```\n\n### Example 2: Screenshot Region and Save\n\n```python\n# Capture specific area\nregion = (100, 100, 800, 600)  # left, top, width, height\nimg = dc.screenshot(region=region)\n\n# Save with timestamp\nimport datetime\ntimestamp = datetime.datetime.now().strftime(\"%Y%m%d_%H%M%S\")\nimg.save(f\"capture_{timestamp}.png\")\n```\n\n### Example 3: Multi-File Selection\n\n```python\n# Hold Ctrl and click multiple files\ndc.key_down('ctrl')\ndc.click(100, 200)  # First file\ndc.click(100, 250)  # Second file\ndc.click(100, 300)  # Third file\ndc.key_up('ctrl')\n\n# Copy selected files\ndc.hotkey('ctrl', 'c')\n```\n\n### Example 4: Window Automation\n\n```python\n# Activate Calculator\ndc.activate_window(\"Calculator\")\ntime.sleep(0.5)\n\n# Type calculation\ndc.type_text(\"5+3=\", interval=0.2)\ntime.sleep(0.5)\n\n# Take screenshot of result\ndc.screenshot(filename=\"calculation_result.png\")\n```\n\n### Example 5: Drag & Drop File\n\n```python\n# Drag file from source to destination\ndc.drag(\n    start_x=200, start_y=300,  # File location\n    end_x=800, end_y=500,       # Folder location\n    duration=1.0                 # Smooth 1-second drag\n)\n```\n\n---\n\n## ⚡ Performance Tips\n\n1. **Use instant movements** for speed: `duration=0`\n2. **Batch operations** instead of individual calls\n3. **Cache screen positions** instead of recalculating\n4. **Disable failsafe** for maximum performance (use with caution)\n5. **Use hotkeys** instead of menu navigation\n\n---\n\n## ⚠️ Important Notes\n\n- **Screen coordinates** start at (0, 0) in top-left corner\n- **Multi-monitor setups** may have negative coordinates for secondary displays\n- **Windows DPI scaling** may affect coordinate accuracy\n- **Failsafe corners** are: (0,0), (width-1, 0), (0, height-1), (width-1, height-1)\n- **Some applications** may block simulated input (games, secure apps)\n\n---\n\n## ? Troubleshooting\n\n### Mouse not moving to correct position\n- Check DPI scaling settings\n- Verify screen resolution matches expectations\n- Use `get_screen_size()` to confirm dimensions\n\n### Keyboard input not working\n- Ensure target application has focus\n- Some apps require admin privileges\n- Try increasing `interval` for reliability\n\n### Failsafe triggering accidentally\n- Increase screen border tolerance\n- Move mouse away from corners during normal use\n- Disable if needed: `DesktopController(failsafe=False)`\n\n### Permission errors\n- Run Python with administrator privileges for some operations\n- Some secure applications block automation\n\n---\n\n## ? Dependencies\n\n- **PyAutoGUI** - Core automation engine\n- **Pillow** - Image processing\n- **OpenCV** (optional) - Image recognition\n- **PyGetWindow** - Window management\n\nInstall all:\n```bash\npip install pyautogui pillow opencv-python pygetwindow\n```\n\n---\n\n**Built for OpenClaw** - The ultimate desktop automation companion ?\n","# Desktop Control Skill\n\n**The most advanced desktop automation skill for OpenClaw.** Provides pixel-perfect mouse control, lightning-fast keyboard input, screen capture, window management, and clipboard operations.\n\n## ? Features\n\n### Mouse Control\n- ✅ **Absolute positioning** - Move to exact coordinates\n- ✅ **Relative movement** - Move from current position\n- ✅ **Smooth movement** - Natural, human-like mouse paths\n- ✅ **Click types** - Left, right, middle, double, triple clicks\n- ✅ **Drag & drop** - Drag from point A to point B\n- ✅ **Scroll** - Vertical and horizontal scrolling\n- ✅ **Position tracking** - Get current mouse coordinates\n\n### Keyboard Control\n- ✅ **Text typing** - Fast, accurate text input\n- ✅ **Hotkeys** - Execute keyboard shortcuts (Ctrl+C, Win+R, etc.)\n- ✅ **Special keys** - Enter, Tab, Escape, Arrow keys, F-keys\n- ✅ **Key combinations** - Multi-key press combinations\n- ✅ **Hold & release** - Manual key state control\n- ✅ **Typing speed** - Configurable WPM (instant to human-like)\n\n### Screen Operations\n- ✅ **Screenshot** - Capture entire screen or regions\n- ✅ **Image recognition** - Find elements on screen (via OpenCV)\n- ✅ **Color detection** - Get pixel colors at coordinates\n- ✅ **Multi-monitor** - Support for multiple displays\n\n### Window Management\n- ✅ **Window list** - Get all open windows\n- ✅ **Activate window** - Bring window to front\n- ✅ **Window info** - Get position, size, title\n- ✅ **Minimize\u002FMaximize** - Control window states\n\n### Safety Features\n- ✅ **Failsafe** - Move mouse to corner to abort\n- ✅ **Pause control** - Emergency stop mechanism\n- ✅ **Approval mode** - Require confirmation for actions\n- ✅ **Bounds checking** - Prevent out-of-screen operations\n- ✅ **Logging** - Track all automation actions\n\n---\n\n## ? Quick Start\n\n### Installation\n\nFirst, install required dependencies:\n\n```bash\npip install pyautogui pillow opencv-python pygetwindow\n```\n\n### Basic Usage\n\n```python\nfrom skills.desktop_control import DesktopController\n\n# Initialize controller\ndc = DesktopController(failsafe=True)\n\n# Mouse operations\ndc.move_mouse(500, 300)  # Move to coordinates\ndc.click()  # Left click at current position\ndc.click(100, 200, button=\"right\")  # Right click at position\n\n# Keyboard operations\ndc.type_text(\"Hello from OpenClaw!\")\ndc.hotkey(\"ctrl\", \"c\")  # Copy\ndc.press(\"enter\")\n\n# Screen operations\nscreenshot = dc.screenshot()\nposition = dc.get_mouse_position()\n```\n\n---\n\n## ? Complete API Reference\n\n### Mouse Functions\n\n#### `move_mouse(x, y, duration=0, smooth=True)`\nMove mouse to absolute screen coordinates.\n\n**Parameters:**\n- `x` (int): X coordinate (pixels from left)\n- `y` (int): Y coordinate (pixels from top)\n- `duration` (float): Movement time in seconds (0 = instant, 0.5 = smooth)\n- `smooth` (bool): Use bezier curve for natural movement\n\n**Example:**\n```python\n# Instant movement\ndc.move_mouse(1000, 500)\n\n# Smooth 1-second movement\ndc.move_mouse(1000, 500, duration=1.0)\n```\n\n#### `move_relative(x_offset, y_offset, duration=0)`\nMove mouse relative to current position.\n\n**Parameters:**\n- `x_offset` (int): Pixels to move horizontally (positive = right)\n- `y_offset` (int): Pixels to move vertically (positive = down)\n- `duration` (float): Movement time in seconds\n\n**Example:**\n```python\n# Move 100px right, 50px down\ndc.move_relative(100, 50, duration=0.3)\n```\n\n#### `click(x=None, y=None, button='left', clicks=1, interval=0.1)`\nPerform mouse click.\n\n**Parameters:**\n- `x, y` (int, optional): Coordinates to click (None = current position)\n- `button` (str): 'left', 'right', 'middle'\n- `clicks` (int): Number of clicks (1 = single, 2 = double)\n- `interval` (float): Delay between multiple clicks\n\n**Example:**\n```python\n# Simple left click\ndc.click()\n\n# Double-click at specific position\ndc.click(500, 300, clicks=2)\n\n# Right-click\ndc.click(button='right')\n```\n\n#### `drag(start_x, start_y, end_x, end_y, duration=0.5, button='left')`\nDrag and drop operation.\n\n**Parameters:**\n- `start_x, start_y` (int): Starting coordinates\n- `end_x, end_y` (int): Ending coordinates\n- `duration` (float): Drag duration\n- `button` (str): Mouse button to use\n\n**Example:**\n```python\n# Drag file from desktop to folder\ndc.drag(100, 100, 500, 500, duration=1.0)\n```\n\n#### `scroll(clicks, direction='vertical', x=None, y=None)`\nScroll mouse wheel.\n\n**Parameters:**\n- `clicks` (int): Scroll amount (positive = up\u002Fleft, negative = down\u002Fright)\n- `direction` (str): 'vertical' or 'horizontal'\n- `x, y` (int, optional): Position to scroll at\n\n**Example:**\n```python\n# Scroll down 5 clicks\ndc.scroll(-5)\n\n# Scroll up 10 clicks\ndc.scroll(10)\n\n# Horizontal scroll\ndc.scroll(5, direction='horizontal')\n```\n\n#### `get_mouse_position()`\nGet current mouse coordinates.\n\n**Returns:** `(x, y)` tuple\n\n**Example:**\n```python\nx, y = dc.get_mouse_position()\nprint(f\"Mouse is at: {x}, {y}\")\n```\n\n---\n\n### Keyboard Functions\n\n#### `type_text(text, interval=0, wpm=None)`\nType text with configurable speed.\n\n**Parameters:**\n- `text` (str): Text to type\n- `interval` (float): Delay between keystrokes (0 = instant)\n- `wpm` (int, optional): Words per minute (overrides interval)\n\n**Example:**\n```python\n# Instant typing\ndc.type_text(\"Hello World\")\n\n# Human-like typing at 60 WPM\ndc.type_text(\"Hello World\", wpm=60)\n\n# Slow typing with 0.1s between keys\ndc.type_text(\"Hello World\", interval=0.1)\n```\n\n#### `press(key, presses=1, interval=0.1)`\nPress and release a key.\n\n**Parameters:**\n- `key` (str): Key name (see Key Names section)\n- `presses` (int): Number of times to press\n- `interval` (float): Delay between presses\n\n**Example:**\n```python\n# Press Enter\ndc.press('enter')\n\n# Press Space 3 times\ndc.press('space', presses=3)\n\n# Press Down arrow\ndc.press('down')\n```\n\n#### `hotkey(*keys, interval=0.05)`\nExecute keyboard shortcut.\n\n**Parameters:**\n- `*keys` (str): Keys to press together\n- `interval` (float): Delay between key presses\n\n**Example:**\n```python\n# Copy (Ctrl+C)\ndc.hotkey('ctrl', 'c')\n\n# Paste (Ctrl+V)\ndc.hotkey('ctrl', 'v')\n\n# Open Run dialog (Win+R)\ndc.hotkey('win', 'r')\n\n# Save (Ctrl+S)\ndc.hotkey('ctrl', 's')\n\n# Select All (Ctrl+A)\ndc.hotkey('ctrl', 'a')\n```\n\n#### `key_down(key)` \u002F `key_up(key)`\nManually control key state.\n\n**Example:**\n```python\n# Hold Shift\ndc.key_down('shift')\ndc.type_text(\"hello\")  # Types \"HELLO\"\ndc.key_up('shift')\n\n# Hold Ctrl and click (for multi-select)\ndc.key_down('ctrl')\ndc.click(100, 100)\ndc.click(200, 100)\ndc.key_up('ctrl')\n```\n\n---\n\n### Screen Functions\n\n#### `screenshot(region=None, filename=None)`\nCapture screen or region.\n\n**Parameters:**\n- `region` (tuple, optional): (left, top, width, height) for partial capture\n- `filename` (str, optional): Path to save image\n\n**Returns:** PIL Image object\n\n**Example:**\n```python\n# Full screen\nimg = dc.screenshot()\n\n# Save to file\ndc.screenshot(filename=\"screenshot.png\")\n\n# Capture specific region\nimg = dc.screenshot(region=(100, 100, 500, 300))\n```\n\n#### `get_pixel_color(x, y)`\nGet color of pixel at coordinates.\n\n**Returns:** RGB tuple `(r, g, b)`\n\n**Example:**\n```python\nr, g, b = dc.get_pixel_color(500, 300)\nprint(f\"Color at (500, 300): RGB({r}, {g}, {b})\")\n```\n\n#### `find_on_screen(image_path, confidence=0.8)`\nFind image on screen (requires OpenCV).\n\n**Parameters:**\n- `image_path` (str): Path to template image\n- `confidence` (float): Match threshold (0-1)\n\n**Returns:** `(x, y, width, height)` or None\n\n**Example:**\n```python\n# Find button on screen\nlocation = dc.find_on_screen(\"button.png\")\nif location:\n    x, y, w, h = location\n    # Click center of found image\n    dc.click(x + w\u002F\u002F2, y + h\u002F\u002F2)\n```\n\n#### `get_screen_size()`\nGet screen resolution.\n\n**Returns:** `(width, height)` tuple\n\n**Example:**\n```python\nwidth, height = dc.get_screen_size()\nprint(f\"Screen: {width}x{height}\")\n```\n\n---\n\n### Window Functions\n\n#### `get_all_windows()`\nList all open windows.\n\n**Returns:** List of window titles\n\n**Example:**\n```python\nwindows = dc.get_all_windows()\nfor title in windows:\n    print(f\"Window: {title}\")\n```\n\n#### `activate_window(title_substring)`\nBring window to front by title.\n\n**Parameters:**\n- `title_substring` (str): Part of window title to match\n\n**Example:**\n```python\n# Activate Chrome\ndc.activate_window(\"Chrome\")\n\n# Activate VS Code\ndc.activate_window(\"Visual Studio Code\")\n```\n\n#### `get_active_window()`\nGet currently focused window.\n\n**Returns:** Window title (str)\n\n**Example:**\n```python\nactive = dc.get_active_window()\nprint(f\"Active window: {active}\")\n```\n\n---\n\n### Clipboard Functions\n\n#### `copy_to_clipboard(text)`\nCopy text to clipboard.\n\n**Example:**\n```python\ndc.copy_to_clipboard(\"Hello from OpenClaw!\")\n```\n\n#### `get_from_clipboard()`\nGet text from clipboard.\n\n**Returns:** str\n\n**Example:**\n```python\ntext = dc.get_from_clipboard()\nprint(f\"Clipboard: {text}\")\n```\n\n---\n\n## ⌨️ Key Names Reference\n\n### Alphabet Keys\n`'a'` through `'z'`\n\n### Number Keys\n`'0'` through `'9'`\n\n### Function Keys\n`'f1'` through `'f24'`\n\n### Special Keys\n- `'enter'` \u002F `'return'`\n- `'esc'` \u002F `'escape'`\n- `'space'` \u002F `'spacebar'`\n- `'tab'`\n- `'backspace'`\n- `'delete'` \u002F `'del'`\n- `'insert'`\n- `'home'`\n- `'end'`\n- `'pageup'` \u002F `'pgup'`\n- `'pagedown'` \u002F `'pgdn'`\n\n### Arrow Keys\n- `'up'` \u002F `'down'` \u002F `'left'` \u002F `'right'`\n\n### Modifier Keys\n- `'ctrl'` \u002F `'control'`\n- `'shift'`\n- `'alt'`\n- `'win'` \u002F `'winleft'` \u002F `'winright'`\n- `'cmd'` \u002F `'command'` (Mac)\n\n### Lock Keys\n- `'capslock'`\n- `'numlock'`\n- `'scrolllock'`\n\n### Punctuation\n- `'.'` \u002F `','` \u002F `'?'` \u002F `'!'` \u002F `';'` \u002F `':'`\n- `'['` \u002F `']'` \u002F `'{'` \u002F `'}'`\n- `'('` \u002F `')'`\n- `'+'` \u002F `'-'` \u002F `'*'` \u002F `'\u002F'` \u002F `'='`\n\n---\n\n## ?️ Safety Features\n\n### Failsafe Mode\n\nMove mouse to **any corner** of the screen to abort all automation.\n\n```python\n# Enable failsafe (enabled by default)\ndc = DesktopController(failsafe=True)\n```\n\n### Pause Control\n\n```python\n# Pause all automation for 2 seconds\ndc.pause(2.0)\n\n# Check if automation is safe to proceed\nif dc.is_safe():\n    dc.click(500, 500)\n```\n\n### Approval Mode\n\nRequire user confirmation before actions:\n\n```python\ndc = DesktopController(require_approval=True)\n\n# This will ask for confirmation\ndc.click(500, 500)  # Prompt: \"Allow click at (500, 500)? [y\u002Fn]\"\n```\n\n---\n\n## ? Advanced Examples\n\n### Example 1: Automated Form Filling\n\n```python\ndc = DesktopController()\n\n# Click name field\ndc.click(300, 200)\ndc.type_text(\"John Doe\", wpm=80)\n\n# Tab to next field\ndc.press('tab')\ndc.type_text(\"john@example.com\", wpm=80)\n\n# Tab to password\ndc.press('tab')\ndc.type_text(\"SecurePassword123\", wpm=60)\n\n# Submit form\ndc.press('enter')\n```\n\n### Example 2: Screenshot Region and Save\n\n```python\n# Capture specific area\nregion = (100, 100, 800, 600)  # left, top, width, height\nimg = dc.screenshot(region=region)\n\n# Save with timestamp\nimport datetime\ntimestamp = datetime.datetime.now().strftime(\"%Y%m%d_%H%M%S\")\nimg.save(f\"capture_{timestamp}.png\")\n```\n\n### Example 3: Multi-File Selection\n\n```python\n# Hold Ctrl and click multiple files\ndc.key_down('ctrl')\ndc.click(100, 200)  # First file\ndc.click(100, 250)  # Second file\ndc.click(100, 300)  # Third file\ndc.key_up('ctrl')\n\n# Copy selected files\ndc.hotkey('ctrl', 'c')\n```\n\n### Example 4: Window Automation\n\n```python\n# Activate Calculator\ndc.activate_window(\"Calculator\")\ntime.sleep(0.5)\n\n# Type calculation\ndc.type_text(\"5+3=\", interval=0.2)\ntime.sleep(0.5)\n\n# Take screenshot of result\ndc.screenshot(filename=\"calculation_result.png\")\n```\n\n### Example 5: Drag & Drop File\n\n```python\n# Drag file from source to destination\ndc.drag(\n    start_x=200, start_y=300,  # File location\n    end_x=800, end_y=500,       # Folder location\n    duration=1.0                 # Smooth 1-second drag\n)\n```\n\n---\n\n## ⚡ Performance Tips\n\n1. **Use instant movements** for speed: `duration=0`\n2. **Batch operations** instead of individual calls\n3. **Cache screen positions** instead of recalculating\n4. **Disable failsafe** for maximum performance (use with caution)\n5. **Use hotkeys** instead of menu navigation\n\n---\n\n## ⚠️ Important Notes\n\n- **Screen coordinates** start at (0, 0) in top-left corner\n- **Multi-monitor setups** may have negative coordinates for secondary displays\n- **Windows DPI scaling** may affect coordinate accuracy\n- **Failsafe corners** are: (0,0), (width-1, 0), (0, height-1), (width-1, height-1)\n- **Some applications** may block simulated input (games, secure apps)\n\n---\n\n## ? Troubleshooting\n\n### Mouse not moving to correct position\n- Check DPI scaling settings\n- Verify screen resolution matches expectations\n- Use `get_screen_size()` to confirm dimensions\n\n### Keyboard input not working\n- Ensure target application has focus\n- Some apps require admin privileges\n- Try increasing `interval` for reliability\n\n### Failsafe triggering accidentally\n- Increase screen border tolerance\n- Move mouse away from corners during normal use\n- Disable if needed: `DesktopController(failsafe=False)`\n\n### Permission errors\n- Run Python with administrator privileges for some operations\n- Some secure applications block automation\n\n---\n\n## ? Dependencies\n\n- **PyAutoGUI** - Core automation engine\n- **Pillow** - Image processing\n- **OpenCV** (optional) - Image recognition\n- **PyGetWindow** - Window management\n\nInstall all:\n```bash\npip install pyautogui pillow opencv-python pygetwindow\n```\n\n---\n\n**Built for OpenClaw** - The ultimate desktop automation companion ?\n",{"description":7},"main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","工作流自动化\u002Fdesktop-control-1-0-0",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill desktop-control-1-0-0",{"tool":48,"command":49},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill desktop-control-1-0-0",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill desktop-control-1-0-0","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002FSKILL.md",true,[56,62,68,72,76,80],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"__init__.py","SCRIPT","脚本",18283,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002F__init__.py",{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"_meta.json","REFERENCE","参考文档",295,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002F_meta.json",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"AI_AGENT_GUIDE.md",10603,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002FAI_AGENT_GUIDE.md",{"path":73,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":74,"sourceHtmlUrl":75},"ai_agent.py",20849,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002Fai_agent.py",{"path":77,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":78,"sourceHtmlUrl":79},"demo.py",6950,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002Fdemo.py",{"path":81,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":82,"sourceHtmlUrl":83},"QUICK_REFERENCE.md",5253,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fdesktop-control-1-0-0\u002FQUICK_REFERENCE.md",[85,109,132,140,147,174],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":29},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[87,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],"safe","ethereum","defi","Optimization","user","use","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":29},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[],[115,116,117,118,119,120,121,94,122,98,123,124,125,126,127,128,129,130,131],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":133,"name":134,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":29},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[],[115,138,139,116,117,118,119,120,121,94,122,98,124,125,126,127,128,129,130,131],"api skill","zerion api skill",{"skillNo":141,"name":142,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":29},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[],[118,115,146,116,117,119,120,94,122,98,123,124,125,126,127,128,129,130,131],"zerion api mcp",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":29},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[],[154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":29},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[],[154,155,157,181,182,183,184,185,186,165,187,188,189,190,191,192,193,194,131,172],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]