Kaleidoscope
GeminiPR.h
Go to the documentation of this file.
1 /* Kaleidoscope-Steno -- Steno protocols for Kaleidoscope
2  * Copyright (C) 2017 Joseph Wasson
3  * Copyright (C) 2017 Gergely Nagy
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #pragma once
20 
21 #include <Kaleidoscope.h>
22 #include <Kaleidoscope-Ranges.h>
23 
24 #define S(n) (Key) {.raw = kaleidoscope::steno::geminipr::n }
25 
26 namespace kaleidoscope {
27 namespace steno {
28 class GeminiPR : public KaleidoscopePlugin {
29  public:
30  GeminiPR(void) {}
31 
32  void begin(void);
33 
34  private:
35  static uint8_t keys_held_;
36  static uint8_t state_[6];
37 
38  static Key eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_state);
39 };
40 
41 namespace geminipr {
42 enum {
44  FN = START,
45  NUM,
46  N1 = NUM,
47  N2,
48  N3,
49  N4,
50  N5,
51  N6,
52  SL,
53  S1 = SL,
54  S2,
55  TL,
56  KL,
57  PL,
58  WL,
59  HL,
60  RL,
61  A,
62  O,
63  STR,
64  ST1 = STR,
65  ST2,
67  RE1 = RES1,
69  RE2 = RES2,
70  PWR,
71  ST3,
72  ST4,
73  E,
74  U,
75  FR,
76  RR,
77  PR,
78  BR,
79  LR,
80  GR,
81  TR,
82  SR,
83  DR,
84  N7,
85  N8,
86  N9,
87  NA,
88  NB,
89  NC,
90  ZR,
91  END = ZR,
92 };
93 }
94 }
95 }
96 
Definition: GeminiPR.h:75
Definition: GeminiPR.h:66
Definition: GeminiPR.h:67
Definition: GeminiPR.h:54
Definition: GeminiPR.h:77
Definition: GeminiPR.h:59
Definition: GeminiPR.h:58
Definition: GeminiPR.h:44
Definition: GeminiPR.h:65
Definition: GeminiPR.h:69
Definition: hid.cpp:4
Definition: GeminiPR.h:57
#define END
Definition: MacroSteps.h:38
Definition: GeminiPR.h:50
Definition: GeminiPR.h:45
Definition: GeminiPR.h:61
Definition: GeminiPR.h:84
byte byte col
Definition: TapDance.cpp:229
Definition: GeminiPR.h:86
GeminiPR(void)
Definition: GeminiPR.h:30
Definition: GeminiPR.h:73
Definition: GeminiPR.h:85
Definition: GeminiPR.h:76
Definition: GeminiPR.h:72
Definition: GeminiPR.h:53
Definition: GeminiPR.h:90
Definition: key_defs.h:13
Definition: GeminiPR.h:51
Definition: GeminiPR.h:48
void begin(void)
Definition: GeminiPR.cpp:27
Definition: GeminiPR.h:70
Definition: GeminiPR.h:56
Definition: GeminiPR.h:43
Definition: GeminiPR.h:71
Definition: GeminiPR.h:82
Definition: GeminiPR.h:63
Definition: GeminiPR.h:62
Definition: GeminiPR.h:47
Definition: GeminiPR.h:68
Definition: GeminiPR.h:49
Definition: Kaleidoscope-Ranges.h:47
Definition: GeminiPR.h:78
Definition: Kaleidoscope.h:40
Definition: GeminiPR.h:64
Definition: GeminiPR.h:28
byte row
Definition: TapDance.cpp:229
Definition: GeminiPR.h:46
Definition: GeminiPR.h:80
Definition: GeminiPR.h:52
#define U(k)
Definition: MacroSteps.h:30
Definition: GeminiPR.h:55
Definition: GeminiPR.h:83
Definition: GeminiPR.h:60
Definition: GeminiPR.h:88
Definition: GeminiPR.h:81
Definition: GeminiPR.h:89
Definition: GeminiPR.h:87
Definition: GeminiPR.h:79