# Mouse and keyboard functions

**URL:** https://discourse.processing.org/t/mouse-and-keyboard-functions/38594
**Category:** Coding Questions
**Created:** [September 1, 2022, 6:11am UTC](https://discourse.processing.org/t/mouse-and-keyboard-functions/38594 "2022-09-01T06:11:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![reacttoimpact](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@reacttoimpact](https://discourse.processing.org/u/reacttoimpact)
#### Post date: [September 1, 2022, 6:11am UTC](https://discourse.processing.org/t/mouse-and-keyboard-functions/38594/1 "2022-09-01T06:11:58Z")

</div>

Hi,  
i don’t know **if this is possible** , but can you **simulate mouse clicks, moves and keyboard types with processing?**  
eg. a virtual **keyboard/mouse controlled by the code**?  
say the mouse pointer was on the screen(win 10 desktop), can i **move it with processing code**?  
then can i code it to lype a letter? outside of the processing window?

Many thanks

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [September 1, 2022, 6:27am UTC](https://discourse.processing.org/t/mouse-and-keyboard-functions/38594/2 "2022-09-01T06:27:00Z")

</div>

- [Tagged with robot.keypress() - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussions/tagged%3FTag=robot.keypress().html)
- [Tagged with robot.mousemove() - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussions/tagged%3FTag=robot.mousemove().html)
- [Robot (Java SE 11 & JDK 11 )](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/awt/Robot.html)
