The Big Rename

Renamed the plugin to Kaleidoscope-Syster, and followed up with other renames.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 16a4f0013a
commit 29d45e8850

@ -1,4 +1,4 @@
# Akela-Syster
# Kaleidoscope-Syster
![status][st:experimental]
@ -21,21 +21,22 @@ To use the plugin, one needs to include the header, and set up a function that
will handle the symbol actions:
```c++
#include <Akela-Syster.h>
#include <Akela-Unicode.h>
#include <Kaleidoscope.h>
#include <Kaleidoscope-Syster.h>
#include <Kaleidoscope-Unicode.h>
void systerAction (Akela::Syster::action_t action, const char *symbol) {
void systerAction (KaleidoscopePlugins::Syster::action_t action, const char *symbol) {
switch (action) {
case Akela::Syster::StartAction:
case KaleidoscopePlugins::Syster::StartAction:
Unicode.type (0x2328);
break;
case Akela::Syster::EndAction:
case KaleidoscopePlugins::Syster::EndAction:
handle_key_event (Key_Backspace, 255, 255, IS_PRESSED | INJECTED);
Keyboard.sendReport ();
handle_key_event (Key_Backspace, 255, 255, WAS_PRESSED | INJECTED);
Keyboard.sendReport ();
break;
case Akela::Syster::SymbolAction:
case KaleidoscopePlugins::Syster::SymbolAction:
Serial.print ("systerAction: symbol=");
Serial.println (symbol);
if (strcmp (symbol, "coffee") == 0) {
@ -48,8 +49,8 @@ void systerAction (Akela::Syster::action_t action, const char *symbol) {
void setup () {
Serial.begin (9600);
Keyboardio.setup (KEYMAP_SIZE);
Keyboardio.use (&Unicode, &Syster, NULL);
Kaleidoscope.setup (KEYMAP_SIZE);
Kaleidoscope.use (&Unicode, &Syster, NULL);
}
```
@ -66,18 +67,20 @@ methods outside of the object, however, that can be overridden:
> Called whenever an action needs to be taken, which can happen in three cases:
> First, when the `Syster` key is pressed, and the alternate processing starts.
> In this case, `action` will be set to `Akela::Syster::StartAction`, and
> `symbol` will be `NULL`. This function can be used to do some setup to make it
> more obvious that the Syster input mode is active, such as sending a Unicode
> symbol to the host, or lighting up LEDs, or anything else we'd like.
> In this case, `action` will be set to
> `KaleidoscopePlugins::Syster::StartAction`, and `symbol` will be `NULL`. This
> function can be used to do some setup to make it more obvious that the Syster
> input mode is active, such as sending a Unicode symbol to the host, or
> lighting up LEDs, or anything else we'd like.
>
> Second, when the sequence is finished with a `Space`. In this case, `action`
> will be set to `Akela::Syster::EndAction`, and `symbol` will be `NULL`. This
> can be used to undo anything that the start action did, if need be.
> will be set to `KaleidoscopePlugins::Syster::EndAction`, and `symbol` will be
> `NULL`. This can be used to undo anything that the start action did, if need
> be.
>
> Third, when the action for the symbol should be made. In this case, `action`
> is set to `Akela::Syster::SymbolAction`, and `symbol` will be a C string. It
> is up to us, what we do with this information, how we handle it.
> is set to `KaleidoscopePlugins::Syster::SymbolAction`, and `symbol` will be a
> C string. It is up to us, what we do with this information, how we handle it.
### `keyToChar(key)`
@ -90,4 +93,4 @@ methods outside of the object, however, that can be overridden:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: https://github.com/keyboardio/Akela-Syster/blob/master/examples/Syster/Syster.ino
[plugin:example]: https://github.com/keyboardio/Kaleidoscope-Syster/blob/master/examples/Syster/Syster.ino

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 2017 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Akela-Syster.h>
#include <Akela-Unicode.h>
#include <Kaleidoscope.h>
#include <Kaleidoscope-Syster.h>
#include <Kaleidoscope-Unicode.h>
const Key keymaps[][ROWS][COLS] PROGMEM = {
[0] = KEYMAP_STACKED
@ -40,18 +41,18 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
),
};
void systerAction (Akela::Syster::action_t action, const char *symbol) {
void systerAction (KaleidoscopePlugins::Syster::action_t action, const char *symbol) {
switch (action) {
case Akela::Syster::StartAction:
case KaleidoscopePlugins::Syster::StartAction:
Unicode.type (0x2328);
break;
case Akela::Syster::EndAction:
case KaleidoscopePlugins::Syster::EndAction:
handle_key_event (Key_Backspace, 255, 255, IS_PRESSED | INJECTED);
Keyboard.sendReport ();
handle_key_event (Key_Backspace, 255, 255, WAS_PRESSED | INJECTED);
Keyboard.sendReport ();
break;
case Akela::Syster::SymbolAction:
case KaleidoscopePlugins::Syster::SymbolAction:
Serial.print ("systerAction: symbol=");
Serial.println (symbol);
if (strcmp (symbol, "coffee") == 0) {
@ -62,10 +63,10 @@ void systerAction (Akela::Syster::action_t action, const char *symbol) {
}
void setup () {
Keyboardio.setup (KEYMAP_SIZE);
Keyboardio.use (&Unicode, &Syster, NULL);
Kaleidoscope.setup (KEYMAP_SIZE);
Kaleidoscope.use (&Unicode, &Syster, NULL);
}
void loop () {
Keyboardio.loop ();
Kaleidoscope.loop ();
}

@ -1,10 +1,10 @@
name=Akela-Syster
name=Kaleidoscope-Syster
version=0.0.0
author=Gergely Nagy
maintainer=Gergely Nagy <akela@gergo.csillger.hu>
sentence=Symbolic input system for KeyboardioFirmware.
maintainer=Gergely Nagy <kaleidoscope@gergo.csillger.hu>
sentence=Symbolic input system for Kaleidoscope.
paragraph=Allows inputting symbols (Unicode or otherwise) by name.
category=Communication
url=https://github.com/keyboardio/Akela-Syster
url=https://github.com/keyboardio/Kaleidoscope-Syster
architectures=avr
dot_a_linkage=true

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-Syster -- Symbolic input system
* 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/Syster.h>
#include <Kaleidoscope/Syster.h>

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 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-Syster.h>
#include <Kaleidoscope-Syster.h>
using namespace Akela::Ranges;
using namespace KaleidoscopePlugins::Ranges;
namespace Akela {
namespace KaleidoscopePlugins {
// --- state ---
char Syster::symbol[SYSTER_MAX_SYMBOL_LENGTH + 1];
uint8_t Syster::symbolPos;
@ -122,7 +122,7 @@ keyToChar (Key key) {
__attribute__((weak))
void
systerAction (Akela::Syster::action_t action, const char *symbol) {
systerAction (KaleidoscopePlugins::Syster::action_t action, const char *symbol) {
}
Akela::Syster Syster;
KaleidoscopePlugins::Syster Syster;

@ -1,5 +1,5 @@
/* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything
* Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 2017 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
@ -18,14 +18,15 @@
#pragma once
#include <Akela-Core.h>
#include <Kaleidoscope.h>
#include <Kaleidoscope-Ranges.h>
#define SYSTER_MAX_SYMBOL_LENGTH 32
#define SYSTER (Key){ .raw = Akela::Ranges::SYSTER }
#define SYSTER (Key){ .raw = KaleidoscopePlugins::Ranges::SYSTER }
namespace Akela {
class Syster : public KeyboardioPlugin {
namespace KaleidoscopePlugins {
class Syster : public KaleidoscopePlugin {
public:
typedef enum {
StartAction,
@ -48,6 +49,6 @@ namespace Akela {
};
const char keyToChar (Key key);
void systerAction (Akela::Syster::action_t action, const char *symbol);
void systerAction (KaleidoscopePlugins::Syster::action_t action, const char *symbol);
extern Akela::Syster Syster;
extern KaleidoscopePlugins::Syster Syster;
Loading…
Cancel
Save