diff --git a/README.md b/README.md index 131622f6..bc97d208 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Akela-MagicCombo +# Kaleidoscope-MagicCombo ![status][st:stable] @@ -19,9 +19,10 @@ To use the extension, we must include the header, create a dictionary, and configure the plugin to use it: ```c++ -#include +#include +#include -static const Akela::MagicCombo::dictionary_t dictionary[] PROGMEM = { +static const KaleidoscopePlugins::MagicCombo::dictionary_t dictionary[] PROGMEM = { {R1C3 | R2C1 | R2C4 | R2C7, // left hand, R0C11 | R1C12 | R2C14 //right hand }, @@ -31,8 +32,8 @@ static const Akela::MagicCombo::dictionary_t dictionary[] PROGMEM = { void setup (void) { MagicCombo.configure (dictionary); - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&MagicCombo, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&MagicCombo, NULL); } ``` @@ -41,7 +42,7 @@ element in the array has two fields: the left hand state, and the right hand state upon which to trigger the custom action. Both of these are bit fields, each bit set tells the extension that the key with that index must be held for the action to trigger. It is recommended to use the `RxCy` macros of the core -`KeyboardioFirmware`, and *or* them together to form a bitfield. +`KaleidoscopeFirmware`, and *or* them together to form a bitfield. The dictionary **must** end with an element containing zero values for both the left and the right halves. @@ -86,4 +87,4 @@ the overrideable `magicComboActions` function: Starting from the [example][plugin:example] is the recommended way of getting started with the plugin. - [plugin:example]: https://github.com/keyboardio/Akela-MagicCombo/blob/master/examples/MagicCombo/MagicCombo.ino + [plugin:example]: https://github.com/keyboardio/Kaleidoscope-MagicCombo/blob/master/examples/MagicCombo/MagicCombo.ino diff --git a/examples/MagicCombo/MagicCombo.ino b/examples/MagicCombo/MagicCombo.ino index f652b89a..4f70ecb1 100644 --- a/examples/MagicCombo/MagicCombo.ino +++ b/examples/MagicCombo/MagicCombo.ino @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-MagicCombo -- Magic combo framework * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include +#include +#include void magicComboActions (uint8_t comboIndex, uint32_t leftHand, uint32_t rightHand) { switch (comboIndex) { @@ -26,7 +27,7 @@ void magicComboActions (uint8_t comboIndex, uint32_t leftHand, uint32_t rightHan } } -static const Akela::MagicCombo::dictionary_t dictionary[] PROGMEM = { +static const KaleidoscopePlugins::MagicCombo::dictionary_t dictionary[] PROGMEM = { {R1C3 | R2C1 | R2C4 | R2C7, // left hand, R0C11 | R1C12 | R2C14 //right hand }, @@ -59,10 +60,10 @@ void setup () { MagicCombo.configure (dictionary); - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&MagicCombo, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&MagicCombo, NULL); } void loop () { - Keyboardio.loop (); + Kaleidoscope.loop (); } diff --git a/library.properties b/library.properties index d37921f8..76089275 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ -name=Akela-MagicCombo +name=Kaleidoscope-MagicCombo version=0.0.0 author=Gergely Nagy -maintainer=Gergely Nagy -sentence=Magic combo framework for Keyboardio boards. -paragraph=Provides hooks for Keyboardio boards, to make it possible to run code on certain magic combinations. +maintainer=Gergely Nagy +sentence=Magic combo framework for Kaleidoscope. +paragraph=Provides hooks for Kaleidoscope, to make it possible to run code on certain magic combinations. category=Communication -url=https://github.com/keyboardio/Akela-MagicCombo +url=https://github.com/keyboardio/Kaleidoscope-MagicCombo architectures=avr dot_a_linkage=true diff --git a/src/Akela-MagicCombo.h b/src/Kaleidoscope-MagicCombo.h similarity index 88% rename from src/Akela-MagicCombo.h rename to src/Kaleidoscope-MagicCombo.h index 1366f253..8d390468 100644 --- a/src/Akela-MagicCombo.h +++ b/src/Kaleidoscope-MagicCombo.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-MagicCombo -- Magic combo framework * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,4 +18,4 @@ #pragma once -#include +#include diff --git a/src/Akela/MagicCombo.cpp b/src/Kaleidoscope/MagicCombo.cpp similarity index 93% rename from src/Akela/MagicCombo.cpp rename to src/Kaleidoscope/MagicCombo.cpp index c5cf8541..1a636cf8 100644 --- a/src/Akela/MagicCombo.cpp +++ b/src/Kaleidoscope/MagicCombo.cpp @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-MagicCombo -- Magic combo framework * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include +#include #if defined(ARDUINO_AVR_MODEL01) #define LEFTHANDSTATE KeyboardHardware.leftHandState @@ -28,7 +28,7 @@ #define RIGHTHANDSTATE KeyboardHardware.scanner.rightHandState #endif -namespace Akela { +namespace KaleidoscopePlugins { const MagicCombo::dictionary_t *MagicCombo::dictionary; uint16_t MagicCombo::minInterval = 500; @@ -79,4 +79,4 @@ void magicComboActions (uint8_t comboIndex, uint32_t leftHand, uint32_t rightHand) { } -Akela::MagicCombo MagicCombo; +KaleidoscopePlugins::MagicCombo MagicCombo; diff --git a/src/Akela/MagicCombo.h b/src/Kaleidoscope/MagicCombo.h similarity index 85% rename from src/Akela/MagicCombo.h rename to src/Kaleidoscope/MagicCombo.h index 5618f532..a68b9659 100644 --- a/src/Akela/MagicCombo.h +++ b/src/Kaleidoscope/MagicCombo.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-MagicCombo -- Magic combo framework * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,10 +18,10 @@ #pragma once -#include +#include -namespace Akela { - class MagicCombo : public KeyboardioPlugin { +namespace KaleidoscopePlugins { + class MagicCombo : public KaleidoscopePlugin { public: typedef struct { uint32_t leftHand, rightHand; @@ -44,4 +44,4 @@ namespace Akela { void magicComboActions (uint8_t comboIndex, uint32_t leftHand, uint32_t rightHand); -extern Akela::MagicCombo MagicCombo; +extern KaleidoscopePlugins::MagicCombo MagicCombo;