Mouse.begin()

描述

初始化 HID 鼠标。begin()要在尚未呼叫任何鼠标控制函式前呼叫。
要结束 HID 鼠标的模拟行为,必需呼叫 Mouse.end()

语法


Mouse.begin()

参数

回传

无回传值

范例

void setup(){
  pinMode(2, INPUT);
}

void loop(){

  // 按钮被按下后,初始化 HID 鼠标
  if (digitalRead(2) == HIGH) {
     Mouse.begin();
  } 

}

See also

Mouse.click()
Mouse.end()
Mouse.move()
Mouse.press()
Mouse.release()
Mouse.isPressed()


函式库参考主页面

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.