Browse Source

Squashed commit of the following:

commit 806839e095
Author: hsuchil <hsuchil@hsuchil.com.com>
Date:   Mon Apr 18 07:04:00 2022 -0700

    Squashed commit of the following:

    commit f583ecb141
    Author: hsuchil <hsuchil@hsuchil.com.com>
    Date:   Mon Apr 18 07:00:09 2022 -0700

        Changes.

    commit 24b9661daf
    Author: hsuchil <hsuchil@hsuchil.com.com>
    Date:   Mon Apr 18 06:59:12 2022 -0700

        address pr feedback

    commit d097edeec0
    Author: Héctor Galindo <hsuchil@hsuchil.com>
    Date:   Mon Apr 18 06:51:02 2022 -0700

        Update keyboards/mechwild/obe/keymaps/hsuchil/config.h

        Co-authored-by: Drashna Jaelre <drashna@live.com>

    commit 62a0bb3318
    Author: hsuchil <hsuchil@hsuchil.com.com>
    Date:   Sun Apr 17 11:09:16 2022 -0700

        Changes.

    commit 44b8b85893
    Author: hsuchil <hsuchil@hsuchil.com.com>
    Date:   Sun Apr 17 11:05:18 2022 -0700

        Add more keyboards

    commit a8f0851b52
    Author: hsuchil <hsuchil@hsuchil.com.com>
    Date:   Sat Apr 16 19:41:30 2022 -0700

        Add preonic hsuchil keymap

    commit 2cf90ad861
    Author: hsuchil <hsuchil@hsuchil.com.com>
    Date:   Sat Apr 16 11:12:37 2022 -0700

        Add basketweave hsuchil keymap

commit 3ff138840f
Author: hsuchil <hsuchil@hsuchil.com.com>
Date:   Sat Apr 16 11:12:12 2022 -0700

    Add users/hsuchil userspace
pull/16868/head
hsuchil 2 years ago
parent
commit
6a2ccffd28
16 changed files with 611 additions and 0 deletions
  1. +20
    -0
      keyboards/1upkeyboards/sweet16/keymaps/hsuchil/config.h
  2. +96
    -0
      keyboards/1upkeyboards/sweet16/keymaps/hsuchil/keymap.c
  3. +54
    -0
      keyboards/basketweave/keymaps/hsuchil/keymap.c
  4. +27
    -0
      keyboards/mechwild/obe/keymaps/hsuchil/config.h
  5. +52
    -0
      keyboards/mechwild/obe/keymaps/hsuchil/keymap.c
  6. +2
    -0
      keyboards/mechwild/obe/keymaps/hsuchil/rules.mk
  7. +24
    -0
      keyboards/moonlander/keymaps/hsuchil/config.h
  8. +57
    -0
      keyboards/moonlander/keymaps/hsuchil/keymap.c
  9. +1
    -0
      keyboards/moonlander/keymaps/hsuchil/rules.mk
  10. +25
    -0
      keyboards/preonic/keymaps/hsuchil/config.h
  11. +56
    -0
      keyboards/preonic/keymaps/hsuchil/keymap.c
  12. +4
    -0
      keyboards/preonic/keymaps/hsuchil/rules.mk
  13. +20
    -0
      users/hsuchil/config.h
  14. +127
    -0
      users/hsuchil/hsuchil.c
  15. +45
    -0
      users/hsuchil/hsuchil.h
  16. +1
    -0
      users/hsuchil/rules.mk

+ 20
- 0
keyboards/1upkeyboards/sweet16/keymaps/hsuchil/config.h View File

@ -0,0 +1,20 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#pragma once
#define HSUCHIL_DISABLE_TRILAYER

+ 96
- 0
keyboards/1upkeyboards/sweet16/keymaps/hsuchil/keymap.c View File

@ -0,0 +1,96 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#include QMK_KEYBOARD_H
#include "hsuchil.h"
#define G_TIMEOUT 1500
enum sweet16_layers {
_FNKEYS,
_NUMS,
_QWER,
_ADJUST,
};
enum sweet16_keycodes {
TOG_MASHG = NEW_SAFE_RANGE,
};
#define ADJUST MO(_ADJUST)
#define FNKEYS DF(_FNKEYS)
#define NUMS DF(_NUMS)
#define QWER DF(_QWER)
#define SLSH_ADJ LT(_ADJUST, KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FNKEYS] = LAYOUT_ortho_4x4(
KC_F24, KC_F16, KC_F20, ADJUST,
KC_VOLU, KC_F15, KC_F19, KC_F23,
KC_VOLD, KC_F14, KC_F18, KC_F22,
KC_MPLY, KC_F13, KC_F17, TOG_MASHG
),
[_NUMS] = LAYOUT_ortho_4x4(
KC_7, KC_8, KC_9, SLSH_ADJ,
KC_4, KC_5, KC_6, KC_ASTR,
KC_1, KC_2, KC_3, KC_MINUS,
KC_ENT, KC_0, KC_DOT, KC_PLUS
),
[_QWER] = LAYOUT_ortho_4x4(
KC_GRV, KC_6, KC_7, ADJUST,
KC_Q, KC_W, KC_E, KC_R,
KC_A, KC_S, KC_D, KC_F,
KC_Z, KC_X, KC_C, KC_V
),
[_ADJUST] = LAYOUT_ortho_4x4(
QWER, FNKEYS, NUMS, _______,
_______, RGB_TOG, RGB_MOD, RESET,
_______, _______, _______, _______,
_______, _______, _______, _______
),
};
static bool mash_g = false;
static uint16_t g_timer;
bool extra_process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case TOG_MASHG:
if (record->event.pressed){
mash_g = mash_g ? false : true;
g_timer = timer_read();
}
return false;
break;
}
return true;
}
void extra_housekeeping_task_user(void) {
if (mash_g && timer_elapsed(g_timer) > G_TIMEOUT) {
tap_code(KC_G);
g_timer = timer_read();
}
}

+ 54
- 0
keyboards/basketweave/keymaps/hsuchil/keymap.c View File

@ -0,0 +1,54 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#include QMK_KEYBOARD_H
#include "hsuchil.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BSE] = LAYOUT_default(
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_HYPR, 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, KC_BSLS, KC_MUTE,
KC_MEH, RCT_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, L_BHGH, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_SPC, L_LOW, KC_SPC, KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
[_LOW] = LAYOUT_default(
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
_______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, TOG_MAC, _______, _______, _______, _______, KC_MPLY,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
_______, _______, KC_HYPR, _______, KC_MEH, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[_HGH] = LAYOUT_default(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FNC] = LAYOUT_default(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

+ 27
- 0
keyboards/mechwild/obe/keymaps/hsuchil/config.h View File

@ -0,0 +1,27 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#pragma once
// Redefine number of LED
#ifdef RGBLED_NUM
# undef RGBLED_NUM
#endif // DEBUG
#define RGBLED_NUM 10
#define RGBLIGHT_LAYERS
#define RGBLIGHT_SLEEP

+ 52
- 0
keyboards/mechwild/obe/keymaps/hsuchil/keymap.c View File

@ -0,0 +1,52 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#include QMK_KEYBOARD_H
#include "hsuchil.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BSE] = LAYOUT(
KC_MUTE, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
KC_PGUP, 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, KC_BSLS,
KC_PGDN, RCT_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, L_BHGH, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, L_LOW, KC_SPC, KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_LOW] = LAYOUT(
_______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
KC_HOME, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______,
KC_END , KC_CAPS, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, TOG_MAC, _______, _______, _______, KC_PGUP, _______,
_______, _______, _______, KC_HYPR, _______, KC_MEH , _______, _______, KC_HOME, KC_PGDN, KC_END
),
[_HGH] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY
),
[_FNC] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

+ 2
- 0
keyboards/mechwild/obe/keymaps/hsuchil/rules.mk View File

@ -0,0 +1,2 @@
RGBLIGHT_ENABLE = yes
VIA_ENABLE = yes

+ 24
- 0
keyboards/moonlander/keymaps/hsuchil/config.h View File

@ -0,0 +1,24 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#pragma once
#define ORYX_CONFIGURATOR
#define USB_SUSPEND_WAKEUP_DELAY 0
#define NO_AUTO_SHIFT_TAB
#define RGB_MATRIX_STARTUP_SPD 60

+ 57
- 0
keyboards/moonlander/keymaps/hsuchil/keymap.c View File

@ -0,0 +1,57 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#include QMK_KEYBOARD_H
#include "hsuchil.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BSE] = LAYOUT_moonlander(
KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL ,KC_BSPC ,
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_HOME ,KC_PGUP ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_DEL ,
RCT_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_END ,KC_PGDN ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ENT ,
KC_LCTL ,KC_HYPR ,KC_LALT ,KC_LGUI ,L_LOW ,L_LWESC ,LCT_ESC ,L_HGH ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,
KC_SPC ,KC_LGUI ,KC_RCTL ,KC_MEH ,KC_BSPC ,KC_ENT
),
[_LOW] = LAYOUT_moonlander(
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_LCBR ,KC_RCBR ,KC_QUES ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_UNDS ,KC_PLUS ,KC_LCBR ,KC_RCBR ,KC_PIPE ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_HOME ,KC_PGDN ,KC_PGUP ,KC_END ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______
),
[_HGH] = LAYOUT_moonlander(
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_LBRC ,KC_RBRC ,KC_SLSH ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_MINS ,KC_EQL ,KC_LBRC ,KC_RBRC ,KC_BSLS ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_MNXT ,KC_VOLD ,KC_VOLU ,KC_MPLY ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______
),
[_FNC] = LAYOUT_moonlander(
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ ,
_______ ,RESET ,DEBUG ,_______ ,_______ ,RCG_NRM ,_______ ,_______ ,RCG_SWP ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,RGB_SPD ,RGB_SPI ,_______ ,_______ ,AG_NORM ,_______ ,_______ ,AG_SWAP ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,RGB_TOG ,RGB_MOD ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
_______ ,_______ ,_______ ,_______ ,_______ ,_______
)
};

+ 1
- 0
keyboards/moonlander/keymaps/hsuchil/rules.mk View File

@ -0,0 +1 @@
AUDIO_ENABLE = yes

+ 25
- 0
keyboards/preonic/keymaps/hsuchil/config.h View File

@ -0,0 +1,25 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#pragma once
#undef RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGB_SLEEP
#define RGBLIGHT_SLEEP
#define RGBLIGHT_TIMEOUT 60000

+ 56
- 0
keyboards/preonic/keymaps/hsuchil/keymap.c View File

@ -0,0 +1,56 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#include QMK_KEYBOARD_H
#include "hsuchil.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BSE] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
RCT_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, L_LOW, KC_SPC, KC_SPC, L_HGH, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[_LOW] = LAYOUT_preonic_grid(
KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_QUES, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
[_HGH] = LAYOUT_preonic_grid(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SLSH, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
[_FNC] = LAYOUT_preonic_grid(
KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______ , RESET , DEBUG , _______, _______, RCG_NRM, RCG_SWP, _______, _______, _______, _______, _______,
_______ , RGB_SPD, RGB_SPI, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
_______ , RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

+ 4
- 0
keyboards/preonic/keymaps/hsuchil/rules.mk View File

@ -0,0 +1,4 @@
# Copyright 2022 Hector Galindo <hi@hsuchil.com>
RGBLIGHT_SLEEP = yes
RGBLIGHT_DEFAULT_MODE = RGBLIGHT_MODE_RAINBOW_SWIRL

+ 20
- 0
users/hsuchil/config.h View File

@ -0,0 +1,20 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#pragma once
#define TAPPING_TERM 200

+ 127
- 0
users/hsuchil/hsuchil.c View File

@ -0,0 +1,127 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#include QMK_KEYBOARD_H
#include "hsuchil.h"
#ifndef HSUCHIL_DISABLE_TRILAYER
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOW, _HGH, _FNC);
}
#endif
__attribute__((weak)) bool extra_process_record_user(uint16_t keycode, keyrecord_t * record) {
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case TOG_MAC:
if (keymap_config.swap_rctl_rgui) {
process_magic(RCG_NRM, record);
} else {
process_magic(RCG_SWP, record);
}
if (keymap_config.swap_lalt_lgui) {
process_magic(LAG_NRM, record);
} else {
process_magic(LAG_SWP, record);
}
return false;
default:
return extra_process_record_user(keycode, record);
break;
}
return true;
}
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
} else {
tap_code(KC_VOLU);
}
}
return true;
}
#endif
#ifdef RGBLIGHT_TIMEOUT
// Timer to track the last keyboard activity
static uint16_t key_timer;
// Refreshes the activity timer and RGB, invoke whenever activity happens
static void refresh_rgb(void);
// Checks if enough time has passed for RGB to timeout
static void check_rgb_timeout(void);
// Store if RGB has timed out or not in a boolean
bool is_rgb_timeout = false;
void refresh_rgb() {
key_timer = timer_read();
if (is_rgb_timeout) {
is_rgb_timeout = false;
rgblight_wakeup();
}
}
void check_rgb_timeout() {
if (!is_rgb_timeout && timer_elapsed(key_timer) > RGBLIGHT_TIMEOUT) {
rgblight_suspend();
is_rgb_timeout = true;
}
}
#endif
__attribute__((weak)) void extra_housekeeping_task_user(void) {}
void housekeeping_task_user(void) {
#ifdef RGBLIGHT_TIMEOUT
check_rgb_timeout();
#endif
extra_housekeeping_task_user();
}
__attribute__((weak)) void extra_post_process_record_user(uint16_t keycode, keyrecord_t *record) {}
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_TIMEOUT
if (record->event.pressed) {
refresh_rgb();
}
#endif
extra_post_process_record_user(keycode, record);
}
__attribute__((weak)) void extra_post_encoder_update_user(uint8_t index, bool clockwise) {}
void post_encoder_update_user(uint8_t index, bool clockwise) {
#ifdef RGBLIGHT_TIMEOUT
refresh_rgb();
#endif
extra_post_encoder_update_user(index, clockwise);
}

+ 45
- 0
users/hsuchil/hsuchil.h View File

@ -0,0 +1,45 @@
/*
Copyright 2022 Hector Galindo <hi@hsuchil.com>
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/>.
*/
#pragma once
enum custom_user_layers {
_BSE,
_LOW,
_HGH,
_FNC,
NEW_SAFE_LAYER_RANGE,
};
enum custom_user_keycodes {
OLD_SAFE_RANGE = SAFE_RANGE,
TOG_MAC, // Swaps LGUI<->LALT and LGUI<->RCTL
NEW_SAFE_RANGE // Set a new safe range for keymap-specific custom keycodes
};
#define L_LOW MO(_LOW)
#define L_HGH MO(_HGH)
#define L_FNC MO(_FNC)
#define L_BLOW LT(_LOW, KC_B) // B if tapped, LOW if held.
#define L_BHGH LT(_HGH, KC_B) // B if tapped, HGH if held.
#define L_BFNC LT(_FNC, KC_B) // B if tapped, FNC if held.
#define L_LWESC LT(_LOW, KC_ESC) // ESC if tapped, LOW if held.
#define LCT_ESC LCTL_T(KC_ESC) // ESC if tapped, LCTL if held.
#define RCT_ESC RCTL_T(KC_ESC) // ESC if tapped, RCTL if held.

+ 1
- 0
users/hsuchil/rules.mk View File

@ -0,0 +1 @@
SRC += hsuchil.c

Loading…
Cancel
Save