The Big Rename

Rename the library to Kaleidoscope-TapDance, and follow up with other renames.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 74070edcf1
commit b867f80ca2

@ -1,4 +1,4 @@
# Akela-TapDance
# Kaleidoscope-TapDance
![status][st:stable]
@ -40,20 +40,22 @@ This is to preserve the order of keys pressed.
In both of these cases, the [`tapDanceAction`][tdaction] will be called, with
`tapDanceIndex` set to the index of the tap-dance action (as set in the keymap),
the `tapCount`, and `tapDanceAction` set to either `Akela::TapDance::Interrupt`,
or `Akela::TapDance::Timeout`. If we continue holding the key, then as long as
it is held, the same function will be called with `tapDanceAction` set to
`Akela::TapDance::Hold`. When the key is released, after either an `Interrupt`
or `Timeout` action was triggered, the function will be called with
`tapDanceAction` set to `Akela::TapDance::Release`.
the `tapCount`, and `tapDanceAction` set to either
`KaleidoscopePlugins::TapDance::Interrupt`, or
`KaleidoscopePlugins::TapDance::Timeout`. If we continue holding the key, then
as long as it is held, the same function will be called with `tapDanceAction`
set to `KaleidoscopePlugins::TapDance::Hold`. When the key is released, after
either an `Interrupt` or `Timeout` action was triggered, the function will be
called with `tapDanceAction` set to `KaleidoscopePlugins::TapDance::Release`.
These actions allow us to create sophisticated tap-dance setups, where one can
tap a key twice and hold it, and have it repeat, for example.
There is one additional value the `tapDanceAction` parameter can take:
`Akela::TapDance::Tap`. It is called with this argument for each and every tap,
even if no action is to be triggered yet. This is so that we can have a way to
do some side-effects, like light up LEDs to show progress, and so on.
`KaleidoscopePlugins::TapDance::Tap`. It is called with this argument for each
and every tap, even if no action is to be triggered yet. This is so that we can
have a way to do some side-effects, like light up LEDs to show progress, and so
on.
## Using the plugin
@ -63,14 +65,15 @@ to implement the [`tapDanceAction`][tdaction] function that gets called each
time an action is to be performed.
```c++
#include <Akela-TapDance.h>
#include <Kaleidoscope.h>
#include <Kaleidoscope-TapDance.h>
// Somewhere in the keymap:
TD(0)
// later in the Sketch:
void tapDanceAction (uint8_t tapDanceIndex, uint8_t tapCount,
Akela::TapDance::ActionType tapDanceAction) {
KaleidoscopePlugins::TapDance::ActionType tapDanceAction) {
switch (tapDanceIndex) {
case 0:
return tapDanceActionKeys (tapCount, tapDanceAction,
@ -79,8 +82,8 @@ void tapDanceAction (uint8_t tapDanceIndex, uint8_t tapCount,
}
void setup (void) {
Keyboardio.setup (KEYMAP_SIZE);
Keyboardio.use (&TapDance, NULL);
Kaleidoscope.setup (KEYMAP_SIZE);
Kaleidoscope.use (&TapDance, NULL);
}
```
@ -143,4 +146,4 @@ method only:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: https://github.com/keyboardio/Akela-TapDance/blob/master/examples/TapDance/TapDance.ino
[plugin:example]: https://github.com/keyboardio/Kaleidoscope-TapDance/blob/master/examples/TapDance/TapDance.ino

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-TapDance -- Tap-dance keys
* 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 <http://www.gnu.org/licenses/>.
*/
#include <Akela-TapDance.h>
#include <Kaleidoscope.h>
#include <Kaleidoscope-TapDance.h>
const Key keymaps[][ROWS][COLS] PROGMEM = {
[0] = KEYMAP_STACKED
@ -39,11 +40,11 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
),
};
static void tapDanceEsc (uint8_t tapDanceIndex, uint8_t tapCount, Akela::TapDance::ActionType tapDanceAction) {
static void tapDanceEsc (uint8_t tapDanceIndex, uint8_t tapCount, KaleidoscopePlugins::TapDance::ActionType tapDanceAction) {
tapDanceActionKeys (tapCount, tapDanceAction, Key_Esc, Key_Tab);
}
void tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, Akela::TapDance::ActionType tapDanceAction) {
void tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, KaleidoscopePlugins::TapDance::ActionType tapDanceAction) {
switch (tapDanceIndex) {
case 0:
return tapDanceActionKeys (tapCount, tapDanceAction, Key_Tab, Key_Esc);
@ -53,10 +54,10 @@ void tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount
}
void setup () {
Keyboardio.setup (KEYMAP_SIZE);
Keyboardio.use (&TapDance, NULL);
Kaleidoscope.setup (KEYMAP_SIZE);
Kaleidoscope.use (&TapDance, NULL);
}
void loop () {
Keyboardio.loop ();
Kaleidoscope.loop ();
}

@ -1,10 +1,10 @@
name=Akela-TapDance
name=Kaleidoscope-TapDance
version=0.0.0
author=Gergely Nagy
maintainer=Gergely Nagy <akela@gergo.csillger.hu>
sentence=Tap-dance keys for Keyboardio boards.
maintainer=Gergely Nagy <kaleidoscope@gergo.csillger.hu>
sentence=Tap-dance keys for Kaleidoscope.
paragraph=Generic, multi-use keys.
category=Communication
url=https://github.com/keyboardio/Akela-TapDance
url=https://github.com/keyboardio/Kaleidoscope-TapDance
architectures=avr
dot_a_linkage=true

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-TapDance -- Tap-dance keys
* 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 <Akela/TapDance.h>
#include <Kaleidoscope/TapDance.h>

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-TapDance -- Tap-dance keys
* 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 <http://www.gnu.org/licenses/>.
*/
#include <Akela-TapDance.h>
#include <Kaleidoscope-TapDance.h>
using namespace Akela::Ranges;
using namespace KaleidoscopePlugins::Ranges;
namespace Akela {
namespace KaleidoscopePlugins {
// --- state ---
uint32_t TapDance::startTime;
uint16_t TapDance::timeOut = 200;
@ -220,7 +220,7 @@ namespace Akela {
__attribute__((weak))
void
tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, Akela::TapDance::ActionType tapDanceAction) {
tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, KaleidoscopePlugins::TapDance::ActionType tapDanceAction) {
}
Akela::TapDance TapDance;
KaleidoscopePlugins::TapDance TapDance;

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-TapDance -- Tap-dance keys
* Copyright (C) 2016, 2017 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
@ -18,9 +18,10 @@
#pragma once
#include <Akela-Core.h>
#include <Kaleidoscope.h>
#include <Kaleidoscope-Ranges.h>
#define TD(n) (Key){.raw = Akela::Ranges::TD_FIRST + n }
#define TD(n) (Key){.raw = KaleidoscopePlugins::Ranges::TD_FIRST + n }
#define tapDanceActionKeys(tapCount, tapDanceAction, ...) ({ \
static const Key __k[] PROGMEM = { __VA_ARGS__ }; \
@ -28,8 +29,8 @@
sizeof (__k) / sizeof (Key), &__k[0]); \
})
namespace Akela {
class TapDance : public KeyboardioPlugin {
namespace KaleidoscopePlugins {
class TapDance : public KaleidoscopePlugin {
public:
typedef enum {
Tap,
@ -65,6 +66,6 @@ namespace Akela {
};
};
void tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, Akela::TapDance::ActionType tapDanceAction);
void tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, KaleidoscopePlugins::TapDance::ActionType tapDanceAction);
extern Akela::TapDance TapDance;
extern KaleidoscopePlugins::TapDance TapDance;
Loading…
Cancel
Save