summaryrefslogtreecommitdiff
path: root/layouts/community/60_iso
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community/60_iso')
-rw-r--r--layouts/community/60_iso/unxmaal/config.h7
-rw-r--r--layouts/community/60_iso/unxmaal/keymap.c116
2 files changed, 3 insertions, 120 deletions
diff --git a/layouts/community/60_iso/unxmaal/config.h b/layouts/community/60_iso/unxmaal/config.h
index 7a500b1bb5..4a90186ee9 100644
--- a/layouts/community/60_iso/unxmaal/config.h
+++ b/layouts/community/60_iso/unxmaal/config.h
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef KEYMAP_CONFIG_H
-#define KEYMAP_CONFIG_H
-
-#include QMK_KEYBOARD_CONFIG_H
+#pragma once
#ifndef RGB_DI_PIN
#define RGB_DI_PIN F4
@@ -28,5 +25,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
-
-#endif
diff --git a/layouts/community/60_iso/unxmaal/keymap.c b/layouts/community/60_iso/unxmaal/keymap.c
index 9441997b4b..e1c0454fb6 100644
--- a/layouts/community/60_iso/unxmaal/keymap.c
+++ b/layouts/community/60_iso/unxmaal/keymap.c
@@ -90,52 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_UL] = LAYOUT_60_iso(
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
- KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
- KC_TRNS,KC_TRNS,KC_TRNS,F(6),F(7),F(8),F(9),F(10),F(11),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
+ KC_TRNS,RGB_TOG,RGB_MOD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
+ KC_TRNS,KC_TRNS,KC_TRNS,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
};
-enum function_id {
- RGBLED_TOGGLE,
- RGBLED_STEP_MODE,
- RGBLED_INCREASE_HUE,
- RGBLED_DECREASE_HUE,
- RGBLED_INCREASE_SAT,
- RGBLED_DECREASE_SAT,
- RGBLED_INCREASE_VAL,
- RGBLED_DECREASE_VAL,
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
- [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
- [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
- [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
- [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
- [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
- [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
- [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
- [12] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
- switch(id) {
- case 0:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- } else {
- unregister_code(KC_RSFT);
- }
- break;
- }
- return MACRO_NONE;
-};
-
void matrix_scan_user(void) {
-
// Layer LED indicators
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
#ifdef KEYBOARD_gh60
@@ -153,75 +113,3 @@ void matrix_scan_user(void) {
}
#endif
};
-
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
-#ifdef RGBLIGHT_ENABLE
- case RGBLED_TOGGLE:
- //led operations
- if (record->event.pressed) {
- rgblight_toggle();
- }
- break;
- case RGBLED_INCREASE_HUE:
- if (record->event.pressed) {
- rgblight_increase_hue();
- }
- break;
- case RGBLED_DECREASE_HUE:
- if (record->event.pressed) {
- rgblight_decrease_hue();
- }
- break;
- case RGBLED_INCREASE_SAT:
- if (record->event.pressed) {
- rgblight_increase_sat();
- }
- break;
- case RGBLED_DECREASE_SAT:
- if (record->event.pressed) {
- rgblight_decrease_sat();
- }
- break;
- case RGBLED_INCREASE_VAL:
- if (record->event.pressed) {
- rgblight_increase_val();
- }
- break;
- case RGBLED_DECREASE_VAL:
- if (record->event.pressed) {
- rgblight_decrease_val();
- }
- break;
- case RGBLED_STEP_MODE:
- if (record->event.pressed) {
- rgblight_step();
- }
- break;
-#endif
- static uint8_t shift_esc_shift_mask;
- // Shift + ESC = ~
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-};