Coder Social home page Coder Social logo

deckerego / macropad_hotkeys Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 13.0 28 KB

A derivative of the Macropad Hotkeys example from the Adafruit Learning System Guide

License: MIT License

Python 100.00%
macropad circuitpython adafruit rp2040 neopixel keyboard

macropad_hotkeys's Introduction

Macropad Hotkeys II

A derivative of the Macropad Hotkeys example from the Adafruit Learning System Guide.

Modifications

  • Rotary button no longer is an action, instead it turns on/off the displays
  • Macros for Blender, Safari, MIDI drum kit, generic number pad and Zoom
  • Support for HID consumer control codes
  • Support for mouse buttons
  • Support for sending MIDI notes
  • When no HID connection is present (power only), keep LEDs off and provide a message
  • Mount filesystem as read-only unless the encoder button is pressed on boot
  • Refactored the code to make it (maybe) easier to modify

Using

You use the Macropad Hotkeys much like the original Adafruit version, with a few differences.

Use the dial to select the macro template you would like to use. The macros appear in the order specified within each config file (see Configuration below for details). Once you have the macro you like selected, you are free to hammer away at the keys.

Click the rotary dial to turn off the display & LEDs - click it again to turn it back on. Note the keys continue to respond even when they are not lit.

Configuration

The macros/ folder has a list of macro templates to chose from, all of which can be altered at your whim. First make sure to mount your Macropad in read/write mode (see Updating) and then open up the .py examples in the macros/ folder. Note that each has a list of settings, including:

  • The name that will show at the top of the OLED display
  • The sequential order that it will be shown when rotating the encoder dial
  • A list of macros, sorted by row

Each macro consists of an LED color, a label to appear on the OLED display, and a sequence of keys. A "key" can be text, a keyboard key, a consumer control key (like play/pause), a mouse action, or a MIDI note. More than one key can be specified in a sequence.

Installing

First make sure that your Macropad has the latest version of CircuitPython installed. See https://learn.adafruit.com/adafruit-macropad-rp2040/circuitpython for instructions on how to update the Macropad to have the latest version of CircuitPython.

When installing Macropad Hotkeys for the first time, extract the latest MacroPad Hotkeys.zip into a directory, then copy the contents of that extracted archive into the CIRCUITPY drive that appears when you plug in your Macropad. Ensure that the contents of the lib/ subdirectory are also copied - these are the precompiled Adafruit libraries that power the Macropad.

Updating

After you first install this version of Macropad Hotkeys and reboot the Macropad, the CIRCUITPY filesystem will be mounted as read-only. When mounting the device as read-only, Windows and MacOS won't complain if you unplug or reboot the device without unmounting it, making it more like a regular old HID device.

To update or edit the code on the device, or to modify the macros, you first need to reboot the device with the CIRCUITPY drive mounted in read/write mode. To do that, reboot the device using the boot switch on the left of the Macropad, and then after releasing the button immediately hold down the rotary encoder button. You should see the text "Mounting Read/Write" quickly appear on the screen, and then the CIRCUITPY drive will mount in read/write mode.

macropad_hotkeys's People

Contributors

deckerego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

macropad_hotkeys's Issues

lib does not have .mpy files

Hi there,

I just downloaded your Hotkeys and realized that the lib directory doesn't actually have the .mpy files referred to in the readme. Wasn't sure if that was an oversight, I was also able to resolve it using the methods you described (i.e. pulling them from another source) but from the text of the /lib readme it sounds like they should also be there so it runs "out of the box".

String commands ends the program

When having any text in quotes for key presses, the program quits and shows "Code Done Running" This also causes any modifier keys used to be held down until you reset the MacroPad. Keycode commands works but there is no way to send a string of text.

How to have a macro that is combination plus single button

Hello,

Trying to figure out how to have a macro set to CTRL-K and then a Z.

This is for example for Visual Studio "Zen" Mode.
I can only get it to do CTRL-K-Z for example, but i need it to release CTRL-K before sending Z.

Any ideas?

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.