Giter Club home page Giter Club logo

keymouse_t3's Introduction

Key and Mouse Playback

This library was designed for use with Teensy 3/LC but now works with Arduino and Arduino compatible boards. An example is included for the Adafruit Circuit Playground Express M0.

Play USB keyboard and USB mouse output from an ASCII string. This can be used launch applications using a button press or cap touch.

Launch Chrome to YouTube

Example: The following string launches the Chrome browser to Google using Windows.

"GUI-KEY_R ~100 'chrome' SPACE 'https://www.google.com/' ENTER"

GUI-KEY_R -- The GUI key refers to the Windows logo key. KEY_R is the 'R' key so GUI-KEY_R is equivalent to pressing and holding the GUI key, pressing and releasing the 'R' key, then releasing the GUI key. On Windows, this opens a one line command window.

~100 -- This means delay for 100 * 10 milliseconds = 1 second. This allows time for the command window to open.

'chrome' -- This enters 'chrome' into the command line window.

SPACE -- This appends a SPACE character to the command.

'https://www.google.com/' -- This appends the Google URL into the command line.

ENTER -- This is equivalent to pressing the keyboard Enter key.

For Linux, change GUI-KEY_R to ALT-F2.

The key and mouse names are listed in keynames.h.

Examples

  • "CTRL-MOUSE_LEFT" -- Control left mouse click.
  • "+CTRL MOUSE_LEFT -CTRL" -- Same as above but requires more typing.
  • "+CTRL ~1 MOUSE_LEFT ~1 -CTRL" -- Add 10 ms delay around left mouse click. The '+' prefix means press and hold the key down. The '-' prefix means release the key.

WARNING: Strings with embedded spaces are not currently supported. For example, the string 'chrome https://www.google.com/' does not work because it has an embedded space between 'chrome' and the URL. See the above example for how to handle this.

Examples

CircuitPlayground

Demonstrate key macros triggered by CPX buttons and captouch. Turns a CPX into an application launcher. As long as the application can be launched from command line, there is no need to install software on the computer.

  • Pressing the left button opens Chrome to Google.
  • Pressing the right button opens Chrome to Youtube.
  • Touching captouch #3 (A4) opens Chrome to Adafruit.

The only problem is the sketch must be recompiled and uploaded to change the keyboard macros. See the XYmodem project for a version where the key macros can be uploaded using the YMODEM file transfer protocol. This allows users to change the macros without installing and using the Arduino IDE. The only program required is a terminal program such as TeraTerm or minicom.

keymouse_t3's People

Contributors

gdsports avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ezhangle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.