diff options
Diffstat (limited to 'keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c')
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c | 302 |
1 files changed, 302 insertions, 0 deletions
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c new file mode 100644 index 000000000..3d6da6eab --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c | |||
@@ -0,0 +1,302 @@ | |||
1 | /* | ||
2 | Copyright 2016 Priyadi Iman Nurcahyo <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | enum layers { | ||
21 | QWE, // qwerty | ||
22 | COL, // colemak | ||
23 | WOR, // workman | ||
24 | DVO, // dvorak | ||
25 | |||
26 | MOU, // mouse keys | ||
27 | EMO, // emoji | ||
28 | SYS, // system | ||
29 | }; | ||
30 | |||
31 | enum keycodes { | ||
32 | // default layout switcher | ||
33 | LAY_QWE = SAFE_RANGE, | ||
34 | LAY_COL, | ||
35 | LAY_WOR, | ||
36 | LAY_DVO, | ||
37 | |||
38 | // layer switchers | ||
39 | LYR_SYS, | ||
40 | LYR_EMO, | ||
41 | |||
42 | // os switchers | ||
43 | OS_LIN, | ||
44 | OS_WIN, | ||
45 | OS_MAC, | ||
46 | }; | ||
47 | |||
48 | // unicode map | ||
49 | |||
50 | enum unicode_name { | ||
51 | GRIN, // grinning face 😊 | ||
52 | TJOY, // tears of joy 😂 | ||
53 | SMILE, // grining face with smiling eyes 😁 | ||
54 | HEART, // heart ❤ | ||
55 | EYERT, // smiling face with heart shaped eyes 😍 | ||
56 | CRY, // crying face 😭 | ||
57 | SMEYE, // smiling face with smiling eyes 😊 | ||
58 | UNAMU, // unamused 😒 | ||
59 | KISS, // kiss 😘 | ||
60 | HART2, // two hearts 💕 | ||
61 | WEARY, // weary 😩 | ||
62 | OKHND, // ok hand sign 👌 | ||
63 | PENSV, // pensive 😔 | ||
64 | SMIRK, // smirk 😏 | ||
65 | RECYC, // recycle ♻ | ||
66 | WINK, // wink 😉 | ||
67 | THMUP, // thumb up 👍 | ||
68 | THMDN, // thumb down 👎 | ||
69 | PRAY, // pray 🙏 | ||
70 | PHEW, // relieved 😌 | ||
71 | MUSIC, // musical notes | ||
72 | FLUSH, // flushed 😳 | ||
73 | CELEB, // celebration 🙌 | ||
74 | CRY2, // crying face 😢 | ||
75 | COOL, // smile with sunglasses 😎 | ||
76 | NOEVS, // see no evil | ||
77 | NOEVH, // hear no evil | ||
78 | NOEVK, // speak no evil | ||
79 | POO, // pile of poo | ||
80 | EYES, // eyes | ||
81 | VIC, // victory hand | ||
82 | BHART, // broken heart | ||
83 | SLEEP, // sleeping face | ||
84 | SMIL2, // smiling face with open mouth & sweat | ||
85 | HUNRD, // 100 | ||
86 | CONFU, // confused | ||
87 | TONGU, // face with tongue & winking eye | ||
88 | DISAP, // disappointed | ||
89 | YUMMY, // face savoring delicious food | ||
90 | CLAP, // hand clapping | ||
91 | FEAR, // face screaming in fear | ||
92 | HORNS, // smiling face with horns | ||
93 | HALO, // smiling face with halo | ||
94 | BYE, // waving hand | ||
95 | SUN, // sun | ||
96 | MOON, // moon | ||
97 | SKULL, // skull | ||
98 | }; | ||
99 | |||
100 | const uint32_t PROGMEM unicode_map[] = { | ||
101 | [GRIN] = 0x1F600, | ||
102 | [TJOY] = 0x1F602, | ||
103 | [SMILE] = 0x1F601, | ||
104 | [HEART] = 0x2764, | ||
105 | [EYERT] = 0x1f60d, | ||
106 | [CRY] = 0x1f62d, | ||
107 | [SMEYE] = 0x1F60A, | ||
108 | [UNAMU] = 0x1F612, | ||
109 | [KISS] = 0x1F618, | ||
110 | [HART2] = 0x1F495, | ||
111 | [WEARY] = 0x1F629, | ||
112 | [OKHND] = 0x1F44C, | ||
113 | [PENSV] = 0x1F614, | ||
114 | [SMIRK] = 0x1F60F, | ||
115 | [RECYC] = 0x267B, | ||
116 | [WINK] = 0x1F609, | ||
117 | [THMUP] = 0x1F44D, | ||
118 | [THMDN] = 0x1F44E, | ||
119 | [PRAY] = 0x1F64F, | ||
120 | [PHEW] = 0x1F60C, | ||
121 | [MUSIC] = 0x1F3B6, | ||
122 | [FLUSH] = 0x1F633, | ||
123 | [CELEB] = 0x1F64C, | ||
124 | [CRY2] = 0x1F622, | ||
125 | [COOL] = 0x1F60E, | ||
126 | [NOEVS] = 0x1F648, | ||
127 | [NOEVH] = 0x1F649, | ||
128 | [NOEVK] = 0x1F64A, | ||
129 | [POO] = 0x1F4A9, | ||
130 | [EYES] = 0x1F440, | ||
131 | [VIC] = 0x270C, | ||
132 | [BHART] = 0x1F494, | ||
133 | [SLEEP] = 0x1F634, | ||
134 | [SMIL2] = 0x1F605, | ||
135 | [HUNRD] = 0x1F4AF, | ||
136 | [CONFU] = 0x1F615, | ||
137 | [TONGU] = 0x1F61C, | ||
138 | [DISAP] = 0x1F61E, | ||
139 | [YUMMY] = 0x1F60B, | ||
140 | [CLAP] = 0x1F44F, | ||
141 | [FEAR] = 0x1F631, | ||
142 | [HORNS] = 0x1F608, | ||
143 | [HALO] = 0x1F607, | ||
144 | [BYE] = 0x1F44B, | ||
145 | [SUN] = 0x2600, | ||
146 | [MOON] = 0x1F314, | ||
147 | [SKULL] = 0x1F480, | ||
148 | }; | ||
149 | |||
150 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
151 | /* qwerty */ | ||
152 | [QWE] = LAYOUT( | ||
153 | KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_PSCR, KC_SLCK, KC_PAUS, | ||
154 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
155 | |||
156 | MO(EMO), MO(SYS), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
157 | KC_MNXT, KC_VOLU, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, XXXXXXX, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
158 | KC_MPLY, KC_MUTE, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM, | ||
159 | KC_MPRV, KC_VOLD, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_LEFT, TG(MOU), KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
160 | KC_LGUI, KC_APP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, XXXXXXX, KC_P0, KC_PDOT, XXXXXXX | ||
161 | ), | ||
162 | |||
163 | /* colemak */ | ||
164 | [COL] = LAYOUT( | ||
165 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
166 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
167 | |||
168 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
169 | _______, _______, _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, | ||
170 | _______, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
171 | _______, _______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
172 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
173 | ), | ||
174 | |||
175 | /* workman */ | ||
176 | [WOR] = LAYOUT( | ||
177 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
178 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
179 | |||
180 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
181 | _______, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, | ||
182 | _______, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
183 | _______, _______, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
184 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
185 | ), | ||
186 | |||
187 | /* dvorak */ | ||
188 | [DVO] = LAYOUT( | ||
189 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
190 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
191 | |||
192 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
193 | _______, _______, _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, | ||
194 | _______, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, _______, _______, _______, _______, _______, _______, _______, | ||
195 | _______, _______, _______, _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
196 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
197 | ), | ||
198 | |||
199 | /* system */ | ||
200 | [SYS] = LAYOUT( | ||
201 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
202 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
203 | |||
204 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
205 | _______, _______, _______, LAY_QWE, OS_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
206 | _______, _______, _______, _______, _______, LAY_DVO, _______, _______, _______, _______, LAY_WOR, OS_LIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
207 | _______, _______, _______, _______, _______, _______, LAY_COL, _______, _______, _______, OS_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
208 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
209 | ), | ||
210 | |||
211 | /* mouse keys */ | ||
212 | [MOU] = LAYOUT( | ||
213 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
214 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
215 | |||
216 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
217 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
218 | XXXXXXX, KC_BTN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
219 | XXXXXXX, KC_BTN5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, _______, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
220 | KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
221 | ), | ||
222 | |||
223 | /* emoji */ | ||
224 | [EMO] = LAYOUT( | ||
225 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
226 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
227 | |||
228 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
229 | XXXXXXX, XXXXXXX, XXXXXXX, X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY), X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
230 | XXXXXXX, XXXXXXX, XXXXXXX, X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN), X(HEART),X(BYE), X(KISS), X(CELEB),X(COOL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
231 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,X(SLEEP),X(CLAP), X(CRY), X(VIC), X(BHART),X(SUN), X(SMEYE),X(WINK), X(MOON), X(CONFU), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
232 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
233 | ), | ||
234 | |||
235 | /* | ||
236 | [XXX] = LAYOUT( | ||
237 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
238 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
239 | |||
240 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
241 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
242 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
243 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
244 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
245 | ), | ||
246 | */ | ||
247 | }; | ||
248 | |||
249 | void persistent_default_layer_set(uint16_t default_layer) { | ||
250 | eeconfig_update_default_layer(default_layer); | ||
251 | default_layer_set(default_layer); | ||
252 | } | ||
253 | |||
254 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
255 | switch (keycode) { | ||
256 | /* layout switcher */ | ||
257 | case LAY_QWE: | ||
258 | if (record->event.pressed) { | ||
259 | persistent_default_layer_set(1UL<<QWE); | ||
260 | } | ||
261 | return false; | ||
262 | break; | ||
263 | case LAY_COL: | ||
264 | if (record->event.pressed) { | ||
265 | persistent_default_layer_set(1UL<<COL); | ||
266 | } | ||
267 | return false; | ||
268 | break; | ||
269 | case LAY_WOR: | ||
270 | if (record->event.pressed) { | ||
271 | persistent_default_layer_set(1UL<<WOR); | ||
272 | } | ||
273 | return false; | ||
274 | break; | ||
275 | case LAY_DVO: | ||
276 | if (record->event.pressed) { | ||
277 | persistent_default_layer_set(1UL<<DVO); | ||
278 | } | ||
279 | return false; | ||
280 | break; | ||
281 | |||
282 | /* os switcher */ | ||
283 | case OS_LIN: | ||
284 | set_unicode_input_mode(UC_LNX); | ||
285 | return false; | ||
286 | break; | ||
287 | case OS_WIN: | ||
288 | set_unicode_input_mode(UC_WINC); | ||
289 | return false; | ||
290 | break; | ||
291 | case OS_MAC: | ||
292 | set_unicode_input_mode(UC_OSX); | ||
293 | return false; | ||
294 | break; | ||
295 | |||
296 | } | ||
297 | return true; | ||
298 | } | ||
299 | |||
300 | void matrix_init_user() { | ||
301 | set_unicode_input_mode(UC_LNX); | ||
302 | } | ||