diff --git a/README.md b/README.md index cf62c376..67a00322 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Akela-OneShot +# Kaleidoscope-OneShot ![status][st:stable] @@ -29,27 +29,29 @@ There are two major ways in which the plugin can be used: one is to turn existing modifiers or momentary layer toggles into one-shot keys: ```c++ -#include +#include +#include void setup () { OneShot.enableAuto (); - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&OneShot, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&OneShot, NULL); } ``` The other is to explicitly mark keys as one-shot in the keymap: ```c++ -#include +#include +#include // somewhere in the keymap... OSM(LCtrl), OSL(_FN) void setup () { - Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&OneShot, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); + Kaleidoscope.use (&OneShot, NULL); } ``` @@ -68,7 +70,7 @@ There are two macros the plugin provides: > Takes a layer number as argument, and sets up the key to act as a one-shot > layer key. > -> Please note that while `KeyboardioFirmware` supports more, one-shot layers are +> Please note that while `KaleidoscopeFirmware` supports more, one-shot layers are > limited to 24 layers only. ## Plugin methods @@ -83,7 +85,7 @@ modifiers and one-shot layer keys. It has the following methods: > injects a modifier or a momentary layer switch key, those will be left alone, > as-is. > -> This **must** be called before any `Keyboardio.use()` call in the `setup()` +> This **must** be called before any `Kaleidoscope.use()` call in the `setup()` > method of your Sketch. ### `.isActive()` @@ -147,4 +149,4 @@ modifiers and one-shot layer keys. It has the following methods: Starting from the [example][plugin:example] is the recommended way of getting started with the plugin. - [plugin:example]: https://github.com/keyboardio/Akela-OneShot/blob/master/examples/OneShot/OneShot.ino + [plugin:example]: https://github.com/keyboardio/Kaleidoscope-OneShot/blob/master/examples/OneShot/OneShot.ino diff --git a/examples/OneShot/OneShot.ino b/examples/OneShot/OneShot.ino index f1c81245..3cfc3947 100644 --- a/examples/OneShot/OneShot.ino +++ b/examples/OneShot/OneShot.ino @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-OneShot -- One-shot modifiers and layers * 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 const Key keymaps[][ROWS][COLS] PROGMEM = { [0] = KEYMAP_STACKED @@ -62,10 +63,10 @@ const Key keymaps[][ROWS][COLS] PROGMEM = { void setup () { OneShot.enableAuto (); - Keyboardio.use (&OneShot, NULL); - Keyboardio.setup (KEYMAP_SIZE); + Kaleidoscope.use (&OneShot, NULL); + Kaleidoscope.setup (KEYMAP_SIZE); } void loop () { - Keyboardio.loop (); + Kaleidoscope.loop (); } diff --git a/library.properties b/library.properties index ca811012..2d721114 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ -name=Akela-OneShot +name=Kaleidoscope-OneShot version=0.0.0 author=Gergely Nagy -maintainer=Gergely Nagy -sentence=One-shot modifiers and layers for Keyboardio boards. +maintainer=Gergely Nagy +sentence=One-shot modifiers and layers for Kaleidoscope. paragraph=Provides a way to use one-shot modifiers and layers. category=Communication -url=https://github.com/keyboardio/Akela-OneShot +url=https://github.com/keyboardio/Kaleidoscope-OneShot architectures=avr dot_a_linkage=true diff --git a/src/Akela-OneShot.h b/src/Kaleidoscope-OneShot.h similarity index 88% rename from src/Akela-OneShot.h rename to src/Kaleidoscope-OneShot.h index 4420a8b6..f25b2d29 100644 --- a/src/Akela-OneShot.h +++ b/src/Kaleidoscope-OneShot.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-OneShot -- One-shot modifiers and layers * 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/OneShot.cpp b/src/Kaleidoscope/OneShot.cpp similarity index 97% rename from src/Akela/OneShot.cpp rename to src/Kaleidoscope/OneShot.cpp index 6577f2ba..d07ad0e0 100644 --- a/src/Akela/OneShot.cpp +++ b/src/Kaleidoscope/OneShot.cpp @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-OneShot -- One-shot modifiers and layers * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#include +#include -using namespace Akela::Ranges; +using namespace KaleidoscopePlugins::Ranges; -namespace Akela { +namespace KaleidoscopePlugins { // ---- state --------- uint32_t OneShot::startTime = 0; @@ -338,4 +338,4 @@ namespace Akela { }; -Akela::OneShot OneShot; +KaleidoscopePlugins::OneShot OneShot; diff --git a/src/Akela/OneShot.h b/src/Kaleidoscope/OneShot.h similarity index 83% rename from src/Akela/OneShot.h rename to src/Kaleidoscope/OneShot.h index 8efe4e4d..abae498d 100644 --- a/src/Akela/OneShot.h +++ b/src/Kaleidoscope/OneShot.h @@ -1,5 +1,5 @@ /* -*- mode: c++ -*- - * Akela -- Animated Keyboardio Extension Library for Anything + * Kaleidoscope-OneShot -- One-shot modifiers and layers * Copyright (C) 2016, 2017 Gergely Nagy * * This program is free software: you can redistribute it and/or modify @@ -18,13 +18,14 @@ #pragma once -#include +#include +#include -#define OSM(kc) (Key) {.raw = Akela::Ranges::OSM_FIRST + (Key_ ## kc).keyCode - Key_LCtrl.keyCode} -#define OSL(n) (Key) {.raw = Akela::Ranges::OSL_FIRST + n} +#define OSM(kc) (Key) {.raw = KaleidoscopePlugins::Ranges::OSM_FIRST + (Key_ ## kc).keyCode - Key_LCtrl.keyCode} +#define OSL(n) (Key) {.raw = KaleidoscopePlugins::Ranges::OSL_FIRST + n} -namespace Akela { - class OneShot : public KeyboardioPlugin { +namespace KaleidoscopePlugins { + class OneShot : public KaleidoscopePlugin { public: OneShot (void); @@ -71,4 +72,4 @@ namespace Akela { }; }; -extern Akela::OneShot OneShot; +extern KaleidoscopePlugins::OneShot OneShot;