Easiest way to add Macros to Atreus?

Would someone be able to help me understand the simplest way to put a custom sketch (with minor changes - I only really want to include some basic Macros) on the Atreus, whilst still being able to use Chrysalis to manage my keymap?

I had issues before (see this Topic on Macros not working) because what I thought was the easiest way gave me issues.

I previously used the Arduino Boards Manager with the URL in the docs to get an up to date version of Kaleidoscope, combined with the latest version of Chrysalis to manage my keymap in EEProm, and used one of the included sketches as my starting place to add some macros. That gave me issues since Chrysalis seemed to be expecting a version of the Macros plugin that wasn’t yet in the Boards Manager version of Kaleidoscope, and so since then I’ve been manually picking old versions of both to make sure it keeps working.

Is there a better way to do this, for someone that only wants “latest/stable” of everything and to add a couple of basic macros?

I think the Arduino boards-manager version of Kaleidoscope is reasonably up to date. For a while last year, it wasn’t, but there are really only minor differences between the current version and the master branch.

To get the most up-to-date version of Kaleidoscope, you can clone the repository from GitHub. I think there’s a way to use that source tree from the Arduino IDE, but I’m afraid I can’t help you with that. There are very simple instructions on building from the command-line in Kaleidoscope’s README, however (possibly requiring more setup if you’re on Windows).

What kinds of things do you want to do with Macros? The main thing is to define a macroAction() function in your sketch, for which you can refer to the Macros documentation.

Thanks @merlin ! That’s really helpful to know.

All that I really want to do is add some often used strings or sequences to macros (for example, I’ve put my email address in to a macro so I don’t have to type it out every time, I also have some keystrokes & chords in MS Office that are quite repetitive and I want to bind to a single key in a different layer).

I’m comfortable using any kind of dev environment - I was really looking to make sure I was doing it the “easy way”, or at least the easiest way I could find. It sounds like I should be okay to just stick with boards-manager version.

I think part of what I got stuck with was that my mental model of what the boards-manager was actually doing was broken/missing… I found it confusing that I couldn’t “fix” the boards-manager version with code from github and then keep using it, but I think I understand this a little better now. It sounds like that’s a quirk of the boards-manager needing to be packaged differently for Arduino IDE than the way the source is structured in GitHub.

Would you mind helping me to clarify one other thing? I THINK in normal circumstances there are two things on the device:

  1. The firmware (which includes my sketch - the thing which is run when the device powers on) and this would include any macros that I wrote, or extra plugins that were linked in the build.
  2. The Keymap - which goes in to EEPROM, and which the firmware then (so long as you enable this) loads back out of EEPROM each time the device is powered on. It can be edited by Chrysalis (or other tools).

Is this right? What I’m trying to check is that the firmware isn’t somehow separate from the sketch that I’m amending (in which case there would be 3 things; the sketch, the firmware, and the keymap).

Thanks again for your help, and all your answers in the community. There have been many other questions I’ve read that already had an answer from you! :pray:

This is correct. The EEPROM can store more than just the keymap, but that’s mostly something that will come in the future.

The “easy way” is very user-dependent. For me, the CLI is far easier than the Arduino IDE, which is why I’m terrible at being able to help with the latter.

In most cases, this can be done without Macros, by adding modifier flags to keys in the keymap. I forget the terminology Chrysalis uses for it, but it’s pretty easy to find. In Kaleidoscope, you can use LSHIFT(LCTRL(Key_X)), for example.

Thanks very much - this was really helpful :slight_smile: