描述 初始化 HID 键盘。begin()要在尚未呼叫任何键盘控制函式前呼叫。 要结束 HID 键盘的模拟行为,必需呼叫 Keyboard.end()。 语法 Keyboard.begin() 参数 回传 无回传值 范例 See also - Keyboard.end() - Keyboard.press() - Keyboard.print() - Keyboard.println() - Keyboard.release() - Keyboard.releaseAll() - Keyboard.write() 函式库参考主页面 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. […]
描述 检查鼠标上的按键有没有被按下。 语法 Mouse.isPressed(); Mouse.isPressed(button); 参数 当没有输入参数,预设是左键。 button:要检查哪一个按键 char 型别 -MOUSE_LEFT(预设) -MOUSE_RIGHT -MOUSE_MIDDLE 回传 布林值:指定的键有没有被按下 范例 See also - Mouse.begin() - Mouse.click() - Mouse.end() - Mouse.move() - Mouse.press() - Mouse.release() 函式库参考主页面 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 […]
描述 放開一個已被按下(請參考 Mouse.press())的鼠標按鍵。Mouse.release() 預設是鼠標左鍵。 注意:當你呼叫 Mouse.release() 函式後,86Duino 會接管你的鼠標,使它做出放開鼠標按鍵的行為(使用此函式前,請確認實體鼠標運作是沒問題的)。 建議你可以在程式中,判斷一個外接按鈕是否按下,來決定是否送出放開 86Duino 鼠標按鍵的命令。 語法 Mouse.release(); Mouse.release(button); 參數 button:要放開哪一個按鍵 char 型別 -MOUSE_LEFT(預設) -MOUSE_RIGHT -MOUSE_MIDDLE 回傳 無回傳值 範例 See also - Mouse.begin() - Mouse.click() - Mouse.end() - Mouse.move() - Mouse.press() - Mouse.isPressed() 函式庫參考主頁面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed […]
描述 送出按下鼠标键的命令给电脑(相当于按着鼠标按键不放)。若要放开鼠标按键,请呼叫 Mouse.release() 函式。 在呼叫 Mouse.press() 函式之前,要先呼叫 Mouse.begin() 函式。 Mouse.press() 预设是鼠标左键。 注意:当你呼叫 Mouse.press() 函式后,86Duino 会接管你的鼠标,使它做出按下鼠标按键的行为(使用此函式前,请确认实体鼠标运作是没问题的)。 建议你可以在程式中,判断一个外接按钮是否按下,来决定是否送出按下 86Duino 鼠标按键的命令。 语法 Mouse.press(); Mouse.press(button); 参数 button:要按下哪一个按键 char 型别 -MOUSE_LEFT(预设) -MOUSE_RIGHT -MOUSE_MIDDLE 回传 无回传值 范例 See also - Mouse.begin() - Mouse.click() - Mouse.end() - Mouse.move() - Mouse.release() - Mouse.isPressed() 函式库参考主页面 The text of the 86Duino reference is a modification […]
描述 移动电脑上的鼠标。在萤幕上,鼠标的移动距离是一个相对值(即上一个位置与目前位置的距离)。在呼叫 Mouse.move() 函式之前,要先呼叫 Mouse.begin() 函式。 注意:当你呼叫 Mouse.move() 函式后,86Duino 会接管你的鼠标,使它做出移动的行为(使用此函式前,请确认实体鼠标运作是没问题的)。 建议你可以在程式中,判断一个外接按钮是否按下,来决定是否送出移动 86Duino 鼠标的命令。 语法 Mouse.move(xVal, yPos, wheel); 参数 xVal:沿着 X 轴移动的距离 signed char 型别 yVal:沿着 Y 轴移动的距离 signed char 型别 wheel:滚轮移动的距离 signed char 型别 回传 无回传值 范例 See also - Mouse.begin() - Mouse.click() - Mouse.end() - Mouse.press() - Mouse.release() - Mouse.isPressed() 函式库参考主页面 The text of […]
描述 结束 HID 鼠标模拟行为。 如果要开始模拟,请呼叫 Mouse.begin() 函式。 语法 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 […]
描述 送出敲击(先按下然后放开)鼠标键的命令给电脑。 Mouse.click() 预设是鼠标左键。 注意:当你使用 Mouse.click() 函式后,86Duino 会接管你的鼠标,使它做出敲击按键的行为(使用此函式前,请确认实体鼠标运作是没问题的)。 建议你可以在程式中,判断一个外接按钮是否按下,来决定是否送出敲击 86Duino 鼠标的命令。 语法 Mouse.click(); Mouse.click(button); 参数 button:要敲击哪一个按键 char 型别 -MOUSE_LEFT (预设) -MOUSE_RIGHT -MOUSE_MIDDLE 回传 无回传值 范例 See also - Mouse.begin() - 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 […]
描述 初始化 HID 鼠标。begin()要在尚未呼叫任何鼠标控制函式前呼叫。 要结束 HID 鼠标的模拟行为,必需呼叫 Mouse.end()。 语法 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 […]
86Duino IDE 从 Coding 104 开始加入此函式库,当您将 86Duino 板子插上电脑后,会出现 86Duino 的 HID USB 键盘和鼠标装置。 使用鼠标与键盘 USB-HID 函式库时,需要注意: 当鼠标和键盘正不断在运作时,它将干扰您编辑或烧录 sketch 的过程,像是 Mouse.move() 和 Keyboard.print() 函式,它会不断移动您的鼠标以及按下您的键盘按键。建议您在 sketch 程式中,替这些函式加上一些启动条件,使鼠标或键盘的行为变成可控,例如:按下某个开关或者读到某个 pin 为指定的输入后,才呼叫函式。 当您在使用 Mouse 或者 Keyboard 函式库时,建议您搭配使用 Serial.print() 函式来输出讯息,如此一来,您就可以知道 86Duino 送给电脑的实际数值。 鼠标 当 86Duino 与电脑连接时,它可以控制电脑上的鼠标行为。注意:当鼠标的位置被更新时(移动鼠标),总是会回传距离上次位置的相对值。 - Mouse.begin() - Mouse.click() - Mouse.end() - Mouse.move() - Mouse.press() - Mouse.release() - Mouse.isPressed() 键盘 […]
描述 关闭 86Duino 编码器介面。(编码器介面关闭后,可用 begin() 重新初始化成新的工作模式。) 语法 Enc0.end() Enc1.end() Enc2.end() Enc3.end() 参数 Enc0、Enc1、Enc2、Enc3:分别对应 ENC0、ENC1、ENC2、ENC3 编码器介面。 回传 无回传值 See also - begin() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.