summaryrefslogtreecommitdiffstats
path: root/layouts/community/ergodox/belak
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community/ergodox/belak')
-rw-r--r--layouts/community/ergodox/belak/keymap.c35
-rw-r--r--layouts/community/ergodox/belak/visualizer.c49
2 files changed, 15 insertions, 69 deletions
diff --git a/layouts/community/ergodox/belak/keymap.c b/layouts/community/ergodox/belak/keymap.c
index bca0dec913..de0fe1b1ae 100644
--- a/layouts/community/ergodox/belak/keymap.c
+++ b/layouts/community/ergodox/belak/keymap.c
@@ -33,11 +33,6 @@ enum belak_keycodes {
E_TSET,
};
-inline void tap(uint16_t keycode) {
- register_code(keycode);
- unregister_code(keycode);
-};
-
// TODO: Add LED support to the tap dance by using the advanced macro
#define LTOGGLE TD(TD_LAYER_TOGGLE)
@@ -273,17 +268,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case E_SHRUG: // ¯\_(ツ)_/¯
if (record->event.pressed) {
process_unicode((0x00AF|QK_UNICODE), record); // Hand
- tap(KC_BSLS); // Arm
+ tap_code16(KC_BSLS); // Arm
register_code(KC_RSFT);
- tap(KC_UNDS); // Arm
- tap(KC_LPRN); // Head
+ tap_code16(KC_UNDS); // Arm
+ tap_code16(KC_LPRN); // Head
unregister_code(KC_RSFT);
process_unicode((0x30C4|QK_UNICODE), record); // Face
register_code(KC_RSFT);
- tap(KC_RPRN); // Head
- tap(KC_UNDS); // Arm
+ tap_code16(KC_RPRN); // Head
+ tap_code16(KC_UNDS); // Arm
unregister_code(KC_RSFT);
- tap(KC_SLSH); // Arm
+ tap_code16(KC_SLSH); // Arm
process_unicode((0x00AF|QK_UNICODE), record); // Hand
}
return false;
@@ -291,19 +286,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case E_TFLIP: // (╯°□°)╯ ︵ ┻━┻
if (record->event.pressed) {
register_code(KC_RSFT);
- tap(KC_9);
+ tap_code16(KC_9);
unregister_code(KC_RSFT);
process_unicode((0x256F|QK_UNICODE), record); // Arm
process_unicode((0x00B0|QK_UNICODE), record); // Eye
process_unicode((0x25A1|QK_UNICODE), record); // Mouth
process_unicode((0x00B0|QK_UNICODE), record); // Eye
register_code(KC_RSFT);
- tap(KC_0);
+ tap_code16(KC_0);
unregister_code(KC_RSFT);
process_unicode((0x256F|QK_UNICODE), record); // Arm
- tap(KC_SPC);
+ tap_code16(KC_SPC);
process_unicode((0x0361|QK_UNICODE), record); // Flippy
- tap(KC_SPC);
+ tap_code16(KC_SPC);
process_unicode((0x253B|QK_UNICODE), record); // Table
process_unicode((0x2501|QK_UNICODE), record); // Table
process_unicode((0x253B|QK_UNICODE), record); // Table
@@ -316,18 +311,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
process_unicode((0x2500|QK_UNICODE), record); // Table
process_unicode((0x2500|QK_UNICODE), record); // Table
process_unicode((0x252C|QK_UNICODE), record); // Table
- tap(KC_SPC);
+ tap_code16(KC_SPC);
process_unicode((0x30CE|QK_UNICODE), record); // Arm
register_code(KC_RSFT);
- tap(KC_9);
+ tap_code16(KC_9);
unregister_code(KC_RSFT);
- tap(KC_SPC);
+ tap_code16(KC_SPC);
process_unicode((0x309C|QK_UNICODE), record); // Eye
- tap(KC_MINS);
+ tap_code16(KC_MINS);
process_unicode((0x309C|QK_UNICODE), record); // Eye
process_unicode((0x30CE|QK_UNICODE), record); // Arm
register_code(KC_RSFT);
- tap(KC_0);
+ tap_code16(KC_0);
unregister_code(KC_RSFT);
}
return false;
diff --git a/layouts/community/ergodox/belak/visualizer.c b/layouts/community/ergodox/belak/visualizer.c
deleted file mode 100644
index b92890a668..0000000000
--- a/layouts/community/ergodox/belak/visualizer.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Copyright 2017 Fred Sundvik
-
-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, either version 2 of the License, or
-(at your option) any later version.
-
-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.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-// Currently we are assuming that both the backlight and LCD are enabled
-// But it's entirely possible to write a custom visualizer that use only
-// one of them
-#ifndef LCD_BACKLIGHT_ENABLE
-#error This visualizer needs that LCD backlight is enabled
-#endif
-
-#ifndef LCD_ENABLE
-#error This visualizer needs that LCD is enabled
-#endif
-
-#include "simple_visualizer.h"
-
-static void get_visualizer_layer_and_color(visualizer_state_t* state) {
- uint8_t saturation = 60;
- if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
- saturation = 255;
- }
-
- if (state->status.layer & 0x4) {
- state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
- state->layer_text = "Media";
- }
- else if (state->status.layer & 0x2) {
- state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
- state->layer_text = "Symbols";
- }
- else {
- state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
- state->layer_text = "Base";
- }
-}