查看Mouse and Keyboard libraries的源代码
←
Mouse and Keyboard libraries
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
你刚才请求的操作只对属于该用户组的用户开放:
用户
您可以查看并复制此页面的源代码:
'''[https://www.arduino.cc/en/Reference/MouseKeyboard Mouse and Keyboard libraries]''' These core libraries allow a 32u4 based boards or Due and Zero board to appear as a native Mouse and/or Keyboard to a connected computer. A word of caution on using the Mouse and Keyboard libraries: if the Mouse or Keyboard library is constantly running, it will be difficult to program your board. Functions such as Mouse.move() and Keyboard.print() will move your cursor or send keystrokes to a connected computer and should only be called when you are ready to handle them. It is recommended to use a control system to turn this functionality on, like a physical switch or only responding to specific input you can control. When using the Mouse or Keyboard library, it may be best to test your output first using Serial.print(). This way, you can be sure you know what values are being reported. Refer to the Mouse and Keyboard examples for some ways to handle this. <font color="orange" size="+1">'''Mouse'''</font> The mouse functions enable a Leonardo, Micro, or Due to control cursor movement on a connected computer. When updating the cursor position, it is always relative to the cursor's previous location. :- [[Mouse.begin()]] :- [[Mouse.click()]] :- [[Mouse.end()]] :- [[Mouse.move()]] :- [[Mouse.press()]] :- [[Mouse.release()]] :- [[Mouse.isPressed()]] <font color="orange" size="+1">'''Keyboard'''</font> The keyboard functions enable a Leonardo, Micro, or Due to send keystrokes to an attached computer. Note: Not every possible ASCII character, particularly the non-printing ones, can be sent with the Keyboard library. The library supports the use of modifier keys. Modifier keys change the behavior of another key when pressed simultaneously. See here for additional information on supported keys and their use. :- [[Keyboard.begin()]] :- [[Keyboard.end()]] :- [[Keyboard.press()]] :- [[Keyboard.print()]] :- [[Keyboard.println()]] :- [[Keyboard.release()]] :- [[Keyboard.releaseAll()]] :- [[Keyboard.write()]] <font color="orange" size="+1">'''Examples'''</font> :- [[KeyboardAndMouseControl]]: Demonstrates the Mouse and Keyboard commands in one program. :- [[KeyboardMessage]]: Sends a text string when a button is pressed. :- [[KeyboardLogout]]: Logs out the current user with key commands :- [[KeyboardSerial]]: Reads a byte from the serial port, and sends back a keystroke. :- [[KeyboardReprogram]]: opens a new window in the Arduino IDE and reprograms the board with a simple blink program :- [[ButtonMouseControl]]: Control cursor movement with 5 pushbuttons. :- [[JoystickMouseControl]]: Controls a computer's cursor movement with a Joystick when a button is pressed. ---- [[Arduino语法参考 | 返回Arduino语法参考列表]] 更多建议和问题欢迎反馈至 [http://www.yfrobot.com YFRobot论坛]
返回
Mouse and Keyboard libraries
。
导航菜单
个人工具
登录
名字空间
页面
讨论
不转换
变种
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
YF-论坛提问
YFRobot-直营店
YFRobot-企业店
Arduino
Arduino之入门篇
Arduino入门教程
Arduino语法参考
Arduino库
Arduino核心代码
编程平台
Mixly库
Mind+库
MakeCode扩展
传感器系列
积木式传感器系列
黑板传感器系列
蓝板传感器系列
Micro:Bit
Micro:Bit 通用基础教程
Valon智能车
Valon-I
帮助
帮助
wiki语法参考
工具箱
链入页面
相关更改
特殊页面
页面信息