You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
1.6 KiB
96 lines
1.6 KiB
8 years ago
|
/* Kaleidoscope-Steno -- Steno protocols for Kaleidoscope
|
||
|
* Copyright (C) 2017 Joseph Wasson
|
||
6 years ago
|
* Copyright (C) 2017, 2018 Keyboard.io, Inc.
|
||
8 years ago
|
*
|
||
6 years ago
|
* This program is free software: you can redistribute it and/or modify it under
|
||
|
* the terms of the GNU General Public License as published by the Free Software
|
||
|
* Foundation, version 3.
|
||
8 years ago
|
*
|
||
6 years ago
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||
|
* details.
|
||
8 years ago
|
*
|
||
6 years ago
|
* You should have received a copy of the GNU General Public License along with
|
||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||
8 years ago
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
5 years ago
|
#include "kaleidoscope/Runtime.h"
|
||
8 years ago
|
#include <Kaleidoscope-Ranges.h>
|
||
|
|
||
6 years ago
|
#define S(n) Key(kaleidoscope::plugin::steno::geminipr::n)
|
||
8 years ago
|
|
||
|
namespace kaleidoscope {
|
||
6 years ago
|
namespace plugin {
|
||
8 years ago
|
namespace steno {
|
||
7 years ago
|
class GeminiPR : public kaleidoscope::Plugin {
|
||
8 years ago
|
public:
|
||
8 years ago
|
GeminiPR(void) {}
|
||
8 years ago
|
|
||
6 years ago
|
EventHandlerResult onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t keyState);
|
||
8 years ago
|
private:
|
||
|
static uint8_t keys_held_;
|
||
|
static uint8_t state_[6];
|
||
|
};
|
||
8 years ago
|
|
||
8 years ago
|
namespace geminipr {
|
||
|
enum {
|
||
8 years ago
|
START = kaleidoscope::ranges::STENO_FIRST,
|
||
8 years ago
|
FN = START,
|
||
|
NUM,
|
||
|
N1 = NUM,
|
||
|
N2,
|
||
|
N3,
|
||
|
N4,
|
||
|
N5,
|
||
|
N6,
|
||
|
SL,
|
||
|
S1 = SL,
|
||
|
S2,
|
||
|
TL,
|
||
|
KL,
|
||
|
PL,
|
||
|
WL,
|
||
|
HL,
|
||
|
RL,
|
||
|
A,
|
||
|
O,
|
||
|
STR,
|
||
|
ST1 = STR,
|
||
|
ST2,
|
||
|
RES1,
|
||
|
RE1 = RES1,
|
||
|
RES2,
|
||
|
RE2 = RES2,
|
||
|
PWR,
|
||
|
ST3,
|
||
|
ST4,
|
||
|
E,
|
||
|
U,
|
||
|
FR,
|
||
|
RR,
|
||
|
PR,
|
||
|
BR,
|
||
|
LR,
|
||
|
GR,
|
||
|
TR,
|
||
|
SR,
|
||
|
DR,
|
||
|
N7,
|
||
|
N8,
|
||
|
N9,
|
||
|
NA,
|
||
|
NB,
|
||
|
NC,
|
||
|
ZR,
|
||
|
END = ZR,
|
||
|
};
|
||
|
}
|
||
8 years ago
|
}
|
||
|
}
|
||
6 years ago
|
}
|
||
8 years ago
|
|
||
6 years ago
|
extern kaleidoscope::plugin::steno::GeminiPR GeminiPR;
|