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.
