Statistics
| Branch: | Tag: | Revision:

root / Matrix.h @ ad6e2bf5

History | View | Annotate | Download (13.6 KB)

1
#include <inttypes.h>
2
#include <LUFA/Drivers/USB/USB.h>
3
#include <avr/pgmspace.h>
4

    
5
#ifndef __matrix_h__
6
#define __matrix_h__
7
#define HID_KEYBOARD_SC_MOD3 0xf3
8
#define HID_KEYBOARD_SC_MOD4 0xf4
9

    
10
#define key(NAME) HID_KEYBOARD_SC_ ## NAME
11

    
12
// the following comments are based on qwertz labing on keyboards
13
// first line of keys
14
// ^ °
15
#define QWERTY_GRAVE_ACCENT_AND_TILDE {{0,key(GRAVE_ACCENT_AND_TILDE)},{0,0},{0,0},{0,0}}
16
#define QWERTY_1_AND_EXCLAMATION {{0,key(1_AND_EXCLAMATION)},{key(LEFT_SHIFT),key(GRAVE_ACCENT_AND_TILDE)},{0,0},{0,0}}
17
#define QWERTY_2_AND_AT {{0,key(2_AND_AT)},{key(LEFT_SHIFT),key(3_AND_HASHMARK)},{0,0},{0,0}}
18
#define QWERTY_3_AND_HASHMARK {{0,key(3_AND_HASHMARK)},{0,0},{0,0},{0,0}}
19
#define QWERTY_4_AND_DOLLAR {{0,key(4_AND_DOLLAR)},{0,0},{0,0},{0,0}}
20
#define QWERTY_5_AND_PERCENTAGE {{0,key(5_AND_PERCENTAGE)},{0,0},{0,0},{0,0}}
21
#define QWERTY_6_AND_CARET {{0,key(6_AND_CARET)},{key(LEFT_SHIFT),key(4_AND_DOLLAR)},{0,0},{0,0}}
22
#define QWERTY_7_AND_AND_AMPERSAND {{0,key(7_AND_AND_AMPERSAND)},{0,0},{0,0},{0,0}}
23
#define QWERTY_8_AND_ASTERISK {{0,key(8_AND_ASTERISK)},{0,0},{0,0},{0,0}}
24
#define QWERTY_9_AND_OPENING_PARENTHESIS {{0,key(9_AND_OPENING_PARENTHESIS)},{0,0},{0,0},{key(LEFT_SHIFT),key(7_AND_AND_AMPERSAND)}}
25
#define QWERTY_0_AND_CLOSING_PARENTHESIS {{0,key(0_AND_CLOSING_PARENTHESIS)},{0,0},{0,0},{key(LEFT_SHIFT),key(CLOSING_BRACKET_AND_CLOSING_BRACE)}}
26
// ß ? 
27
#define QWERTY_MINUS_AND_UNDERSCORE {{0,key(SLASH_AND_QUESTION_MARK)},{0,0},{0,0},{0,key(SLASH_AND_QUESTION_MARK)}}
28
#define QWERTY_EQUAL_AND_PLUS {{key(LEFT_SHIFT),key(EQUAL_AND_PLUS)},{0,0},{0,0},{0,0}}
29

    
30
// second line of keys
31
#define QWERTY_Q {{0,key(J)},{0,key(J)},{key(RIGHT_ALT),key(DOT_AND_GREATER_THAN_SIGN)},{0,key(PAGE_UP)}}
32
#define QWERTY_W {{0,key(D)},{0,key(D)},{key(LEFT_SHIFT),key(SLASH_AND_QUESTION_MARK)},{0,key(BACKSPACE)}}
33
#define QWERTY_E {{0,key(U)},{0,key(U)},{key(RIGHT_ALT),key(8_AND_ASTERISK)},{0,key(UP_ARROW)}}
34
#define QWERTY_R {{0,key(A)},{0,key(A)},{key(RIGHT_ALT),key(9_AND_OPENING_PARENTHESIS)},{0,key(DELETE)}}
35
#define QWERTY_T {{0,key(X)},{0,key(X)},{0,key(GRAVE_ACCENT_AND_TILDE)},{0,key(PAGE_DOWN)}}
36
#define QWERTY_Y {{0,key(P)},{0,key(P)},{key(LEFT_SHIFT),key(1_AND_EXCLAMATION)},{(key(LEFT_SHIFT)|key(RIGHT_ALT)),key(1_AND_EXCLAMATION)}}
37
#define QWERTY_U {{0,key(H)},{0,key(H)},{0,key(NON_US_BACKSLASH_AND_PIPE)},{0,key(7_AND_AND_AMPERSAND)}}
38
#define QWERTY_I {{0,key(L)},{0,key(L)},{key(LEFT_SHIFT),key(NON_US_BACKSLASH_AND_PIPE)},{0,key(8_AND_ASTERISK)}}
39
#define QWERTY_O {{0,key(M)},{0,key(M)},{key(LEFT_SHIFT),key(0_AND_CLOSING_PARENTHESIS)},{0,key(9_AND_OPENING_PARENTHESIS)}}
40
#define QWERTY_P {{0,key(W)},{0,key(W)},{key(LEFT_SHIFT),key(6_AND_CARET)},{0,key(CLOSING_BRACKET_AND_CLOSING_BRACE)}}
41
// ü
42
#define QWERTY_OPENING_BRACKET_AND_OPENING_BRACE {{0,key(Q)},{0,key(Q)},{0,0},{0,key(SLASH_AND_QUESTION_MARK)}}
43
// + * ~
44
#define QWERTY_CLOSING_BRACKET_AND_CLOSING_BRACE {{0,key(EQUAL_AND_PLUS)},{key(RIGHT_ALT),key(CLOSING_BRACKET_AND_CLOSING_BRACE)},{key(LEFT_SHIFT),key(7_AND_AND_AMPERSAND)},{key(LEFT_SHIFT),key(2_AND_AT)}}
45

    
46
// third line of keys
47
#define QWERTY_CAPS_LOCK {{key(MOD3),0},{key(MOD3),0},{key(MOD3),0},{key(MOD3),0}}
48
#define QWERTY_A {{0,key(C)},{0,key(C)},{key(RIGHT_ALT),key(MINUS_AND_UNDERSCORE)},{0,key(HOME)}}
49
#define QWERTY_S {{0,key(T)},{0,key(T)},{key(LEFT_SHIFT),key(7_AND_AND_AMPERSAND)},{0,key(LEFT_ARROW)}}
50
#define QWERTY_D {{0,key(I)},{0,key(I)},{key(RIGHT_ALT),key(7_AND_AND_AMPERSAND)},{0,key(DOWN_ARROW)}}
51
#define QWERTY_F {{0,key(E)},{0,key(E)},{key(RIGHT_ALT),key(0_AND_CLOSING_PARENTHESIS)},{0,key(RIGHT_ARROW)}}
52
#define QWERTY_G {{0,key(O)},{0,key(O)},{key(LEFT_SHIFT),key(CLOSING_BRACKET_AND_CLOSING_BRACE)},{0,key(END)}}
53
#define QWERTY_H {{0,key(B)},{0,key(B)},{key(LEFT_SHIFT),key(MINUS_AND_UNDERSCORE)},{(key(LEFT_SHIFT)|key(RIGHT_ALT)),key(MINUS_AND_UNDERSCORE)}}
54
#define QWERTY_J {{0,key(N)},{0,key(N)},{key(LEFT_SHIFT),key(8_AND_ASTERISK)},{0,key(4_AND_DOLLAR)}}
55
#define QWERTY_K {{0,key(R)},{0,key(R)},{key(LEFT_SHIFT),key(9_AND_OPENING_PARENTHESIS)},{0,key(5_AND_PERCENTAGE)}}
56
#define QWERTY_L {{0,key(S)},{0,key(S)},{0,key(SLASH_AND_QUESTION_MARK)},{0,key(6_AND_CARET)}}
57
// ö
58
#define QWERTY_SEMICOLON_AND_COLON {{0,key(G)},{0,key(G)},{key(LEFT_SHIFT),key(DOT_AND_GREATER_THAN_SIGN)},{0,key(COMMA_AND_LESS_THAN_SIGN)}}
59
// ä
60
#define QWERTY_APOSTROPHE_AND_QUOTE {{key(MOD3),0},{key(MOD3),0},{key(MOD3),0},{key(MOD3),0}}
61
// ' #
62
#define QWERTY_BACKSLASH_AND_PIPE {{0,key(MINUS_AND_UNDERSCORE)},{0,key(MINUS_AND_UNDERSCORE)},{key(RIGHT_ALT),key(Q)},{0,key(DOT_AND_GREATER_THAN_SIGN)}}
63

    
64
// fourth line of keys
65
// <>|
66
#define QWERTY_NON_US_BACKSLASH_AND_PIPE {{key(MOD4),0},{key(MOD4),0},{key(MOD4),0},{key(MOD4),0}}
67
#define QWERTY_Z {{0,key(F)},{0,key(F)},{0,key(NON_US_HASHMARK_AND_TILDE)},{0,key(ESCAPE)}}
68
#define QWERTY_X {{0,key(V)},{0,key(V)},{key(LEFT_SHIFT),key(4_AND_DOLLAR)},{0,key(TAB)}}
69
#define QWERTY_C {{0,key(OPENING_BRACKET_AND_OPENING_BRACE)}, {0,key(OPENING_BRACKET_AND_OPENING_BRACE)},{key(RIGHT_ALT),key(NON_US_BACKSLASH_AND_PIPE)},{0,key(INSERT)}}
70
#define QWERTY_V {{0,key(APOSTROPHE_AND_QUOTE)},{key(LEFT_SHIFT),key(APOSTROPHE_AND_QUOTE)},{key(RIGHT_ALT),key(CLOSING_BRACKET_AND_CLOSING_BRACE)},{0,key(ENTER)}}
71
#define QWERTY_B {{0,key(SEMICOLON_AND_COLON)},{0,key(SEMICOLON_AND_COLON)},{key(LEFT_SHIFT),key(EQUAL_AND_PLUS)},{0,key(UNDO)}}
72
#define QWERTY_N {{0,key(Z)},{0,key(Z)},{0,key(CLOSING_BRACKET_AND_CLOSING_BRACE)},{key(LEFT_SHIFT),key(DOT_AND_GREATER_THAN_SIGN)}}
73
#define QWERTY_M {{0,key(Y)},{0,key(Y)},{key(LEFT_SHIFT),key(5_AND_PERCENTAGE)},{0,key(1_AND_EXCLAMATION)}}
74
#define QWERTY_COMMA_AND_LESS_THAN_SIGN {{0,key(COMMA_AND_LESS_THAN_SIGN)},{0,key(COMMA_AND_LESS_THAN_SIGN)},{key(LEFT_SHIFT),key(2_AND_AT)},{0,key(2_AND_AT)}}
75
#define QWERTY_DOT_AND_GREATER_THAN_SIGN {{0,key(DOT_AND_GREATER_THAN_SIGN)},{0,key(DOT_AND_GREATER_THAN_SIGN)},{key(LEFT_SHIFT),key(NON_US_HASHMARK_AND_TILDE)},{0,key(3_AND_HASHMARK)}}
76
// - _
77
#define QWERTY_SLASH_AND_QUESTION_MARK {{0,key(K)},{0,key(K)},{key(LEFT_SHIFT),key(COMMA_AND_LESS_THAN_SIGN)},{key(LEFT_SHIFT),key(COMMA_AND_LESS_THAN_SIGN)}}
78

    
79
//bonus stuff you'd miss
80
#define QWERTY_SPACE {{0,key(SPACE)},{0,key(SPACE)},{0,key(SPACE)},{0,key(0_AND_CLOSING_PARENTHESIS)}}
81
#define QWERTY_RIGHT_ALT {{key(MOD4),0},{key(MOD4),0},{key(MOD4),0},{key(MOD4),0}}
82
#define QWERTY_MANU {{0,key(MANU)},{0,0},{0,0},{0,0}} // TODO
83

    
84
// unchanged keys
85
#define QWERTY_TAB {{0,key(TAB)},{0,key(TAB)},{0,key(TAB)},{0,key(TAB)}}
86
#define QWERTY_BACKSPACE {{0,key(BACKSPACE)},{0,key(BACKSPACE)},{0,key(BACKSPACE)},{0,key(BACKSPACE)}}
87
#define QWERTY_ESCAPE {{0,key(ESCAPE)},{0,key(ESCAPE)},{0,key(ESCAPE)},{0,key(ESCAPE)}}
88
#define QWERTY_ENTER {{0,key(ENTER)},{0,key(ENTER)},{0,key(ENTER)},{0,key(ENTER)}}
89

    
90
// from left to right
91
#define QWERTY_LEFT_SHIFT {{key(LEFT_SHIFT),0},{key(LEFT_SHIFT),0},{key(LEFT_SHIFT),0},{key(LEFT_SHIFT),0}}
92
#define QWERTY_LEFT_CONTROL {{key(LEFT_CONTROL),0},{key(LEFT_CONTROL),0},{key(LEFT_CONTROL),0},{key(LEFT_CONTROL),0}}
93
#define QWERTY_LEFT_GUI {{key(LEFT_GUI),0},{key(LEFT_GUI),0},{key(LEFT_GUI),0},{key(LEFT_GUI),0}}
94
#define QWERTY_LEFT_ALT {{key(LEFT_ALT),0},{key(LEFT_ALT),0},{key(LEFT_ALT),0},{key(LEFT_ALT),0}}
95
// Right_ALT is modifier 
96
// Right_GUI becomes ALT
97
#define QWERTY_RIGHT_GUI {{key(RIGHT_GUI),0},{key(RIGHT_GUI),0},{key(RIGHT_GUI),0},{key(RIGHT_GUI),0}}
98
//#define QWERTY_MANU {{key(MANU),0},{key(MANU),0},{key(MANU),0},{key(MANU),0}}
99
#define QWERTY_RIGHT_CONTROL {{key(RIGHT_CONTROL),0},{key(RIGHT_CONTROL),0},{key(RIGHT_CONTROL),0},{key(RIGHT_CONTROL),0}}
100
#define QWERTY_RIGHT_SHIFT {{key(RIGHT_SHIFT),0},{key(RIGHT_SHIFT),0},{key(RIGHT_SHIFT),0},{key(RIGHT_SHIFT),0}}
101

    
102
#define QWERTY_F1 {{0,key(F1)},{0,key(F1)},{0,key(F1)},{0,key(F1)}}
103
#define QWERTY_F2 {{0,key(F2)},{0,key(F2)},{0,key(F2)},{0,key(F2)}}
104
#define QWERTY_F3 {{0,key(F3)},{0,key(F3)},{0,key(F3)},{0,key(F3)}}
105
#define QWERTY_F4 {{0,key(F4)},{0,key(F4)},{0,key(F4)},{0,key(F4)}}
106
#define QWERTY_F5 {{0,key(F5)},{0,key(F5)},{0,key(F5)},{0,key(F5)}}
107
#define QWERTY_F6 {{0,key(F6)},{0,key(F6)},{0,key(F6)},{0,key(F6)}}
108
#define QWERTY_F7 {{0,key(F7)},{0,key(F7)},{0,key(F7)},{0,key(F7)}}
109
#define QWERTY_F8 {{0,key(F8)},{0,key(F8)},{0,key(F8)},{0,key(F8)}}
110
#define QWERTY_F9 {{0,key(F9)},{0,key(F9)},{0,key(F9)},{0,key(F9)}}
111
#define QWERTY_F10 {{0,key(F10)},{0,key(F10)},{0,key(F10)},{0,key(F10)}}
112
#define QWERTY_F11 {{0,key(F11)},{0,key(F11)},{0,key(F11)},{0,key(F11)}}
113
#define QWERTY_F12 {{0,key(F12)},{0,key(F12)},{0,key(F12)},{0,key(F12)}}
114

    
115
#define QWERTY_UP        {{0,key(UP_ARROW)},{0,key(UP_ARROW)},{0,key(UP_ARROW)},{0,key(UP_ARROW)}}
116
#define QWERTY_DOWN        {{0,key(DOWN_ARROW)},{0,key(DOWN_ARROW)},{0,key(DOWN_ARROW)},{0,key(DOWN_ARROW)}}
117
#define QWERTY_LEFT        {{0,key(LEFT_ARROW)},{0,key(LEFT_ARROW)},{0,key(LEFT_ARROW)},{0,key(LEFT_ARROW)}}
118
#define QWERTY_RIGHT        {{0,key(RIGHT_ARROW)},{0,key(RIGHT_ARROW)},{0,key(RIGHT_ARROW)},{0,key(RIGHT_ARROW)}}
119

    
120
#define QWERTY_INSERT        {{0,key(INSERT)},{0,key(INSERT)},{0,key(INSERT)},{0,key(INSERT)}}
121
#define QWERTY_DELETE        {{0,key(DELETE)},{0,key(DELETE)},{0,key(DELETE)},{0,key(DELETE)}}
122
#define QWERTY_HOME        {{0,key(HOME)},{0,key(HOME)},{0,key(HOME)},{0,key(HOME)}}
123
#define QWERTY_END        {{0,key(END)},{0,key(END)},{0,key(END)},{0,key(END)}}
124
#define QWERTY_PAGE_UP        {{0,key(PAGE_UP)},{0,key(PAGE_UP)},{0,key(PAGE_UP)},{0,key(PAGE_UP)}}
125
#define QWERTY_PAGE_DOWN {{0,key(PAGE_DOWN)},{0,key(PAGE_DOWN)},{0,key(PAGE_DOWN)},{0,key(PAGE_DOWN)}}
126

    
127
// Bonus for gaming-expander
128
/*
129
#define GAMING_GRAVE        {{0,key(GRAVE_ACCENT_AND_TILDE)},{0,0},{0,0},{0,0}}
130
#define GAMING_1        {{,key(KEYPAD_1_AND_END)},{0,0},{0,0},{0,0}}
131
#define GAMING_2        {{0,key(KEYPAD_2_AND_DOWN_ARROW)},{0,0},{0,0},{0,0}}
132
#define GAMING_3        {{0,key(KEYPAD_3_AND_PAGE_DOWN)},{0,0},{0,0},{0,0}}
133
#define GAMING_4        {{0,key(KEYPAD_4_AND_LEFT_ARROW)},{0,0},{0,0},{0,0}}
134
#define GAMING_5        {{0,key(KEYPAD_5)},{0,0},{0,0},{0,0}}
135
#define GAMING_6        {{0,key(KEYPAD_6_AND_RIGHT_ARROW)},{0,0},{0,0},{0,0}}
136
#define GAMING_7        {{0,key(KEYPAD_7_AND_HOME)},{0,0},{0,0},{0,0}}
137
#define GAMING_8        {{0,key(KEYPAD_8_AND_UP_ARROW)},{0,0},{0,0},{0,0}}
138
#define GAMING_9        {{0,key(KEYPAD_9_AND_PAGE_UP)},{0,0},{0,0},{0,0}}
139
#define GAMING_0        {{0,key(KEYPAD_0_AND_INSERT)},{0,0},{0,0},{0,0}}
140
*/
141

    
142
#define GAMING_GRAVE        {{0,key(GRAVE_ACCENT_AND_TILDE)},{0,0},{0,0},{0,0}}
143
#define GAMING_1        {{0,key(1_AND_EXCLAMATION)},{0,0},{0,0},{0,0}}
144
#define GAMING_2        {{0,key(2_AND_AT)},{0,0},{0,0},{0,0}}
145
#define GAMING_3        {{0,key(3_AND_HASHMARK)},{0,0},{0,0},{0,0}}
146
#define GAMING_4        {{0,key(4_AND_DOLLAR)},{0,0},{0,0},{0,0}}
147
#define GAMING_5        {{0,key(5_AND_PERCENTAGE)},{0,0},{0,0},{0,0}}
148
#define GAMING_6        {{0,key(6_AND_CARET)},{0,0},{0,0},{0,0}}
149
#define GAMING_7        {{0,key(7_AND_AND_AMPERSAND)},{0,0},{0,0},{0,0}}
150
#define GAMING_8        {{0,key(8_AND_ASTERISK)},{0,0},{0,0},{0,0}}
151
#define GAMING_9        {{0,key(9_AND_OPENING_PARENTHESIS)},{0,0},{0,0},{0,0}}
152
#define GAMING_0        {{0,key(0_AND_CLOSING_PARENTHESIS)},{0,0},{0,0},{0,0}}
153

    
154
#define GAMING_A        {{0,key(A)},{0,0},{0,0},{0,0}}
155
#define GAMING_B        {{0,key(B)},{0,0},{0,0},{0,0}}
156
#define GAMING_C        {{0,key(C)},{0,0},{0,0},{0,0}}
157
#define GAMING_D        {{0,key(D)},{0,0},{0,0},{0,0}}
158
#define GAMING_E        {{0,key(E)},{0,0},{0,0},{0,0}}
159
#define GAMING_F        {{0,key(F)},{0,0},{0,0},{0,0}}
160
//#define GAMING_F        {{0,key(KEYPAD_F)},{0,0},{0,0},{0,0}}
161

    
162
#define GAMING_SLASH        {{0,key(KEYPAD_SLASH)},{0,0},{0,0},{0,0}}
163
#define GAMING_ASTERISK        {{0,key(KEYPAD_ASTERISK)},{0,0},{0,0},{0,0}}
164
#define GAMING_MINUS        {{0,key(KEYPAD_MINUS)},{0,0},{0,0},{0,0}}
165
#define GAMING_PLUS        {{0,key(KEYPAD_PLUS)},{0,0},{0,0},{0,0}}
166

    
167
// key is on matrix but not mapped
168
#define BLANK {{0,0},{0,0},{0,0},{0,0}}
169
// key is not on matrix and not map-able
170
#define NOMAP {{0,0},{0,0},{0,0},{0,0}}
171

    
172
#define MAX_KEYPRESS_COUNT 15
173
#define KEYPRESS_TRIGGER_COUNT 7
174

    
175
volatile uint8_t matrixState[24];
176
volatile uint8_t detectedKeypress[30][3];
177
const volatile static uint8_t mapping[19][7][4][2] PROGMEM =
178
{
179
  /* 1, 2, 3, 4, 5, 6, 7 */
180
  /* QWERTY_APOSTROPHE_AND_QUOTE */
181
  { NOMAP, NOMAP, NOMAP, NOMAP, NOMAP, NOMAP, NOMAP}, //a
182
  { QWERTY_INSERT, QWERTY_DELETE, QWERTY_HOME, QWERTY_END, QWERTY_PAGE_UP, QWERTY_PAGE_DOWN, NOMAP }, //b
183
  { QWERTY_UP, QWERTY_LEFT, QWERTY_DOWN, QWERTY_RIGHT, NOMAP, NOMAP, NOMAP}, //c
184
  { QWERTY_BACKSPACE, BLANK, QWERTY_CLOSING_BRACKET_AND_CLOSING_BRACE, QWERTY_CAPS_LOCK, QWERTY_ENTER, QWERTY_RIGHT_SHIFT, NOMAP}, //d
185
  { QWERTY_RIGHT_CONTROL, QWERTY_LEFT_ALT, QWERTY_CAPS_LOCK, QWERTY_RIGHT_ALT, QWERTY_ENTER, NOMAP, NOMAP}, // e
186
  { QWERTY_LEFT_GUI, QWERTY_CAPS_LOCK, QWERTY_NON_US_BACKSLASH_AND_PIPE, QWERTY_LEFT_ALT, QWERTY_SPACE, NOMAP, NOMAP}, // f
187
  { QWERTY_EQUAL_AND_PLUS, QWERTY_TAB, QWERTY_CAPS_LOCK, QWERTY_LEFT_SHIFT, QWERTY_LEFT_CONTROL, NOMAP, NOMAP }, // g
188
  { QWERTY_F7, QWERTY_F8, QWERTY_F9, QWERTY_F10, QWERTY_F11, QWERTY_F12, NOMAP}, // h
189
  { QWERTY_ESCAPE, QWERTY_F1, QWERTY_F2, QWERTY_F3, QWERTY_F4, QWERTY_F5, QWERTY_F6}, // i
190
  { QWERTY_6_AND_CARET, QWERTY_Y, QWERTY_H, QWERTY_N, NOMAP, NOMAP, NOMAP}, //  j
191
  { QWERTY_5_AND_PERCENTAGE, QWERTY_R, QWERTY_F, QWERTY_V, NOMAP, NOMAP, NOMAP}, // k
192
  { QWERTY_1_AND_EXCLAMATION, QWERTY_2_AND_AT, QWERTY_W, QWERTY_S, QWERTY_X, NOMAP, NOMAP}, // l
193
  { QWERTY_0_AND_CLOSING_PARENTHESIS, QWERTY_O, QWERTY_P, QWERTY_L, QWERTY_DOT_AND_GREATER_THAN_SIGN, NOMAP, NOMAP}, // m
194
  { QWERTY_7_AND_AND_AMPERSAND, QWERTY_U, QWERTY_J, QWERTY_M, NOMAP, NOMAP, NOMAP}, // n
195
  { QWERTY_T, QWERTY_G, QWERTY_B, QWERTY_BACKSPACE, NOMAP, NOMAP, NOMAP}, // o
196
  { QWERTY_4_AND_DOLLAR, QWERTY_3_AND_HASHMARK, QWERTY_E, QWERTY_D, QWERTY_C, NOMAP, NOMAP}, // p
197
  { QWERTY_GRAVE_ACCENT_AND_TILDE, QWERTY_TAB, QWERTY_Q, QWERTY_A, QWERTY_Z, NOMAP, NOMAP}, // q
198
  { QWERTY_9_AND_OPENING_PARENTHESIS, QWERTY_8_AND_ASTERISK, QWERTY_I, QWERTY_K, QWERTY_COMMA_AND_LESS_THAN_SIGN, NOMAP, NOMAP}, // r (18)
199
  { QWERTY_BACKSLASH_AND_PIPE, QWERTY_MINUS_AND_UNDERSCORE, QWERTY_OPENING_BRACKET_AND_OPENING_BRACE, QWERTY_SEMICOLON_AND_COLON, QWERTY_SLASH_AND_QUESTION_MARK, NOMAP, NOMAP} // s (19)
200
};
201
#undef key
202

    
203
volatile static uint8_t modAfterglow = 0;
204
#endif