aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kagno <ar@kagno.org>2021-04-19 06:17:34 +0000
committerGitHub <noreply@github.com>2021-04-18 23:17:34 -0700
commitef6802ca604eb6e011498fe0bbbb69a3915e0580 (patch)
tree71baa251d1b63faffe4e6cc7e03b4babc384f33e
parentc7adb7a352c50704401efdbceb46ead12c4de2e2 (diff)
downloadqmk_firmware-ef6802ca604eb6e011498fe0bbbb69a3915e0580.tar.gz
qmk_firmware-ef6802ca604eb6e011498fe0bbbb69a3915e0580.zip
New keyboard keymap, small keymap updates to mm2 keymap (#12310)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Alex <alex@turncommerce.com>
-rw-r--r--keyboards/mechmini/v2/keymaps/arkag/config.h16
-rw-r--r--keyboards/mechmini/v2/keymaps/arkag/keymap.c17
-rw-r--r--keyboards/mechmini/v2/keymaps/arkag/rules.mk3
-rw-r--r--keyboards/preonic/keymaps/arkag/config.h30
-rw-r--r--keyboards/preonic/keymaps/arkag/keymap.c77
-rw-r--r--keyboards/preonic/keymaps/arkag/readme.md1
-rw-r--r--keyboards/preonic/keymaps/arkag/rules.mk17
-rw-r--r--users/arkag/arkag.c144
-rw-r--r--users/arkag/arkag.h16
-rw-r--r--users/arkag/config.h16
-rw-r--r--users/arkag/rules.mk5
11 files changed, 272 insertions, 70 deletions
diff --git a/keyboards/mechmini/v2/keymaps/arkag/config.h b/keyboards/mechmini/v2/keymaps/arkag/config.h
index e89adc097..966289459 100644
--- a/keyboards/mechmini/v2/keymaps/arkag/config.h
+++ b/keyboards/mechmini/v2/keymaps/arkag/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2021 Alex Kagno
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
1#pragma once 17#pragma once
2 18
3// save me space! 19// save me space!
diff --git a/keyboards/mechmini/v2/keymaps/arkag/keymap.c b/keyboards/mechmini/v2/keymaps/arkag/keymap.c
index ee1afff05..2c64c5aac 100644
--- a/keyboards/mechmini/v2/keymaps/arkag/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/arkag/keymap.c
@@ -1,4 +1,19 @@
1#include QMK_KEYBOARD_H 1/* Copyright 2021 Alex Kagno
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
2#include "arkag.h" 17#include "arkag.h"
3 18
4/* 19/*
diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk
index d46e72f75..c4ee1a7d7 100644
--- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk
+++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = yes
12TAP_DANCE_ENABLE = no 12TAP_DANCE_ENABLE = no
13UNICODE_ENABLE = yes 13UNICODE_ENABLE = yes
14LEADER_ENABLE = yes 14LEADER_ENABLE = yes
15
16# save me space!
17EXTRAFLAGS += -flto
diff --git a/keyboards/preonic/keymaps/arkag/config.h b/keyboards/preonic/keymaps/arkag/config.h
new file mode 100644
index 000000000..1b42e6ef9
--- /dev/null
+++ b/keyboards/preonic/keymaps/arkag/config.h
@@ -0,0 +1,30 @@
1/* Copyright 2021 Alex Kagno
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#ifdef AUDIO_ENABLE
20# define STARTUP_SONG SONG(STARTUP_SOUND)
21# define GOODBYE_SONG SONG(GOODBYE_SOUND)
22# define AUDIO_CLICKY
23# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f
24# define MIDI_BASIC
25# define MUSIC_MASK keycode != KC_NO
26#endif
27
28// save me space!
29#define NO_ACTION_MACRO
30#define NO_ACTION_FUNCTION
diff --git a/keyboards/preonic/keymaps/arkag/keymap.c b/keyboards/preonic/keymaps/arkag/keymap.c
new file mode 100644
index 000000000..42b875d67
--- /dev/null
+++ b/keyboards/preonic/keymaps/arkag/keymap.c
@@ -0,0 +1,77 @@
1/* Copyright 2021 Alex Kagno
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#include "arkag.h"
18#include "muse.h"
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21
22 [_QWERTY] = LAYOUT_preonic_grid(
23 M_EHYPR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, M_EHYPR,
24 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
25 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
26 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
27 KC_LCTL, KC_LGUI, KC_LALT, MEDIA, SYMBOL, KC_SPC, M_LMHYP, ARROW, FUNCT, XXXXXXX, KC_RALT, KC_LEAD),
28
29 [_SYMBOL] = LAYOUT_preonic_grid(
30 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
31 KC_GRV, KC_LPRN, KC_RPRN, KC_PLUS, KC_UNDS, KC_CIRC, KC_AMPR, KC_7, KC_8, KC_9, _______, _______,
32 KC_LCBR, KC_LBRC, KC_RBRC, KC_EQL, KC_MINS, KC_ASTR, KC_PIPE, KC_4, KC_5, KC_6, _______, KC_NLCK,
33 KC_RCBR, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT,
34 M_DASH, KC_TILD, _______, KEEB, _______, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST),
35
36 [_MEDIA] = LAYOUT_preonic_grid(
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______,
40 KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
41 KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
42
43 [_ARROW] = LAYOUT_preonic_grid(
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
45 _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
47 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
48 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
49
50 [_FUNCT] = LAYOUT_preonic_grid(
51 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
52 _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______,
53 _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______,
54 M_SFTY, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, KC_CAPS,
55 _______, _______, _______, _______, _______, _______, M_AEST, _______, _______, _______, _______, M_OS ),
56
57 [_KEEB] = LAYOUT_preonic_grid(
58 CK_TOGG, AU_TOG, MU_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
59 M_USSR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
60 _______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______,
61 RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______,
62 RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
63
64};
65
66#ifdef AUDIO_ENABLE
67bool music_mask_user(uint16_t keycode) {
68 switch (keycode) {
69 case MU_TOG:
70 case SYMBOL:
71 case KEEB:
72 return false;
73 default:
74 return true;
75 }
76}
77#endif
diff --git a/keyboards/preonic/keymaps/arkag/readme.md b/keyboards/preonic/keymaps/arkag/readme.md
new file mode 100644
index 000000000..e911968dd
--- /dev/null
+++ b/keyboards/preonic/keymaps/arkag/readme.md
@@ -0,0 +1 @@
# The default Preonic layout - largely based on the Planck's \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/arkag/rules.mk b/keyboards/preonic/keymaps/arkag/rules.mk
new file mode 100644
index 000000000..8b04cf2aa
--- /dev/null
+++ b/keyboards/preonic/keymaps/arkag/rules.mk
@@ -0,0 +1,17 @@
1BOOTMAGIC_ENABLE = lite
2MOUSEKEY_ENABLE = no
3STENO_ENABLE = no
4EXTRAKEY_ENABLE = yes
5CONSOLE_ENABLE = no
6COMMAND_ENABLE = no
7SLEEP_LED_ENABLE = yes
8NKRO_ENABLE = yes
9BACKLIGHT_ENABLE = no
10AUDIO_ENABLE = yes
11RGBLIGHT_ENABLE = yes
12TAP_DANCE_ENABLE = no
13UNICODE_ENABLE = yes
14LEADER_ENABLE = yes
15
16# from default
17SRC += muse.c
diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c
index 97f84d8f0..564c234c3 100644
--- a/users/arkag/arkag.c
+++ b/users/arkag/arkag.c
@@ -1,4 +1,5 @@
1#include "arkag.h" 1#include "arkag.h"
2#include "eeprom.h"
2 3
3/* 4/*
4 Current Layout and Keeb: 5 Current Layout and Keeb:
@@ -40,6 +41,7 @@ uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {
40} 41}
41// End: Written by Chris Lewis 42// End: Written by Chris Lewis
42 43
44static int shift_int = 0;
43uint8_t current_os, 45uint8_t current_os,
44 mod_primary_mask, 46 mod_primary_mask,
45 fade_interval, 47 fade_interval,
@@ -54,6 +56,8 @@ activityState state = boot;
54bool aesthetic = false, 56bool aesthetic = false,
55 shifty = false; 57 shifty = false;
56 58
59float song_ussr[][2] = SONG(USSR_ANTHEM);
60
57void set_color (Color new, bool update) { 61void set_color (Color new, bool update) {
58 rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update); 62 rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update);
59} 63}
@@ -188,21 +192,17 @@ void set_os (uint8_t os, bool update) {
188 case OS_MAC: 192 case OS_MAC:
189 set_unicode_input_mode(UC_OSX); 193 set_unicode_input_mode(UC_OSX);
190 underglow = (Color){ 213, 255, 255 }; 194 underglow = (Color){ 213, 255, 255 };
191 mod_primary_mask = MOD_GUI_MASK;
192 break; 195 break;
193 case OS_WIN: 196 case OS_WIN:
194 set_unicode_input_mode(UC_WINC); 197 set_unicode_input_mode(UC_WINC);
195 underglow = (Color){ 128, 255, 255 }; 198 underglow = (Color){ 128, 255, 255 };
196 mod_primary_mask = MOD_CTL_MASK;
197 break; 199 break;
198 case OS_NIX: 200 case OS_NIX:
199 set_unicode_input_mode(UC_LNX); 201 set_unicode_input_mode(UC_LNX);
200 underglow = (Color){ 43, 255, 255 }; 202 underglow = (Color){ 43, 255, 255 };
201 mod_primary_mask = MOD_CTL_MASK;
202 break; 203 break;
203 default: 204 default:
204 underglow = (Color){ 0, 0, 255 }; 205 underglow = (Color){ 0, 0, 255 };
205 mod_primary_mask = MOD_CTL_MASK;
206 } 206 }
207 set_color(underglow, update); 207 set_color(underglow, update);
208 flash_color = underglow; 208 flash_color = underglow;
@@ -245,6 +245,17 @@ void sec_mod(bool press) {
245 } 245 }
246} 246}
247 247
248// register Meh if Win or Hyper if other
249// KC_MEH/HYPR registers both sides, causes issues with some apps
250// I'll do it myself, then
251void meh_hyper(bool press) {
252 if (current_os == OS_WIN) {
253 (press) ? register_mods(L_BIT_MEH) : unregister_mods(L_BIT_MEH);
254 } else {
255 (press) ? register_mods(L_BIT_HYPR) : unregister_mods(L_BIT_HYPR);
256 }
257}
258
248void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift) { 259void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
249 if (use_shift) { 260 if (use_shift) {
250 register_code(KC_LSFT); 261 register_code(KC_LSFT);
@@ -257,21 +268,25 @@ void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
257 } 268 }
258} 269}
259 270
260void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) { 271void pair_surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
261 if (use_shift) {
262 register_code(KC_LSFT);
263 }
264 for (int i = 0; i < num_of_chars; i++) { 272 for (int i = 0; i < num_of_chars; i++) {
273 (use_shift) ? register_mods(MOD_BIT( KC_LSFT)) : NULL;
265 tap_code(keycode); 274 tap_code(keycode);
266 } 275 tap_code((keycode == KC_LCBR) ? KC_RCBR : (keycode == KC_LBRC) ? KC_RBRC : (keycode == KC_LPRN) ? KC_RPRN : KC_NO);
267 if (use_shift) { 276 (use_shift) ? unregister_mods(MOD_BIT( KC_LSFT)) : NULL;
268 unregister_code(KC_LSFT);
269 }
270 for (int i = 0; i < (num_of_chars/2); i++) {
271 tap_code(KC_LEFT); 277 tap_code(KC_LEFT);
272 } 278 }
273} 279}
274 280
281void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
282 for (int i = 0; i < num_of_chars; i++) {
283 (use_shift) ? register_mods(MOD_BIT( KC_LSFT)) : NULL;
284 tap_code(keycode);
285 (use_shift) ? unregister_mods(MOD_BIT( KC_LSFT)) : NULL;
286 }
287 multi_tap(num_of_chars / 2, KC_LEFT, false);
288}
289
275void long_keystroke(size_t num_of_keys, uint16_t keys[]) { 290void long_keystroke(size_t num_of_keys, uint16_t keys[]) {
276 for (int i = 0; i < num_of_keys-1; i++) { 291 for (int i = 0; i < num_of_keys-1; i++) {
277 register_code(keys[i]); 292 register_code(keys[i]);
@@ -282,6 +297,12 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) {
282 } 297 }
283} 298}
284 299
300void pri_mod_keystroke(uint16_t key) {
301 pri_mod(true);
302 tap_code(key);
303 pri_mod(false);
304}
305
285void matrix_init_user(void) { 306void matrix_init_user(void) {
286 current_os = eeprom_read_byte(EECONFIG_USERSPACE); 307 current_os = eeprom_read_byte(EECONFIG_USERSPACE);
287 set_os(current_os, false); 308 set_os(current_os, false);
@@ -326,27 +347,14 @@ void matrix_scan_user(void) {
326 } else { 347 } else {
327 } 348 }
328 } 349 }
329 SEQ_THREE_KEYS(KC_C, KC_S, KC_E) {
330 if (current_os == OS_WIN) {
331 long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LSFT, KC_ESC});
332 } else {
333 }
334 }
335 SEQ_FOUR_KEYS(KC_C, KC_A, KC_L, KC_C) {
336 if (current_os == OS_WIN) {
337 SEND_STRING(SS_TAP(X_CALCULATOR));
338 } else if (current_os == OS_MAC) {
339 SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI) "calculator" SS_TAP(X_ENTER));
340 }
341 }
342 // end OS functions 350 // end OS functions
343 351
344 // begin format functions 352 // begin format functions
345 SEQ_ONE_KEY(KC_B) { 353 SEQ_ONE_KEY(KC_B) {
346 surround_type(4, KC_8, true); 354 surround_type(2, KC_8, true);
347 } 355 }
348 SEQ_ONE_KEY(KC_I) { 356 SEQ_ONE_KEY(KC_I) {
349 surround_type(2, KC_8, true); 357 surround_type(2, KC_MINS, true);
350 } 358 }
351 SEQ_ONE_KEY(KC_U) { 359 SEQ_ONE_KEY(KC_U) {
352 surround_type(4, KC_MINS, true); 360 surround_type(4, KC_MINS, true);
@@ -357,6 +365,18 @@ void matrix_scan_user(void) {
357 SEQ_ONE_KEY(KC_C) { 365 SEQ_ONE_KEY(KC_C) {
358 send_unicode_hex_string("00E7"); 366 send_unicode_hex_string("00E7");
359 } 367 }
368 SEQ_TWO_KEYS(KC_A, KC_V) {
369 surround_type(2, KC_QUOT, true);
370 pair_surround_type(2, KC_LCBR, true);
371 surround_type(2, KC_SPC, false);
372 }
373 SEQ_TWO_KEYS(KC_M, KC_L) {
374 pair_surround_type(1, KC_LBRC, false);
375 SEND_STRING("LINK_NAME");
376 tap_code(KC_RGHT);
377 pair_surround_type(1, KC_LPRN, true);
378 pri_mod_keystroke(KC_V);
379 }
360 SEQ_TWO_KEYS(KC_C, KC_C) { 380 SEQ_TWO_KEYS(KC_C, KC_C) {
361 surround_type(2, KC_GRAVE, false); 381 surround_type(2, KC_GRAVE, false);
362 } 382 }
@@ -369,28 +389,18 @@ void matrix_scan_user(void) {
369 SEQ_TWO_KEYS(KC_E, KC_E) { 389 SEQ_TWO_KEYS(KC_E, KC_E) {
370 send_unicode_hex_string("00E9"); 390 send_unicode_hex_string("00E9");
371 } 391 }
372 SEQ_TWO_KEYS(KC_T, KC_I) {
373 surround_type(4, KC_MINS, true);
374 }
375 SEQ_TWO_KEYS(KC_T, KC_B) {
376 surround_type(4, KC_8, true);
377 }
378 // end format functions 392 // end format functions
379 393
380 // start fancy functions 394 // start fancy functions
381 SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) { 395 SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) {
382 surround_type(6, KC_GRAVE, false); 396 surround_type(6, KC_GRAVE, false);
383 pri_mod(true); 397 pri_mod_keystroke(KC_V);
384 tap_code(KC_V);
385 pri_mod(false);
386 multi_tap(3, KC_RGHT, false); 398 multi_tap(3, KC_RGHT, false);
387 tap_code(KC_ENTER); 399 tap_code(KC_ENTER);
388 } 400 }
389 SEQ_THREE_KEYS(KC_T, KC_C, KC_ENT) { 401 SEQ_THREE_KEYS(KC_T, KC_C, KC_ENT) {
390 multi_tap(3, KC_GRAVE, false); 402 multi_tap(3, KC_GRAVE, false);
391 pri_mod(true); 403 pri_mod_keystroke(KC_V);
392 tap_code(KC_V);
393 pri_mod(false);
394 multi_tap(2, KC_ENTER, false); 404 multi_tap(2, KC_ENTER, false);
395 } 405 }
396 // end fancy functions 406 // end fancy functions
@@ -406,9 +416,7 @@ void matrix_scan_user(void) {
406 SEQ_THREE_KEYS(KC_D, KC_D, KC_D) { 416 SEQ_THREE_KEYS(KC_D, KC_D, KC_D) {
407 SEND_STRING(".\\Administrator"); 417 SEND_STRING(".\\Administrator");
408 tap_code(KC_TAB); 418 tap_code(KC_TAB);
409 pri_mod(true); 419 pri_mod_keystroke(KC_V);
410 tap_code(KC_V);
411 pri_mod(false);
412 tap_code(KC_ENTER); 420 tap_code(KC_ENTER);
413 } 421 }
414 SEQ_THREE_KEYS(KC_L, KC_O, KC_D) { 422 SEQ_THREE_KEYS(KC_L, KC_O, KC_D) {
@@ -426,7 +434,7 @@ void matrix_scan_user(void) {
426 // ┬─┬ノ( º _ º ノ) 434 // ┬─┬ノ( º _ º ノ)
427 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029"); 435 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029");
428 } 436 }
429 SEQ_THREE_KEYS(KC_L, KC_E, KC_N) { 437 SEQ_THREE_KEYS(KC_L, KC_O, KC_L) {
430 // ( ͡° ͜ʖ ͡°) 438 // ( ͡° ͜ʖ ͡°)
431 send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029"); 439 send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029");
432 } 440 }
@@ -469,18 +477,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
469 switch (keycode) { 477 switch (keycode) {
470 case KC_A ... KC_Z: 478 case KC_A ... KC_Z:
471 if (record->event.pressed) { 479 if (record->event.pressed) {
472 static int shift_int = 1; 480 shift_int += (rand() % 5);
473 int shift = shift_int % 2; 481 int shift = ((shift_int % 2) == 1) ? true : false;
474 shift_int++;
475 state = active; 482 state = active;
476 velocikey_accelerate(); 483 velocikey_accelerate();
477 if (shift == 1){ 484 (shift) ? register_code(KC_LSFT) : NULL;
478 register_code(KC_LSFT);
479 }
480 tap_code(keycode); 485 tap_code(keycode);
481 if (shift == 1){ 486 (shift) ? unregister_code(KC_LSFT) : NULL;
482 unregister_code(KC_LSFT);
483 }
484 } 487 }
485 return false; 488 return false;
486 case KC_SPC: 489 case KC_SPC:
@@ -496,13 +499,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
496 } 499 }
497 500
498 switch (keycode) { 501 switch (keycode) {
499 case M_PMOD: 502 #ifdef AUDIO_ENABLE
500 pri_mod(record->event.pressed); 503 case M_USSR:
501 return false; 504 PLAY_SONG(song_ussr);
502 505 return false;
503 case M_SMOD: 506 #endif
504 sec_mod(record->event.pressed);
505 return false;
506 507
507 case M_OS: 508 case M_OS:
508 if (record->event.pressed){ 509 if (record->event.pressed){
@@ -515,6 +516,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
515 send_unicode_hex_string("2014"); 516 send_unicode_hex_string("2014");
516 } 517 }
517 return false; 518 return false;
519 case M_LMHYP:
520 case M_EHYPR:
521 (keycode = M_LMHYP) ? (record->event.pressed) ? layer_on(_ARROW) : layer_off(_ARROW) : NULL;
522 meh_hyper(record->event.pressed);
523 return false;
524
525 case M_SFTY:
526 if(record->event.pressed){
527 num_extra_flashes_off = (shifty) ? 1 : 0;
528 shifty = !shifty;
529 flash_color = underglow;
530 flash_state = flash_off;
531 return false;
532 }
533
534 case M_AEST:
535 if(record->event.pressed){
536 num_extra_flashes_off = (aesthetic) ? 1 : 0;
537 aesthetic = !aesthetic;
538 flash_color = underglow;
539 flash_state = flash_off;
540 return false;
541 }
518 542
519 default: 543 default:
520 if (record->event.pressed) { 544 if (record->event.pressed) {
diff --git a/users/arkag/arkag.h b/users/arkag/arkag.h
index b78234ca9..d4bec6598 100644
--- a/users/arkag/arkag.h
+++ b/users/arkag/arkag.h
@@ -1,7 +1,6 @@
1#pragma once 1#pragma once
2 2
3#include "quantum.h" 3#include QMK_KEYBOARD_H
4#include "process_keycode/process_tap_dance.h"
5 4
6#define EECONFIG_USERSPACE (uint8_t *)20 5#define EECONFIG_USERSPACE (uint8_t *)20
7 6
@@ -11,9 +10,8 @@
11#define FUNCT MO(4) 10#define FUNCT MO(4)
12#define KEEB MO(5) 11#define KEEB MO(5)
13 12
14#define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) 13#define L_BIT_MEH MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
15#define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) 14#define L_BIT_HYPR MOD_BIT(KC_LCTL) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
16#define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))
17 15
18#define LED_FLASH_DELAY 150 16#define LED_FLASH_DELAY 150
19 17
@@ -69,6 +67,11 @@ enum custom_keycodes {
69 M_SMOD, 67 M_SMOD,
70 M_OS, 68 M_OS,
71 M_DASH, 69 M_DASH,
70 M_USSR,
71 M_EHYPR,
72 M_LMHYP,
73 M_SFTY,
74 M_AEST,
72}; 75};
73 76
74void velocikey_accelerate(void); 77void velocikey_accelerate(void);
@@ -97,8 +100,11 @@ void pri_mod(bool press);
97 100
98void sec_mod(bool press); 101void sec_mod(bool press);
99 102
103void meh_hyper(bool press);
104
100void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift); 105void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
101 106
102void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift); 107void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
108void pair_surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
103 109
104void long_keystroke(size_t num_of_keys, uint16_t keys[]); 110void long_keystroke(size_t num_of_keys, uint16_t keys[]);
diff --git a/users/arkag/config.h b/users/arkag/config.h
index 5a89a18f6..7dccac7a8 100644
--- a/users/arkag/config.h
+++ b/users/arkag/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2021 Alex Kagno
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
1#pragma once 17#pragma once
2 18
3#define TAPPING_TERM 200 19#define TAPPING_TERM 200
diff --git a/users/arkag/rules.mk b/users/arkag/rules.mk
index 3513f0ea6..14d60970b 100644
--- a/users/arkag/rules.mk
+++ b/users/arkag/rules.mk
@@ -1 +1,4 @@
1 SRC += arkag.c 1SRC += arkag.c
2
3# save me space!
4LTO_ENABLE = yes \ No newline at end of file