Mouse.end()

描述

結束 HID 滑鼠模擬行為。
如果要開始模擬,請呼叫 Mouse.begin() 函式。

語法


Mouse.end()

參數

回傳

無回傳值

範例

void setup(){
  pinMode(2,INPUT);
  // 初始化 HID 滑鼠函式庫
  Mouse.begin();
}

void loop(){
  // 外部按鈕被按下後,送出雙擊滑鼠左鍵的命令,然後停止滑鼠模擬
  if(digitalRead(2) == HIGH){
    Mouse.click();
    Mouse.end();
  } 
}

See also

Mouse.begin()
Mouse.click()
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.