Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
194bc7a7e1 | |||
fec4283022 | |||
17af712b7c | |||
712ded1f2f | |||
c67e304593 | |||
8c80475fcc | |||
3e18bb914c | |||
4434649c2f | |||
c6c94eeabc | |||
2c201ab9ad | |||
e5b10079cf | |||
854d46f833 |
@ -68,7 +68,7 @@ You will need to install Git and Python. It's very likely that you already have
|
||||
|
||||
* Debian / Ubuntu / Devuan: `apt-get install git python3 && python3 -m pip install qmk`
|
||||
* Fedora / Red Hat / CentOS: `yum install git python3 && python3 -m pip install qmk`
|
||||
* Arch: `pacman -S qmk`
|
||||
* Arch: `yay -S qmk` (or use any other AUR Helper)
|
||||
|
||||
## 3. Run QMK Setup :id=set-up-qmk
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "drashna.h"
|
||||
#include "analog.c"
|
||||
#include "analog.h"
|
||||
#include "pointing_device.h"
|
||||
#include "pincontrol.h"
|
||||
|
||||
@ -17,8 +17,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Joystick
|
||||
// Set Pins
|
||||
uint8_t xPin = 8; // VRx / /B4
|
||||
uint8_t yPin = 7; // VRy // B5
|
||||
// uint8_t xPin = 8; // VRx / /B4
|
||||
// uint8_t yPin = 7; // VRy // B5
|
||||
uint8_t swPin = E6; // SW
|
||||
|
||||
// Set Parameters
|
||||
@ -43,7 +43,7 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) {
|
||||
int16_t distanceFromOrigin;
|
||||
int16_t range;
|
||||
|
||||
int16_t position = analogRead(pin);
|
||||
int16_t position = analogReadPin(pin);
|
||||
|
||||
if (origin == position) {
|
||||
return 0;
|
||||
@ -88,11 +88,11 @@ void pointing_device_task(void) {
|
||||
// todo read as one vector
|
||||
if (timer_elapsed(lastCursor) > cursorTimeout) {
|
||||
lastCursor = timer_read();
|
||||
report.x = axisToMouseComponent(xPin, xOrigin, maxCursorSpeed, xPolarity);
|
||||
report.y = axisToMouseComponent(yPin, yOrigin, maxCursorSpeed, yPolarity);
|
||||
report.x = axisToMouseComponent(B4, xOrigin, maxCursorSpeed, xPolarity);
|
||||
report.y = axisToMouseComponent(B5, yOrigin, maxCursorSpeed, yPolarity);
|
||||
}
|
||||
//
|
||||
if (!readPin(swPin)) {
|
||||
if (!readPin(E6)) {
|
||||
report.buttons |= MOUSE_BTN1;
|
||||
} else {
|
||||
report.buttons &= ~MOUSE_BTN1;
|
||||
@ -104,8 +104,8 @@ void pointing_device_task(void) {
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
// init pin? Is needed?
|
||||
setPinInputHigh(swPin);
|
||||
setPinInputHigh(E6);
|
||||
// Account for drift
|
||||
xOrigin = analogRead(xPin);
|
||||
yOrigin = analogRead(yPin);
|
||||
xOrigin = analogReadPin(B4);
|
||||
yOrigin = analogReadPin(B5);
|
||||
}
|
||||
|
@ -3,3 +3,5 @@ RGBLIGHT_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
SRC += analog.c
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = lite
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
34
keyboards/bear_face/bear_face.c
Normal file
34
keyboards/bear_face/bear_face.c
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2020 chemicalwill <https://github.com/chemicalwill>
|
||||
|
||||
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 "bear_face.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
//Sets LED pin as output
|
||||
setPinOutput(F7);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
// Caps Lock LED indicator toggling code here
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
writePin(F7, led_state.caps_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
36
keyboards/bear_face/bear_face.h
Normal file
36
keyboards/bear_face/bear_face.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
Copyright 2020 chemicalwill <https://github.com/chemicalwill>
|
||||
|
||||
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_83_ansi( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K413, K414, \
|
||||
K500, K501, K502, K505, K509, K510, K511, K512, K513, K514 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, K412, K413, K414 }, \
|
||||
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514 } \
|
||||
}
|
175
keyboards/bear_face/config.h
Normal file
175
keyboards/bear_face/config.h
Normal file
@ -0,0 +1,175 @@
|
||||
/*
|
||||
Copyright 2020 chemicalwill <https://github.com/chemicalwill>
|
||||
|
||||
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"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x09f5
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER chemicalwill
|
||||
#define PRODUCT bear_face
|
||||
#define DESCRIPTION Vortex Race 3 programmable PCB replacement
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { F5, F6, F4, F1, B0, B6 }
|
||||
#define MATRIX_COL_PINS { B5, C7, C6, F0, E6, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN F7
|
||||
//#define BACKLIGHT_BREATHING
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// #endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 6
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
12
keyboards/bear_face/info.json
Normal file
12
keyboards/bear_face/info.json
Normal file
File diff suppressed because one or more lines are too long
117
keyboards/bear_face/keymaps/default/keymap.c
Normal file
117
keyboards/bear_face/keymaps/default/keymap.c
Normal file
@ -0,0 +1,117 @@
|
||||
/*
|
||||
Copyright 2020 chemicalwill <https://github.com/chemicalwill>
|
||||
|
||||
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
|
||||
|
||||
enum layers {
|
||||
_QWER,
|
||||
_COLE,
|
||||
_DVOR,
|
||||
_FN1,
|
||||
};
|
||||
|
||||
#define FN1_CAPS LT(_FN1, KC_CAPS)
|
||||
|
||||
//custom keycode enums
|
||||
enum custom_keycodes {
|
||||
BASE_QWER = SAFE_RANGE,
|
||||
BASE_COLE,
|
||||
BASE_DVOR
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWER] = LAYOUT_83_ansi(
|
||||
KC_ESC, 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_NO, KC_DEL,
|
||||
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_HOME,
|
||||
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_PGUP,
|
||||
FN1_CAPS, 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_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_COLE] = LAYOUT_83_ansi(
|
||||
KC_ESC, 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_NO, KC_DEL,
|
||||
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_HOME,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_DVOR] = LAYOUT_83_ansi(
|
||||
KC_ESC, 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_NO, KC_DEL,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP,
|
||||
FN1_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_FN1] = LAYOUT_83_ansi(
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_INS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER,
|
||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, RESET, _______, _______, _______, _______, BASE_COLE,
|
||||
_______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR,
|
||||
_______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/*
|
||||
[_BLANK] = LAYOUT_83_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
//macros to allow the user to set whatever default layer they want, even after reboot
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE_QWER:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_QWER is pressed
|
||||
set_single_persistent_default_layer(_QWER);
|
||||
} else {
|
||||
// when keycode BASE_QWER is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_COLE:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_COLE is pressed
|
||||
set_single_persistent_default_layer(_COLE);
|
||||
} else {
|
||||
// when keycode BASE_COLE is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_DVOR:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_DVOR is pressed
|
||||
set_single_persistent_default_layer(_DVOR);
|
||||
} else {
|
||||
// when keycode BASE_DVOR is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
14
keyboards/bear_face/keymaps/default/readme.md
Normal file
14
keyboards/bear_face/keymaps/default/readme.md
Normal file
@ -0,0 +1,14 @@
|
||||
# default bear_face layout
|
||||
|
||||
This layout replaces the stock layout on the Vortex Race 3.
|
||||
|
||||
- Caps Lock indicator LED is enabled by default
|
||||
- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1)
|
||||
- FORCE_NKRO enabled by default
|
||||
- Pn key is set to 'KC_NO' by default
|
||||
* might be a good place for a macro, or to put your PC to sleep, etc.
|
||||
- a combined function layer that mimics the sublegends on the stock caps (regardless of layout)
|
||||
* 'Reset' will put the keyboard into DFU mode
|
||||
* 'APP' sends 'KC_APP'
|
||||
* set base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot)
|
||||
|
15
keyboards/bear_face/readme.md
Normal file
15
keyboards/bear_face/readme.md
Normal file
@ -0,0 +1,15 @@
|
||||
# bear_face
|
||||
|
||||

|
||||
|
||||
Vortex Race 3 with replacement QMK-compatible PCB designed by [chemicalwill](https://github.com/chemicalwill)
|
||||
|
||||
* Keyboard Maintainer: [Will Hedges](https://github.com/chemicalwill)
|
||||
* Hardware Supported: bear_face v1.0, atmega32u4
|
||||
* Hardware Availability: [PCB files](https://github.com/chemicalwill/bear_face)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make bear_face: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).
|
31
keyboards/bear_face/rules.mk
Normal file
31
keyboards/bear_face/rules.mk
Normal file
@ -0,0 +1,31 @@
|
||||
# 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
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
@ -6,34 +6,6 @@ extern uint8_t is_master;
|
||||
// Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
# define KEYLOGGER_LENGTH 5
|
||||
static uint32_t oled_timer = 0;
|
||||
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
|
||||
static uint16_t log_timer = 0;
|
||||
// clang-format off
|
||||
static const char PROGMEM code_to_name[0xFF] = {
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
|
||||
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
|
||||
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
|
||||
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
|
||||
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
|
||||
};
|
||||
|
||||
void add_keylog(uint16_t keycode);
|
||||
#endif
|
||||
|
||||
enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
|
||||
|
||||
@ -139,10 +111,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_timer = timer_read32();
|
||||
add_keylog(keycode);
|
||||
#endif
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
if (keycode == RESET && !is_master) {
|
||||
return false;
|
||||
@ -154,151 +122,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
} else if (keycode > 0xFF) {
|
||||
keycode = 0;
|
||||
}
|
||||
|
||||
for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
|
||||
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
|
||||
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
// add_keylog(0);
|
||||
}
|
||||
}
|
||||
|
||||
void render_keylogger_status(void) {
|
||||
oled_write_P(PSTR("KLogr"), false);
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
void render_default_layer_state(void) {
|
||||
oled_write_P(PSTR("Lyout"), false);
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR(" QRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR(" COLE"), false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR(" DVRK"), false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write_P(PSTR(" WKMN"), false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write_P(PSTR(" NORM"), false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write_P(PSTR(" MLTN"), false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write_P(PSTR(" ECLN"), false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write_P(PSTR(" CRPX"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void render_layer_state(void) {
|
||||
oled_write_P(PSTR("LAYER"), false);
|
||||
oled_write_P(PSTR("Lower"), layer_state_is(_LOWER));
|
||||
oled_write_P(PSTR("Raise"), layer_state_is(_RAISE));
|
||||
oled_write_P(PSTR(" Mods"), layer_state_is(_MODS));
|
||||
}
|
||||
|
||||
void render_keylock_status(uint8_t led_usb_state) {
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK));
|
||||
oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
|
||||
oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
|
||||
}
|
||||
|
||||
void render_mod_status(uint8_t modifiers) {
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL));
|
||||
oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT));
|
||||
oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI));
|
||||
}
|
||||
|
||||
void render_bootmagic_status(void) {
|
||||
/* Show Ctrl-Gui Swap options */
|
||||
static const char PROGMEM logo[][2][3] = {
|
||||
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
};
|
||||
oled_write_P(PSTR("BTMGK"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(PSTR(" NKRO"), keymap_config.nkro);
|
||||
}
|
||||
|
||||
void render_user_status(void) {
|
||||
oled_write_P(PSTR("USER:"), false);
|
||||
oled_write_P(PSTR(" Anim"), userspace_config.rgb_matrix_idle_anim);
|
||||
oled_write_P(PSTR(" Layr"), userspace_config.rgb_layer_change);
|
||||
oled_write_P(PSTR(" Nuke"), userspace_config.nuke_switch);
|
||||
}
|
||||
|
||||
void render_status_main(void) {
|
||||
/* Show Keyboard Layout */
|
||||
render_default_layer_state();
|
||||
render_keylock_status(host_keyboard_leds());
|
||||
render_bootmagic_status();
|
||||
render_user_status();
|
||||
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
void render_status_secondary(void) {
|
||||
/* Show Keyboard Layout */
|
||||
render_default_layer_state();
|
||||
render_layer_state();
|
||||
render_mod_status(get_mods() | get_oneshot_mods());
|
||||
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (timer_elapsed32(oled_timer) > 30000) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
# ifndef SPLIT_KEYBOARD
|
||||
else {
|
||||
oled_on();
|
||||
}
|
||||
# endif
|
||||
|
||||
update_log();
|
||||
if (is_master) {
|
||||
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_status_secondary();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
@ -17,7 +17,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = full
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show.
|
||||
|
51
keyboards/keebio/quefrency/keymaps/via/keymap.c
Normal file
51
keyboards/keebio/quefrency/keymaps/via/keymap.c
Normal file
@ -0,0 +1,51 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_all(
|
||||
KC_F1, KC_F2, KC_GESC, 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_DEL, KC_BSPC, KC_HOME,
|
||||
KC_F3, KC_F4, 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_END,
|
||||
KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP,
|
||||
KC_F7, KC_F8, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||
KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
_______, _______, KC_GESC, 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_BSPC, _______,
|
||||
_______, _______, RGB_TOG, RGB_MOD, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[2] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[3] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
3
keyboards/keebio/quefrency/keymaps/via/rules.mk
Normal file
3
keyboards/keebio/quefrency/keymaps/via/rules.mk
Normal file
@ -0,0 +1,3 @@
|
||||
VIA_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define PRODUCT_ID 0x1257
|
||||
#define DEVICE_VER 0x0100
|
||||
#define MANUFACTURER Keebio
|
||||
#define PRODUCT Quefrency
|
||||
#define PRODUCT Quefrency Rev. 1
|
||||
#define DESCRIPTION Split 60/65 percent staggered keyboard
|
||||
|
||||
/* key matrix size */
|
||||
|
@ -79,7 +79,6 @@
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
|
||||
#define LAYOUT_65_with_macro( \
|
||||
LA9, LA8, LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \
|
||||
LB9, LB8, LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \
|
||||
@ -101,3 +100,25 @@
|
||||
{ RE1, RE2, RE9, RE4, RE5, RE6, RE7, RE8 }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RA9, RB9 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_all( \
|
||||
LA9, LA8, LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \
|
||||
LB9, LB8, LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \
|
||||
LC9, LC8, LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC7x,RC8, RC9, \
|
||||
LD9, LD8, LD1, LD2x,LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD6, RD7, RD8, RD9, \
|
||||
LE9, LE8, LE1, LE2, LE3, LE5, LE6x,LE7, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \
|
||||
) \
|
||||
{ \
|
||||
{ LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8 }, \
|
||||
{ LB1, LB2, LB3, LB4, LB5, LB6, LB9, LB8 }, \
|
||||
{ LC1, LC2, LC3, LC4, LC5, LC6, LC9, LC8 }, \
|
||||
{ LD1, LD9, LD3, LD4, LD5, LD6, LD7, LD8 }, \
|
||||
{ LE1, LE2, LE3, LA9, LE5, LE9, LE7, LE8 }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8 }, \
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8 }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, RC9, RC8 }, \
|
||||
{ RD1, RD2, RD3, RD4, RD9, RD6, RD7, RD8 }, \
|
||||
{ RE1, RE2, RE9, RE4, RE5, RE6, RE7, RE8 }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RA9, RB9 } \
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCB10
|
||||
#define PRODUCT_ID 0x1257
|
||||
#define PRODUCT_ID 0x2257
|
||||
#define DEVICE_VER 0x0200
|
||||
#define MANUFACTURER Keebio
|
||||
#define PRODUCT Quefrency
|
||||
#define PRODUCT Quefrency Rev. 2
|
||||
#define DESCRIPTION Split 60/65 percent staggered keyboard
|
||||
|
||||
/* key matrix size */
|
||||
@ -38,10 +38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7 }
|
||||
#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 }
|
||||
#define SPLIT_HAND_PIN F7
|
||||
#define ENCODERS_PAD_A { F6 }
|
||||
#define ENCODERS_PAD_B { F5 }
|
||||
#define ENCODERS_PAD_A_RIGHT { D4 }
|
||||
#define ENCODERS_PAD_B_RIGHT { D6 }
|
||||
#define ENCODERS_PAD_A { F5 }
|
||||
#define ENCODERS_PAD_B { F6 }
|
||||
#define ENCODERS_PAD_A_RIGHT { D6 }
|
||||
#define ENCODERS_PAD_B_RIGHT { D4 }
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
@ -16,7 +16,7 @@
|
||||
LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \
|
||||
LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \
|
||||
LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -28,7 +28,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, KC_NO }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, KC_NO }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO } \
|
||||
}
|
||||
|
||||
#define LAYOUT LAYOUT_60 // For backwards compatibility with Rev. 1
|
||||
@ -38,7 +38,7 @@
|
||||
LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \
|
||||
LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \
|
||||
LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -50,7 +50,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9 }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_with_macro( \
|
||||
@ -58,7 +58,7 @@
|
||||
LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \
|
||||
LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \
|
||||
LD1, LD2, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \
|
||||
) \
|
||||
{ \
|
||||
{ LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -70,7 +70,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, KC_NO }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, KC_NO }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO } \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_with_macro( \
|
||||
@ -78,7 +78,7 @@
|
||||
LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \
|
||||
LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \
|
||||
LD1, LD2, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \
|
||||
) \
|
||||
{ \
|
||||
{ LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -90,7 +90,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9 }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_iso( \
|
||||
@ -98,7 +98,7 @@
|
||||
LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, \
|
||||
LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, \
|
||||
LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -110,7 +110,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO } \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_iso( \
|
||||
@ -118,7 +118,7 @@
|
||||
LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \
|
||||
LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \
|
||||
LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \
|
||||
LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -130,7 +130,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_iso_with_macro( \
|
||||
@ -138,7 +138,7 @@
|
||||
LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, \
|
||||
LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, \
|
||||
LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \
|
||||
) \
|
||||
{ \
|
||||
{ LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -150,7 +150,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO } \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_iso_with_macro( \
|
||||
@ -158,7 +158,7 @@
|
||||
LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \
|
||||
LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \
|
||||
LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \
|
||||
) \
|
||||
{ \
|
||||
{ LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -170,7 +170,7 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_all( \
|
||||
@ -178,7 +178,7 @@
|
||||
LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \
|
||||
LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \
|
||||
LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \
|
||||
LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \
|
||||
) \
|
||||
{ \
|
||||
{ LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \
|
||||
@ -190,5 +190,5 @@
|
||||
{ RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \
|
||||
{ RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \
|
||||
{ RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \
|
||||
{ RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \
|
||||
{ RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 } \
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ BOOTLOADER = bootloadHID
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
|
@ -37,3 +37,5 @@
|
||||
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
|
||||
#define SPLIT_USB_DETECT
|
||||
#define SPLIT_USB_TIMEOUT 1000
|
||||
|
||||
#define KEYLOGGER_LENGTH 10
|
||||
|
@ -2,35 +2,6 @@
|
||||
|
||||
uint8_t is_master;
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
# define KEYLOGGER_LENGTH 10
|
||||
static uint32_t oled_timer = 0;
|
||||
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
|
||||
static uint16_t log_timer = 0;
|
||||
// clang-format off
|
||||
static const char PROGMEM code_to_name[0xFF] = {
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
|
||||
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
|
||||
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
|
||||
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
|
||||
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
|
||||
};
|
||||
|
||||
void add_keylog(uint16_t keycode);
|
||||
#endif
|
||||
|
||||
#ifndef UNICODE_ENABLE
|
||||
# define UC(x) KC_NO
|
||||
#endif
|
||||
@ -52,7 +23,7 @@ void add_keylog(uint16_t keycode);
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, MEH(KC_MINS), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, MEH(KC_MINS), TG(_DIABLO), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
|
||||
)
|
||||
/* Re-pass though to allow templates to be used */
|
||||
@ -107,12 +78,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
|
||||
_____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
|
||||
),
|
||||
|
||||
[_MODS] = LAYOUT_wrapper(
|
||||
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||
KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT,
|
||||
_______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______
|
||||
),
|
||||
[_DIABLO] = LAYOUT_wrapper(
|
||||
KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG(_DIABLO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_LOWER] = LAYOUT_wrapper(
|
||||
KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
|
||||
_______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
|
||||
@ -142,10 +120,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_timer = timer_read32();
|
||||
add_keylog(keycode);
|
||||
#endif
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
if (keycode == RESET && !is_master) {
|
||||
return false;
|
||||
@ -154,133 +128,16 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); }
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
} else if (keycode > 0xFF) {
|
||||
keycode = 0;
|
||||
}
|
||||
|
||||
for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
|
||||
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
|
||||
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
// add_keylog(0);
|
||||
}
|
||||
}
|
||||
|
||||
void render_keylogger_status(void) {
|
||||
oled_write_P(PSTR("Keylogger: "), false);
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
void render_default_layer_state(void) {
|
||||
oled_write_P(PSTR("Layout: "), false);
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
case _QWERTY: oled_write_ln_P(PSTR("Qwerty"), false); break;
|
||||
case _COLEMAK: oled_write_ln_P(PSTR("Colemak"), false); break;
|
||||
case _DVORAK: oled_write_ln_P(PSTR("Dvorak"), false); break;
|
||||
case _WORKMAN: oled_write_ln_P(PSTR("Workman"), false); break;
|
||||
case _NORMAN: oled_write_ln_P(PSTR("Norman"), false); break;
|
||||
case _MALTRON: oled_write_ln_P(PSTR("Maltron"), false); break;
|
||||
case _EUCALYN: oled_write_ln_P(PSTR("Eucalyn"), false); break;
|
||||
case _CARPLAX: oled_write_ln_P(PSTR("Carplax"), false); break;
|
||||
}
|
||||
}
|
||||
|
||||
void render_layer_state(void) {
|
||||
oled_write_ln_P(PSTR("Layer:"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("Lower"), layer_state_is(_LOWER));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("Raise"), layer_state_is(_RAISE));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_ln_P(PSTR("Mods"), layer_state_is(_MODS));
|
||||
}
|
||||
|
||||
void render_keylock_status(uint8_t led_usb_state) {
|
||||
oled_write_P(PSTR("Lock: "), false);
|
||||
oled_write_P(PSTR("NUML"), led_usb_state & (1 << USB_LED_NUM_LOCK));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_ln_P(PSTR("SCLK"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
|
||||
}
|
||||
|
||||
void render_mod_status(uint8_t modifiers) {
|
||||
oled_write_P(PSTR("Mods: "), false);
|
||||
oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI));
|
||||
}
|
||||
|
||||
void render_bootmagic_status(void) {
|
||||
/* Show Ctrl-Gui Swap options */
|
||||
static const char PROGMEM logo[][2][3] = {
|
||||
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
};
|
||||
oled_write_P(PSTR("Boot "), false);
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(logo[1][0], false);
|
||||
} else {
|
||||
oled_write_P(logo[0][0], false);
|
||||
}
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("NKRO"), keymap_config.nkro);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui);
|
||||
oled_write_P(PSTR("Magic "), false);
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(logo[1][1], false);
|
||||
} else {
|
||||
oled_write_P(logo[0][1], false);
|
||||
}
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_ln_P(PSTR("CAPS"), keymap_config.swap_control_capslock);
|
||||
}
|
||||
|
||||
void render_user_status(void) {
|
||||
oled_write_P(PSTR("USER: "), false);
|
||||
oled_write_P(PSTR("Anim"), userspace_config.rgb_matrix_idle_anim);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("Layr"), userspace_config.rgb_layer_change);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_ln_P(PSTR("Nuke"), userspace_config.nuke_switch);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
void render_logo(void) {
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
|
||||
|
||||
oled_write_P(qmk_logo, false);
|
||||
}
|
||||
|
||||
# ifndef SPLIT_TRANSPORT_MIRROR
|
||||
void render_kyria_logo(void) {
|
||||
void oled_driver_render_logo(void) {
|
||||
static const char PROGMEM kyria_logo[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@ -294,51 +151,6 @@ void render_kyria_logo(void) {
|
||||
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
|
||||
}
|
||||
# endif
|
||||
// clang-format on
|
||||
|
||||
void render_status_main(void) {
|
||||
/* Show Keyboard Layout */
|
||||
render_default_layer_state();
|
||||
render_keylock_status(host_keyboard_leds());
|
||||
render_bootmagic_status();
|
||||
render_user_status();
|
||||
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
void render_status_secondary(void) {
|
||||
/* Show Keyboard Layout */
|
||||
render_logo();
|
||||
render_default_layer_state();
|
||||
render_layer_state();
|
||||
render_mod_status(get_mods() | get_oneshot_mods());
|
||||
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (timer_elapsed32(oled_timer) > 30000) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
# ifndef SPLIT_KEYBOARD
|
||||
else {
|
||||
oled_on();
|
||||
}
|
||||
# endif
|
||||
|
||||
update_log();
|
||||
if (is_master) {
|
||||
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
# ifdef SPLIT_TRANSPORT_MIRROR
|
||||
render_status_secondary();
|
||||
# else
|
||||
render_kyria_logo();
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user