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] ![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: will handle the symbol actions:
```c++ ```c++
#include <Akela-Syster.h> #include <Kaleidoscope.h>
#include <Akela-Unicode.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) { switch (action) {
case Akela::Syster::StartAction: case KaleidoscopePlugins::Syster::StartAction:
Unicode.type (0x2328); Unicode.type (0x2328);
break; break;
case Akela::Syster::EndAction: case KaleidoscopePlugins::Syster::EndAction:
handle_key_event (Key_Backspace, 255, 255, IS_PRESSED | INJECTED); handle_key_event (Key_Backspace, 255, 255, IS_PRESSED | INJECTED);
Keyboard.sendReport (); Keyboard.sendReport ();
handle_key_event (Key_Backspace, 255, 255, WAS_PRESSED | INJECTED); handle_key_event (Key_Backspace, 255, 255, WAS_PRESSED | INJECTED);
Keyboard.sendReport (); Keyboard.sendReport ();
break; break;
case Akela::Syster::SymbolAction: case KaleidoscopePlugins::Syster::SymbolAction:
Serial.print ("systerAction: symbol="); Serial.print ("systerAction: symbol=");
Serial.println (symbol); Serial.println (symbol);
if (strcmp (symbol, "coffee") == 0) { if (strcmp (symbol, "coffee") == 0) {
@ -48,8 +49,8 @@ void systerAction (Akela::Syster::action_t action, const char *symbol) {
void setup () { void setup () {
Serial.begin (9600); Serial.begin (9600);
Keyboardio.setup (KEYMAP_SIZE); Kaleidoscope.setup (KEYMAP_SIZE);
Keyboardio.use (&Unicode, &Syster, NULL); 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: > 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. > First, when the `Syster` key is pressed, and the alternate processing starts.
> In this case, `action` will be set to `Akela::Syster::StartAction`, and > In this case, `action` will be set to
> `symbol` will be `NULL`. This function can be used to do some setup to make it > `KaleidoscopePlugins::Syster::StartAction`, and `symbol` will be `NULL`. This
> more obvious that the Syster input mode is active, such as sending a Unicode > function can be used to do some setup to make it more obvious that the Syster
> symbol to the host, or lighting up LEDs, or anything else we'd like. > 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` > 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 > will be set to `KaleidoscopePlugins::Syster::EndAction`, and `symbol` will be
> can be used to undo anything that the start action did, if need 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` > 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 set to `KaleidoscopePlugins::Syster::SymbolAction`, and `symbol` will be a
> is up to us, what we do with this information, how we handle it. > C string. It is up to us, what we do with this information, how we handle it.
### `keyToChar(key)` ### `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 Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin. 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++ -*- /* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything * Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 2017 Gergely Nagy * Copyright (C) 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * 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/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <Akela-Syster.h> #include <Kaleidoscope.h>
#include <Akela-Unicode.h> #include <Kaleidoscope-Syster.h>
#include <Kaleidoscope-Unicode.h>
const Key keymaps[][ROWS][COLS] PROGMEM = { const Key keymaps[][ROWS][COLS] PROGMEM = {
[0] = KEYMAP_STACKED [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) { switch (action) {
case Akela::Syster::StartAction: case KaleidoscopePlugins::Syster::StartAction:
Unicode.type (0x2328); Unicode.type (0x2328);
break; break;
case Akela::Syster::EndAction: case KaleidoscopePlugins::Syster::EndAction:
handle_key_event (Key_Backspace, 255, 255, IS_PRESSED | INJECTED); handle_key_event (Key_Backspace, 255, 255, IS_PRESSED | INJECTED);
Keyboard.sendReport (); Keyboard.sendReport ();
handle_key_event (Key_Backspace, 255, 255, WAS_PRESSED | INJECTED); handle_key_event (Key_Backspace, 255, 255, WAS_PRESSED | INJECTED);
Keyboard.sendReport (); Keyboard.sendReport ();
break; break;
case Akela::Syster::SymbolAction: case KaleidoscopePlugins::Syster::SymbolAction:
Serial.print ("systerAction: symbol="); Serial.print ("systerAction: symbol=");
Serial.println (symbol); Serial.println (symbol);
if (strcmp (symbol, "coffee") == 0) { if (strcmp (symbol, "coffee") == 0) {
@ -62,10 +63,10 @@ void systerAction (Akela::Syster::action_t action, const char *symbol) {
} }
void setup () { void setup () {
Keyboardio.setup (KEYMAP_SIZE); Kaleidoscope.setup (KEYMAP_SIZE);
Keyboardio.use (&Unicode, &Syster, NULL); Kaleidoscope.use (&Unicode, &Syster, NULL);
} }
void loop () { void loop () {
Keyboardio.loop (); Kaleidoscope.loop ();
} }

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

@ -1,5 +1,5 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything * Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 2016, 2017 Gergely Nagy * Copyright (C) 2016, 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -18,4 +18,4 @@
#pragma once #pragma once
#include <Akela/Syster.h> #include <Kaleidoscope/Syster.h>

@ -1,5 +1,5 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything * Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 2017 Gergely Nagy * Copyright (C) 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * 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/>. * 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 --- // --- state ---
char Syster::symbol[SYSTER_MAX_SYMBOL_LENGTH + 1]; char Syster::symbol[SYSTER_MAX_SYMBOL_LENGTH + 1];
uint8_t Syster::symbolPos; uint8_t Syster::symbolPos;
@ -122,7 +122,7 @@ keyToChar (Key key) {
__attribute__((weak)) __attribute__((weak))
void 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++ -*- /* -*- mode: c++ -*-
* Akela -- Animated Keyboardio Extension Library for Anything * Kaleidoscope-Syster -- Symbolic input system
* Copyright (C) 2017 Gergely Nagy * Copyright (C) 2017 Gergely Nagy
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -18,14 +18,15 @@
#pragma once #pragma once
#include <Akela-Core.h> #include <Kaleidoscope.h>
#include <Kaleidoscope-Ranges.h>
#define SYSTER_MAX_SYMBOL_LENGTH 32 #define SYSTER_MAX_SYMBOL_LENGTH 32
#define SYSTER (Key){ .raw = Akela::Ranges::SYSTER } #define SYSTER (Key){ .raw = KaleidoscopePlugins::Ranges::SYSTER }
namespace Akela { namespace KaleidoscopePlugins {
class Syster : public KeyboardioPlugin { class Syster : public KaleidoscopePlugin {
public: public:
typedef enum { typedef enum {
StartAction, StartAction,
@ -48,6 +49,6 @@ namespace Akela {
}; };
const char keyToChar (Key key); 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