Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d03303ab74 | |||
ad5ead24c3 | |||
b2a6329376 |
18
.github/labeler.yml
vendored
18
.github/labeler.yml
vendored
@ -1,18 +0,0 @@
|
||||
core:
|
||||
- quantum/**/*
|
||||
- tmk_core/**/*
|
||||
- drivers/**/*
|
||||
- tests/**/*
|
||||
- util/**/*
|
||||
keymap:
|
||||
- users/**/*
|
||||
- layouts/**/*
|
||||
- keyboards/**/keymap/**/*
|
||||
cli:
|
||||
- bin/qmk
|
||||
- requirements.txt
|
||||
- lib/python/**/*
|
||||
python:
|
||||
- '**/*.py'
|
||||
documentation:
|
||||
- docs/**/*
|
11
.github/workflows/labeler.yml
vendored
11
.github/workflows/labeler.yml
vendored
@ -1,11 +0,0 @@
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v2
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
16
keyboards/handwired/chiron/chiron.c
Normal file
16
keyboards/handwired/chiron/chiron.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* Copyright 2019 Mike Hix
|
||||
*
|
||||
* 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 "chiron.h"
|
42
keyboards/handwired/chiron/chiron.h
Normal file
42
keyboards/handwired/chiron/chiron.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* Copyright 2019 Mike Hix
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
||||
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
|
||||
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
|
||||
) \
|
||||
{ \
|
||||
/* Left Half */ \
|
||||
{ L06, L05, L04, L03, L02, L01, L00 }, \
|
||||
{ L16, L15, L14, L13, L12, L11, L10 }, \
|
||||
{ L26, L25, L24, L23, L22, L21, L20 }, \
|
||||
{ L36, L35, L34, L33, L32, L31, L30 }, \
|
||||
{ L45, L44, L43, KC_NO, L42, L41, L40 }, \
|
||||
/* Right Half */ \
|
||||
{ R06, R05, R04, R03, R02, R01, R00 }, \
|
||||
{ R16, R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R26, R25, R24, R23, R22, R21, R20 }, \
|
||||
{ R36, R35, R34, R33, R32, R31, R30 }, \
|
||||
{ R45, R44, R43, KC_NO, R42, R41, R40 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_chiron LAYOUT
|
57
keyboards/handwired/chiron/config.h
Normal file
57
keyboards/handwired/chiron/config.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright 2019 Mike Hix
|
||||
|
||||
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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Mike Hix
|
||||
#define PRODUCT chiron
|
||||
#define DESCRIPTION A custom keyboard
|
||||
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
// Pro Micro Pins 4, 6, 7, 8, 9
|
||||
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
|
||||
// Pro Micro Pins A3, A2, A1, A0, 15, 14, 16
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
|
||||
#define UNUSED_PINS
|
||||
|
||||
// Pro Micro Pins RX1
|
||||
#define SPLIT_HAND_PIN D2
|
||||
|
||||
// Pro Micro Pins RX1
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLED_NUM 4
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
#define BACKLIGHT_LEVELS 7
|
||||
|
0
keyboards/handwired/chiron/info.json
Normal file
0
keyboards/handwired/chiron/info.json
Normal file
52
keyboards/handwired/chiron/keymaps/default/config.h
Normal file
52
keyboards/handwired/chiron/keymaps/default/config.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* Copyright 2019 Mike Hix
|
||||
*
|
||||
* 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 USE_SERIAL
|
||||
#define MASTER_RIGHT
|
||||
//#define MASTER_LEFT
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#define MOUSEKEY_DELAY 20
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 10
|
||||
#define MOUSEKEY_TIME_TO_MAX 30
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 2
|
||||
#define RGBLED_SPLIT {1, 1}
|
||||
|
||||
// Don't turn off lights when the host goes to sleep.
|
||||
#undef RGBLIGHT_SLEEP
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
// Selectively enable animations to save on code size.
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
64
keyboards/handwired/chiron/keymaps/default/keymap.c
Normal file
64
keyboards/handwired/chiron/keymaps/default/keymap.c
Normal file
@ -0,0 +1,64 @@
|
||||
/* Copyright 2019 Mike Hix
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_END, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, KC_DEL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
|
||||
KC_ESC, KC_A, KC_O, LT(1,KC_E), LT(2,KC_U), KC_I, LCTL_T(KC_ENT), RCTL_T(KC_ENT), KC_D, LT(3,KC_H), LT(4,KC_T), KC_N, KC_S, KC_MINS,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_PGUP, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
|
||||
KC_CAPS, KC_INS, KC_LCTL, /*, */KC_LALT, LGUI_T(KC_SPC), KC_HYPR, KC_HYPR, RGUI_T(KC_SPC), KC_RALT, /*, */KC_LBRC, KC_RBRC, KC_SLSH
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, XXXXXXX, XXXXXXX, RESET,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, EEP_RST,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, _______, KC_MUTE, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLD, XXXXXXX, KC_WH_D, XXXXXXX, KC_BTN3, KC_BTN4,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_UP, KC_PAUS, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[4] = LAYOUT(
|
||||
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, RGB_TOG, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
/*
|
||||
[] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
*/
|
||||
};
|
||||
|
1
keyboards/handwired/chiron/keymaps/default/readme.md
Normal file
1
keyboards/handwired/chiron/keymaps/default/readme.md
Normal file
@ -0,0 +1 @@
|
||||
# The default keymap for chiron
|
0
keyboards/handwired/chiron/keymaps/default/rules.mk
Normal file
0
keyboards/handwired/chiron/keymaps/default/rules.mk
Normal file
16
keyboards/handwired/chiron/readme.md
Normal file
16
keyboards/handwired/chiron/readme.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Chiron Keyboard
|
||||
|
||||

|
||||
|
||||
This is a custom keyboard meant to be easily and quickly 3D printable on
|
||||
most FFF/FDM printers. It's inspired by the [Viterbi](https://keeb.io/products/viterbi-keyboard-pcbs-5x7-70-split-ortholinear), [Iris](https://keeb.io/products/iris-keyboard-split-ergonomic-keyboard), and
|
||||
[Dactyl Manuform](https://github.com/adereth/dactyl-keyboard) keyboards.
|
||||
|
||||
Keyboard Maintainer: [Mike Hix](https://github.com/musl/)
|
||||
Case: [https://github.com/musl/chiron-keyboard](https://github.com/musl/chiron-keyboard)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/chiron:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
38
keyboards/handwired/chiron/rules.mk
Normal file
38
keyboards/handwired/chiron/rules.mk
Normal file
@ -0,0 +1,38 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
SPLIT_KEYBOARD = yes
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
AUDIO_ENABLE = no
|
||||
AUTOLOG_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
BLUETOOTH_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
DEBUG_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
FAUXCLICKY_ENABLE = no
|
||||
HD44780_ENABLE = no
|
||||
LEADER_ENABLE = no
|
||||
MIDI_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
NKRO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = no
|
||||
UCIS_ENABLE = no
|
||||
UNICODEMAP_ENABLE = no
|
||||
UNICODE_ENABLE = no
|
@ -15,16 +15,28 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define BLINK_DURATION 512
|
||||
#define CAPS_LED_PIN B1
|
||||
#define NUM_LED_PIN B2
|
||||
#define SCROLL_LED_PIN B3
|
||||
|
||||
uint8_t CAPS;
|
||||
uint16_t BLINK_TIMER = 0;
|
||||
uint8_t CAPS_LED_STATE = 0;
|
||||
|
||||
// Init togg_indicator so the compiler doesn't complain when I declare it last.
|
||||
static void togg_indicator(uint8_t *state, uint8_t pin);
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_DEL,
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC,
|
||||
LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2, KC_ENT),
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(3, KC_B), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL
|
||||
),
|
||||
|
||||
[1] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_DEL,
|
||||
KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
@ -39,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[3] = LAYOUT(
|
||||
KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
@ -47,33 +59,64 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// set CapsLock LED to output and low
|
||||
setPinOutput(B1);
|
||||
writePinLow(B1);
|
||||
setPinOutput(CAPS_LED_PIN);
|
||||
writePinLow(CAPS_LED_PIN);
|
||||
// set NumLock LED to output and low
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
setPinOutput(NUM_LED_PIN);
|
||||
writePinLow(NUM_LED_PIN);
|
||||
// set ScrollLock LED to output and low
|
||||
setPinOutput(B3);
|
||||
writePinLow(B3);
|
||||
setPinOutput(SCROLL_LED_PIN);
|
||||
writePinLow(SCROLL_LED_PIN);
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
if (CAPS == 1) {
|
||||
// Blink the first led when capslock is active
|
||||
if (BLINK_TIMER >= BLINK_DURATION) {
|
||||
togg_indicator(&CAPS_LED_STATE, CAPS_LED_PIN);
|
||||
BLINK_TIMER = 0;
|
||||
}
|
||||
BLINK_TIMER++;
|
||||
}
|
||||
}
|
||||
|
||||
//function for layer indicator LED
|
||||
uint32_t layer_state_set_user(uint32_t state)
|
||||
{
|
||||
if (state & (1<<1)) {
|
||||
writePinHigh(B1);
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
if (layer_state_cmp(state, 1)) {
|
||||
writePinHigh(CAPS_LED_PIN);
|
||||
} else {
|
||||
writePinLow(B1);
|
||||
writePinLow(CAPS_LED_PIN);
|
||||
}
|
||||
if (state & (1<<2)) {
|
||||
writePinHigh(B2);
|
||||
if (layer_state_cmp(state, 2)) {
|
||||
writePinHigh(NUM_LED_PIN);
|
||||
} else {
|
||||
writePinLow(B2);
|
||||
writePinLow(NUM_LED_PIN);
|
||||
}
|
||||
if (state & (1<<3)) {
|
||||
writePinHigh(B3);
|
||||
if (layer_state_cmp(state, 3)) {
|
||||
writePinHigh(SCROLL_LED_PIN);
|
||||
} else {
|
||||
writePinLow(B3);
|
||||
writePinLow(SCROLL_LED_PIN);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
CAPS = 1;
|
||||
}
|
||||
else {
|
||||
CAPS = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void togg_indicator(uint8_t *state, uint8_t pin) {
|
||||
// Toggles a pin based on the current state
|
||||
if (*state == 0){
|
||||
*state = 1;
|
||||
writePinHigh(pin);
|
||||
}
|
||||
else if (*state == 1){
|
||||
*state = 0;
|
||||
writePinLow(pin);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user