通过键盘移动鼠标光标 autohotkey

通过键盘移动鼠标光标

MouseMove键

参数定义
  • MouseMove, X, Y [, Speed, R]
    鼠标移动的目标位置的 x/y 坐标, 可以为 表达式. 坐标相对于活动窗口
  • Speed
    移动鼠标的速度,介于 0(最快)和 100(最慢)之间,可以为表达式。
    注:速度为 0 表示瞬时移动鼠标到目标位置。如果省略,则使用默认速度。
  • R
    如果此参数为字母 R, 则会把 X 和 Y 坐标视为距离当前鼠标位置的偏移. 换句话说, 会把光标从当前位置往右移动 X 像素 (负值则往左) 且往下移动 Y 像素 (负值则往上).

键盘移动鼠标位置

*#up::MouseMove, 0, -10, 0, R  ; Win+UpArrow 热键 => 上移光标
*#Down::MouseMove, 0, 10, 0, R  ; Win+DownArrow => 下移光标
*#Left::MouseMove, -10, 0, 0, R  ; Win+LeftArrow => 左移光标
*#Right::MouseMove, 10, 0, 0, R  ; Win+RightArrow => 右移光标

键盘控制鼠标点击

*<#RCtrl::  ; LeftWin + RightControl => Left-click (按住 Control/Shift 来进行 Control-Click 或 Shift-Click).
SendEvent {Blind}{LButton down}
KeyWait RCtrl  ; 防止键盘自动重复导致的重复鼠标点击.
SendEvent {Blind}{LButton up}
return

*<#AppsKey::  ; LeftWin + AppsKey => Right-click
SendEvent {Blind}{RButton down}
KeyWait AppsKey  ; 防止键盘自动重复导致重复的鼠标点击.
SendEvent {Blind}{RButton up}
return

你可能感兴趣的:(autohotkey,autohotkey,每日渐进,autohotkey,鼠标光标移动)