Compare commits
7 Commits
0.6.38
...
internal/l
Author | SHA1 | Date | |
---|---|---|---|
|
6652f5dbc4 | ||
|
682555faac | ||
|
6dc215cd67 | ||
|
5272218ac9 | ||
|
0592d23b74 | ||
|
b5e7589bf9 | ||
|
3d00f38586 |
@@ -43,7 +43,6 @@
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [RGB Matrix](feature_rgb_matrix.md)
|
||||
* [Space Cadet Shift](feature_space_cadet.md)
|
||||
* [Space Cadet Shift Enter](feature_space_shift_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
|
@@ -17,10 +17,8 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting.
|
||||
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
|
||||
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
|
||||
|
@@ -13,32 +13,34 @@
|
||||
|
||||
void i2c_init(void)
|
||||
{
|
||||
TWSR = 0; /* no prescaler */
|
||||
TWBR = (uint8_t)TWBR_val;
|
||||
//TWBR = 10;
|
||||
}
|
||||
|
||||
uint8_t i2c_start(uint8_t address)
|
||||
{
|
||||
// reset TWI control register
|
||||
TWCR = 0;
|
||||
// transmit START condition
|
||||
//TWCR = 0;
|
||||
// transmit START condition
|
||||
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
||||
// wait for end of transmission
|
||||
while( !(TWCR & (1<<TWINT)) );
|
||||
|
||||
|
||||
// check if the start condition was successfully transmitted
|
||||
if((TWSR & 0xF8) != TW_START){ return 1; }
|
||||
|
||||
if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return 1; }
|
||||
|
||||
// load slave address into data register
|
||||
TWDR = address;
|
||||
// start transmission of address
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
// wait for end of transmission
|
||||
while( !(TWCR & (1<<TWINT)) );
|
||||
|
||||
|
||||
// check if the device has acknowledged the READ / WRITE mode
|
||||
uint8_t twst = TW_STATUS & 0xF8;
|
||||
if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -50,17 +52,17 @@ uint8_t i2c_write(uint8_t data)
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
// wait for end of transmission
|
||||
while( !(TWCR & (1<<TWINT)) );
|
||||
|
||||
if( (TWSR & 0xF8) != TW_MT_DATA_ACK ){ return 1; }
|
||||
|
||||
|
||||
if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return 1; }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t i2c_read_ack(void)
|
||||
{
|
||||
|
||||
|
||||
// start TWI module and acknowledge data after reception
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
|
||||
// wait for end of transmission
|
||||
while( !(TWCR & (1<<TWINT)) );
|
||||
// return received data from TWDR
|
||||
@@ -69,7 +71,7 @@ uint8_t i2c_read_ack(void)
|
||||
|
||||
uint8_t i2c_read_nack(void)
|
||||
{
|
||||
|
||||
|
||||
// start receiving without acknowledging reception
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
// wait for end of transmission
|
||||
@@ -81,29 +83,29 @@ uint8_t i2c_read_nack(void)
|
||||
uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length)
|
||||
{
|
||||
if (i2c_start(address | I2C_WRITE)) return 1;
|
||||
|
||||
|
||||
for (uint16_t i = 0; i < length; i++)
|
||||
{
|
||||
if (i2c_write(data[i])) return 1;
|
||||
}
|
||||
|
||||
|
||||
i2c_stop();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length)
|
||||
{
|
||||
if (i2c_start(address | I2C_READ)) return 1;
|
||||
|
||||
|
||||
for (uint16_t i = 0; i < (length-1); i++)
|
||||
{
|
||||
data[i] = i2c_read_ack();
|
||||
}
|
||||
data[(length-1)] = i2c_read_nack();
|
||||
|
||||
|
||||
i2c_stop();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -146,4 +148,6 @@ void i2c_stop(void)
|
||||
{
|
||||
// transmit STOP condition
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
// wait until stop condition is executed and bus released
|
||||
while(TWCR & (1<<TWSTO));
|
||||
}
|
||||
|
@@ -84,7 +84,8 @@ void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
//Transmit data until succesful
|
||||
while(i2c_transmit(addr << 1, g_twi_transfer_buffer,2) != 0);
|
||||
//while(i2c_transmit(addr << 1, g_twi_transfer_buffer,2) != 0);
|
||||
i2c_transmit(addr << 1, g_twi_transfer_buffer,2);
|
||||
}
|
||||
|
||||
void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
||||
@@ -108,7 +109,9 @@ void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
||||
}
|
||||
|
||||
//Transmit buffer until succesful
|
||||
while(i2c_transmit(addr << 1, g_twi_transfer_buffer,17) != 0);
|
||||
//while(i2c_transmit(addr << 1, g_twi_transfer_buffer,17) != 0);
|
||||
i2c_transmit(addr << 1, g_twi_transfer_buffer,17);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -102,6 +102,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 500
|
||||
|
||||
// RGB backlight
|
||||
#define DRIVER_ADDR_1 0b1110100
|
||||
#define DRIVER_ADDR_2 0b1110111
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 24
|
||||
#define DRIVER_2_LED_TOTAL 24
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
#define RGB_MATRIX_SKIP_FRAMES 10
|
||||
|
||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
|
||||
|
@@ -1,6 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "i2cmaster.h"
|
||||
|
||||
|
||||
extern inline void ergodox_board_led_on(void);
|
||||
extern inline void ergodox_right_led_1_on(void);
|
||||
@@ -207,3 +205,130 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, C3_1, C2_1, C4_1}, // LED1 on right
|
||||
{0, C6_1, C5_1, C7_1}, // LED2
|
||||
{0, C4_2, C3_2, C5_2}, // LED3
|
||||
{0, C7_2, C6_2, C8_2}, // LED4
|
||||
{0, C2_3, C1_3, C3_3}, // LED5
|
||||
{0, C5_3, C4_3, C6_3}, // LED6
|
||||
{0, C8_3, C7_3, C9_3}, // LED7
|
||||
{0, C2_4, C1_4, C3_4}, // LED8
|
||||
{0, C6_4, C5_4, C7_4}, // LED9
|
||||
{0, C2_5, C1_5, C3_5}, // LED10
|
||||
{0, C7_5, C6_5, C8_5}, // LED11
|
||||
{0, C2_6, C1_6, C3_6}, // LED12
|
||||
{0, C5_6, C4_6, C6_6}, // LED13
|
||||
{0, C8_6, C7_6, C9_6}, // LED14
|
||||
{0, C2_7, C1_7, C3_7}, // LED15
|
||||
{0, C5_7, C4_7, C6_7}, // LED16
|
||||
{0, C2_8, C1_8, C3_8}, // LED17
|
||||
{0, C5_8, C4_8, C6_8}, // LED18
|
||||
|
||||
{0, C3_9, C2_9, C4_9}, // LED19
|
||||
{0, C6_9, C5_9, C7_9}, // LED20
|
||||
{0, C4_10, C3_10, C5_10}, // LED21
|
||||
{0, C7_10, C6_10, C8_10}, // LED22
|
||||
{0, C2_11, C1_11, C3_11}, // LED23
|
||||
{0, C5_11, C4_11, C6_11}, // LED24
|
||||
|
||||
{1, C3_1, C2_1, C4_1}, // LED1 on left
|
||||
{1, C6_1, C5_1, C7_1}, // LED2
|
||||
{1, C4_2, C3_2, C5_2}, // LED3
|
||||
{1, C7_2, C6_2, C8_2}, // LED4
|
||||
{1, C2_3, C1_3, C3_3}, // LED5
|
||||
{1, C5_3, C4_3, C6_3}, // LED6
|
||||
{1, C8_3, C7_3, C9_3}, // LED7
|
||||
{1, C2_4, C1_4, C3_4}, // LED8
|
||||
{1, C6_4, C5_4, C7_4}, // LED9
|
||||
{1, C2_5, C1_5, C3_5}, // LED10
|
||||
{1, C7_5, C6_5, C8_5}, // LED11
|
||||
{1, C2_6, C1_6, C3_6}, // LED12
|
||||
{1, C5_6, C4_6, C6_6}, // LED13
|
||||
{1, C8_6, C7_6, C9_6}, // LED14
|
||||
{1, C2_7, C1_7, C3_7}, // LED15
|
||||
{1, C5_7, C4_7, C6_7}, // LED16
|
||||
{1, C2_8, C1_8, C3_8}, // LED17
|
||||
{1, C5_8, C4_8, C6_8}, // LED18
|
||||
|
||||
{1, C3_9, C2_9, C4_9}, // LED19
|
||||
{1, C6_9, C5_9, C7_9}, // LED20
|
||||
{1, C4_10, C3_10, C5_10}, // LED21
|
||||
{1, C7_10, C6_10, C8_10}, // LED22
|
||||
{1, C2_11, C1_11, C3_11}, // LED23
|
||||
{1, C5_11, C4_11, C6_11} // LED24
|
||||
};
|
||||
|
||||
|
||||
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
/*{row | col << 4}
|
||||
| {x=0..224, y=0..64}
|
||||
| | modifier
|
||||
| | | */
|
||||
{{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right
|
||||
{{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2
|
||||
{{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3
|
||||
{{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4
|
||||
{{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5
|
||||
|
||||
{{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6
|
||||
{{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7
|
||||
{{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8
|
||||
{{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9
|
||||
{{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10
|
||||
|
||||
{{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11
|
||||
{{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12
|
||||
{{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13
|
||||
{{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14
|
||||
{{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15
|
||||
|
||||
{{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16
|
||||
{{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17
|
||||
{{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18
|
||||
{{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19
|
||||
{{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20
|
||||
|
||||
{{4|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 21
|
||||
{{4|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 22
|
||||
{{4|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 23
|
||||
{{4|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 24
|
||||
|
||||
{{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left
|
||||
{{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2
|
||||
{{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3
|
||||
{{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4
|
||||
{{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5
|
||||
|
||||
{{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6
|
||||
{{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7
|
||||
{{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8
|
||||
{{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9
|
||||
{{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10
|
||||
|
||||
{{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11
|
||||
{{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12
|
||||
{{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13
|
||||
{{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14
|
||||
{{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15
|
||||
|
||||
{{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16
|
||||
{{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17
|
||||
{{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18
|
||||
{{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19
|
||||
{{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20
|
||||
|
||||
{{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21
|
||||
{{4|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 22
|
||||
{{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23
|
||||
{{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24
|
||||
};
|
||||
#endif
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include "quantum.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "i2cmaster.h"
|
||||
#include "i2c_master.h"
|
||||
#include <util/delay.h>
|
||||
|
||||
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
|
||||
|
@@ -11,7 +11,10 @@ enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD
|
||||
RGB_SLD,
|
||||
RED,
|
||||
GRN,
|
||||
BLU
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
@@ -49,9 +52,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, RED,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, GRN,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),BLU,
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
@@ -168,6 +171,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case RED:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_set_color_all(255, 0, 0);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case GRN:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_set_color_all(0, 255, 0);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BLU:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_set_color_all(0, 0, 255);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
|
@@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "i2cmaster.h"
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
#include "timer.h"
|
||||
#endif
|
||||
@@ -297,7 +296,7 @@ static matrix_row_t read_cols(uint8_t row)
|
||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out;
|
||||
data = i2c_readNak();
|
||||
data = i2c_read_nack();
|
||||
data = ~data;
|
||||
out:
|
||||
i2c_stop();
|
||||
|
@@ -15,8 +15,8 @@
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# # project specific files
|
||||
SRC = twimaster.c \
|
||||
matrix.c
|
||||
SRC = matrix.c \
|
||||
i2c_master.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
@@ -82,6 +82,7 @@ UNICODE_ENABLE = yes # Unicode
|
||||
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||
SLEEP_LED_ENABLE = no
|
||||
API_SYSEX_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
|
||||
LAYOUTS = ergodox
|
||||
|
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 Yiancar
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0257
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Yiancar-Designs
|
||||
#define PRODUCT HS60
|
||||
#define DESCRIPTION GH60 compatible, tool free RGB keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/*
|
||||
* 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 { B0, B1, B2, B3, F7 }
|
||||
#define MATRIX_COL_PINS { F1, F4, F5, E6, F0, B7, D2, D3, D5, D4, D6, D7, B4, B5 }
|
||||
#define UNUSED_PINS { B6, C6, C7, F6 }
|
||||
|
||||
/* bootloader configuration */
|
||||
|
||||
#define QMK_ESC_OUTPUT B5 // usually COL
|
||||
#define QMK_ESC_INPUT B2 // usually ROW
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* 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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* Backlight options */
|
||||
|
||||
//This is experimental do not enable yet
|
||||
//#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||
|
||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||
#define RGB_MATRIX_SKIP_FRAMES 0
|
||||
|
||||
#define DRIVER_ADDR_1 0b1110100
|
||||
#define DRIVER_ADDR_2 0b1110101
|
||||
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 30
|
||||
#define DRIVER_2_LED_TOTAL 32
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
|
||||
#endif
|
@@ -1,338 +0,0 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 "hs60.h"
|
||||
#include "config.h"
|
||||
|
||||
// Please ignore this is for upcoming features
|
||||
/*#ifdef RAW_ENABLE
|
||||
|
||||
void raw_hid_receive( uint8_t *data, uint8_t length )
|
||||
{
|
||||
uint8_t command = data[0];
|
||||
switch ( command )
|
||||
{
|
||||
case id_protocol_version:
|
||||
{
|
||||
msg_protocol_version *msg = (msg_protocol_version*)&data[1];
|
||||
msg->version = PROTOCOL_VERSION;
|
||||
break;
|
||||
}
|
||||
#if USE_KEYMAPS_IN_EEPROM
|
||||
case id_keymap_keycode_load:
|
||||
{
|
||||
msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1];
|
||||
msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column );
|
||||
break;
|
||||
}
|
||||
case id_keymap_keycode_save:
|
||||
{
|
||||
msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1];
|
||||
keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode);
|
||||
break;
|
||||
}
|
||||
case id_keymap_default_save:
|
||||
{
|
||||
keymap_default_save();
|
||||
break;
|
||||
}
|
||||
#endif // USE_KEYMAPS_IN_EEPROM
|
||||
case id_backlight_config_set_values:
|
||||
{
|
||||
msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1];
|
||||
backlight_config_set_values(msg);
|
||||
backlight_config_save();
|
||||
break;
|
||||
}
|
||||
case id_backlight_config_set_alphas_mods:
|
||||
{
|
||||
msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1];
|
||||
backlight_config_set_alphas_mods( msg->alphas_mods );
|
||||
backlight_config_save();
|
||||
break;
|
||||
}
|
||||
case id_backlight_set_key_color:
|
||||
{
|
||||
msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1];
|
||||
backlight_set_key_color(msg->row, msg->column, msg->hsv);
|
||||
break;
|
||||
}
|
||||
case id_system_get_state:
|
||||
{
|
||||
msg_system_state *msg = (msg_system_state*)&data[1];
|
||||
msg->value = backlight_get_tick();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// Unhandled message.
|
||||
data[0] = id_unhandled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Return same buffer with values changed
|
||||
raw_hid_send( data, length );
|
||||
|
||||
}
|
||||
|
||||
#endif*/
|
||||
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, C1_1, C3_2, C4_2}, //A1
|
||||
{0, C1_2, C2_2, C4_3}, //A2
|
||||
{0, C1_3, C2_3, C3_3}, //A3
|
||||
{0, C1_4, C2_4, C3_4}, //A4
|
||||
{0, C1_5, C2_5, C3_5}, //A5
|
||||
{0, C1_6, C2_6, C3_6}, //A6
|
||||
{0, C1_7, C2_7, C3_7}, //A7
|
||||
{0, C1_8, C2_8, C3_8}, //A8
|
||||
{0, C9_1, C8_1, C7_1}, //A9
|
||||
{0, C9_2, C8_2, C7_2}, //A10
|
||||
{0, C9_3, C8_3, C7_3}, //A11
|
||||
{0, C9_4, C8_4, C7_4}, //A12
|
||||
{0, C9_5, C8_5, C7_5}, //A13
|
||||
{0, C9_6, C8_6, C7_6}, //A14
|
||||
{0, C9_7, C8_7, C6_6}, //A15
|
||||
{0, C9_8, C7_7, C6_7}, //A16
|
||||
|
||||
{0, C1_9, C3_10, C4_10}, //B1
|
||||
{0, C1_10, C2_10, C4_11}, //B2
|
||||
{0, C1_11, C2_11, C3_11}, //B3
|
||||
{0, C1_12, C2_12, C3_12}, //B4
|
||||
{0, C1_13, C2_13, C3_13}, //B5
|
||||
{0, C1_14, C2_14, C3_14}, //B6
|
||||
{0, C1_15, C2_15, C3_15}, //B7
|
||||
{0, C1_16, C2_16, C3_16}, //B8
|
||||
{0, C9_9, C8_9, C7_9}, //B9
|
||||
{0, C9_10, C8_10, C7_10}, //B10
|
||||
{0, C9_11, C8_11, C7_11}, //B11
|
||||
{0, C9_12, C8_12, C7_12}, //B12
|
||||
{0, C9_13, C8_13, C7_13}, //B13
|
||||
{0, C9_14, C8_14, C7_14}, //B14
|
||||
|
||||
{1, C1_1, C3_2, C4_2}, //C1
|
||||
{1, C1_2, C2_2, C4_3}, //C2
|
||||
{1, C1_3, C2_3, C3_3}, //C3
|
||||
{1, C1_4, C2_4, C3_4}, //C4
|
||||
{1, C1_5, C2_5, C3_5}, //C5
|
||||
{1, C1_6, C2_6, C3_6}, //C6
|
||||
{1, C1_7, C2_7, C3_7}, //C7
|
||||
{1, C1_8, C2_8, C3_8}, //C8
|
||||
{1, C9_1, C8_1, C7_1}, //C9
|
||||
{1, C9_2, C8_2, C7_2}, //C10
|
||||
{1, C9_3, C8_3, C7_3}, //C11
|
||||
{1, C9_4, C8_4, C7_4}, //C12
|
||||
{1, C9_5, C8_5, C7_5}, //C13
|
||||
{1, C9_6, C8_6, C7_6}, //C14
|
||||
{1, C9_7, C8_7, C6_6}, //C15
|
||||
{1, C9_8, C7_7, C6_7}, //C16
|
||||
|
||||
{1, C1_9, C3_10, C4_10}, //D1
|
||||
{1, C1_10, C2_10, C4_11}, //D2
|
||||
{1, C1_11, C2_11, C3_11}, //D3
|
||||
{1, C1_12, C2_12, C3_12}, //D4
|
||||
{1, C1_13, C2_13, C3_13}, //D5
|
||||
{1, C1_14, C2_14, C3_14}, //D6
|
||||
{1, C1_15, C2_15, C3_15}, //D7
|
||||
{1, C1_16, C2_16, C3_16}, //D8
|
||||
{1, C9_9, C8_9, C7_9}, //D9
|
||||
{1, C9_10, C8_10, C7_10}, //D10
|
||||
{1, C9_11, C8_11, C7_11}, //D11
|
||||
{1, C9_12, C8_12, C7_12}, //D12
|
||||
{1, C9_13, C8_13, C7_13}, //D13
|
||||
{1, C9_14, C8_14, C7_14}, //D14
|
||||
{1, C9_15, C8_15, C6_14}, //D15
|
||||
{1, C9_16, C7_15, C6_15} //D16
|
||||
};
|
||||
|
||||
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
//
|
||||
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
|
||||
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---,
|
||||
// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, A15, A14,
|
||||
// D3, D2, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10,
|
||||
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | modifier
|
||||
* | | | */
|
||||
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
|
||||
{{0|(12<<4)}, {204, 0}, 0},
|
||||
{{0|(11<<4)}, {187, 0}, 0},
|
||||
{{0|(10<<4)}, {170, 0}, 0},
|
||||
{{0|(9<<4)}, {153, 0}, 0},
|
||||
{{0|(8<<4)}, {136, 0}, 0},
|
||||
{{0|(7<<4)}, {119, 0}, 0},
|
||||
{{1|(7<<4)}, {119, 16}, 0},
|
||||
{{1|(8<<4)}, {136, 16}, 0},
|
||||
{{1|(9<<4)}, {153, 16}, 0},
|
||||
{{1|(10<<4)}, {170, 16}, 0},
|
||||
{{1|(11<<4)}, {187, 16}, 0},
|
||||
{{1|(12<<4)}, {204, 16}, 0},
|
||||
{{2|(13<<4)}, {224, 8}, 1},
|
||||
{{2|(12<<4)}, {204, 32}, 0},
|
||||
{{2|(11<<4)}, {187, 32}, 0},
|
||||
|
||||
{{3|(10<<4)}, {170, 48}, 0}, //B1-B14
|
||||
{{3|(9<<4)}, {153, 48}, 0},
|
||||
{{3|(8<<4)}, {136, 48}, 0},
|
||||
{{3|(7<<4)}, {119, 48}, 0},
|
||||
{{2|(7<<4)}, {119, 32}, 0},
|
||||
{{2|(8<<4)}, {136, 32}, 0},
|
||||
{{2|(9<<4)}, {153, 32}, 0},
|
||||
{{2|(10<<4)}, {170, 32}, 0},
|
||||
{{3|(11<<4)}, {187, 48}, 0},
|
||||
{{3|(13<<4)}, {214, 48}, 1},
|
||||
{{4|(13<<4)}, {224, 64}, 1},
|
||||
{{4|(12<<4)}, {204, 64}, 1},
|
||||
{{4|(11<<4)}, {187, 64}, 1},
|
||||
{{4|(10<<4)}, {170, 64}, 1},
|
||||
|
||||
{{0|(6<<4)}, {102, 0}, 0}, //C1-C16
|
||||
{{0|(5<<4)}, { 85, 0}, 0},
|
||||
{{0|(4<<4)}, { 68, 0}, 0},
|
||||
{{0|(3<<4)}, { 51, 0}, 0},
|
||||
{{0|(2<<4)}, { 34, 0}, 0},
|
||||
{{0|(1<<4)}, { 17, 0}, 0},
|
||||
{{0|(0<<4)}, { 0, 0}, 1},
|
||||
{{1|(0<<4)}, { 0, 16}, 1},
|
||||
{{1|(1<<4)}, { 17, 16}, 0},
|
||||
{{1|(2<<4)}, { 34, 16}, 0},
|
||||
{{1|(3<<4)}, { 51, 16}, 0},
|
||||
{{1|(4<<4)}, { 68, 16}, 0},
|
||||
{{1|(5<<4)}, { 85, 16}, 0},
|
||||
{{1|(6<<4)}, {102, 16}, 0},
|
||||
{{2|(6<<4)}, {102, 32}, 0},
|
||||
{{2|(5<<4)}, { 85, 32}, 0},
|
||||
|
||||
{{3|(2<<4)}, { 32, 48}, 0}, //D1-D16
|
||||
{{3|(1<<4)}, { 17, 48}, 0},
|
||||
{{3|(0<<4)}, { 0, 48}, 1},
|
||||
{{2|(0<<4)}, { 0, 32}, 1},
|
||||
{{2|(1<<4)}, { 17, 32}, 0},
|
||||
{{2|(2<<4)}, { 34, 32}, 0},
|
||||
{{2|(3<<4)}, { 51, 32}, 0},
|
||||
{{2|(4<<4)}, { 68, 32}, 0},
|
||||
{{3|(3<<4)}, { 51, 48}, 0},
|
||||
{{3|(4<<4)}, { 68, 48}, 0},
|
||||
{{3|(5<<4)}, { 85, 48}, 0},
|
||||
{{3|(6<<4)}, {102, 48}, 0},
|
||||
{{4|(3<<4)}, {102, 64}, 0},
|
||||
{{4|(2<<4)}, { 34, 68}, 1},
|
||||
{{4|(1<<4)}, { 17, 68}, 1},
|
||||
{{4|(0<<4)}, { 0, 68}, 1}
|
||||
};
|
||||
|
||||
void bootmagic_lite(void)
|
||||
{
|
||||
// The lite version of TMK's bootmagic made by Wilba.
|
||||
// 100% less potential for accidentally making the
|
||||
// keyboard do stupid things.
|
||||
|
||||
// We need multiple scans because debouncing can't be turned off.
|
||||
matrix_scan();
|
||||
wait_ms(DEBOUNCING_DELAY);
|
||||
matrix_scan();
|
||||
|
||||
// If the Esc and space bar are held down on power up,
|
||||
// reset the EEPROM valid state and jump to bootloader.
|
||||
// Assumes Esc is at [0,0] and spacebar is at [4,6].
|
||||
// This isn't very generalized, but we need something that doesn't
|
||||
// rely on user's keymaps in firmware or EEPROM.
|
||||
if ( ( matrix_get_row(0) & (1<<0) ) &&
|
||||
( matrix_get_row(4) & (1<<6) ) )
|
||||
{
|
||||
// Set the TMK/QMK EEPROM state as invalid.
|
||||
eeconfig_disable();
|
||||
//eeprom_set_valid(false);
|
||||
// Jump to bootloader.
|
||||
bootloader_jump();
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
bootmagic_lite();
|
||||
|
||||
// Please ignore this is for upcoming features
|
||||
// If the EEPROM has the magic, the data is good.
|
||||
// OK to load from EEPROM.
|
||||
/*if (eeprom_is_valid())
|
||||
{
|
||||
backlight_config_load();
|
||||
|
||||
// TODO: do something to "turn on" keymaps in EEPROM?
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the EEPROM has not been saved before, or is out of date,
|
||||
// save the default values to the EEPROM. Default values
|
||||
// come from construction of the zeal_backlight_config instance.
|
||||
backlight_config_save();
|
||||
|
||||
// Clear the LED colors stored in EEPROM
|
||||
for ( int row=0; row < MATRIX_ROWS; row++ )
|
||||
{
|
||||
HSV hsv;
|
||||
for ( int column=0; column < MATRIX_COLS; column++ )
|
||||
{
|
||||
hsv.h = rand() & 0xFF;
|
||||
hsv.s = rand() & 0x7F;
|
||||
hsv.v = 255;
|
||||
backlight_set_key_color( row, column, hsv );
|
||||
}
|
||||
}
|
||||
#ifdef USE_KEYMAPS_IN_EEPROM
|
||||
keymap_default_save();
|
||||
#endif
|
||||
// Save the magic number last, in case saving was interrupted
|
||||
eeprom_set_valid(true);
|
||||
}*/
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
//backlight_set_indicator_state(usb_led);
|
||||
}
|
||||
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#ifndef HS60_H
|
||||
#define HS60_H
|
||||
|
||||
#define XXX KC_NO
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
|
||||
#define LAYOUT_60_iso( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
|
||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \
|
||||
{ K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \
|
||||
}
|
||||
|
||||
#endif
|
@@ -1,46 +0,0 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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
|
||||
|
||||
//This is the ISO version of the PCB
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_iso( /* Base */
|
||||
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_BSPC,\
|
||||
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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL),
|
||||
|
||||
[1] = LAYOUT_60_iso( /* FN */
|
||||
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_DEL ,\
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS,\
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
//user initialization
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
//user matrix
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
The default keymap for ISO HS60
|
||||
===============================
|
||||
|
||||

|
||||
|
||||
Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster
|
@@ -1,16 +0,0 @@
|
||||
HS60
|
||||
====
|
||||
|
||||
[HS60](https://mechboards.co.uk/wp-content/uploads/2018/04/IMG_20180420_140353.jpg)
|
||||
|
||||
This is a standard fixed layout 60% PCB. It comes in two varians, ISO and ANSI and support full per-key RGB.
|
||||
|
||||
Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
|
||||
Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4
|
||||
Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make hs60:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
@@ -1,76 +0,0 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# project specific files
|
||||
#SRC =
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Boot Section
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
# Do not put the microcontroller into power saving mode
|
||||
# when we get USB suspend event. We want it to keep updating
|
||||
# backlight effects.
|
||||
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
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 = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
RGB_MATRIX_ENABLE = yes # Use RGB matrix
|
||||
|
||||
LAYOUTS = 60_iso # Define standard layouts
|
||||
|
||||
# Experimental features for zealcmd please do no enable
|
||||
#RAW_ENABLE = yes
|
||||
#USE_KEYMAPS_IN_EEPROM = yes
|
@@ -41,8 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
|
||||
#define RGBLIGHT_LIMIT_VAL 225
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
@@ -2,94 +2,79 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
extern userspace_config_t userspace_config;
|
||||
|
||||
uint8_t last_mod;
|
||||
uint8_t last_led;
|
||||
uint8_t last_osm;
|
||||
bool has_mods_changed = false;
|
||||
#endif
|
||||
|
||||
#define KC_ALAP ALT_T(KC_APP)
|
||||
#define KC_OSLG OSM(MOD_LGUI)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_wrapper(
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS,
|
||||
KC_CCCV, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
||||
KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_OSLG, _________________QWERTY_R3_________________, KC_MRSF,
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
||||
KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_LGUI, _________________QWERTY_R3_________________, KC_MRSF,
|
||||
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
),
|
||||
[_COLEMAK] = LAYOUT_wrapper(
|
||||
KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS,
|
||||
KC_CCCV, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
||||
KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_OSLG, _________________COLEMAK_R3________________, KC_MRSF,
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
||||
KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_LGUI, _________________COLEMAK_R3________________, KC_MRSF,
|
||||
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
),
|
||||
[_DVORAK] = LAYOUT_wrapper(
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS,
|
||||
KC_CCCV, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT,
|
||||
KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_OSLG, _________________DVORAK_R3_________________, KC_MRSF,
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT,
|
||||
KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_LGUI, _________________DVORAK_R3_________________, KC_MRSF,
|
||||
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
),
|
||||
[_WORKMAN] = LAYOUT_wrapper(
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS,
|
||||
KC_CCCV, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
||||
KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_OSLG, _________________WORKMAN_R3________________, KC_MRSF,
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
||||
KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_LGUI, _________________WORKMAN_R3________________, KC_MRSF,
|
||||
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
||||
),
|
||||
|
||||
[_MODS] = LAYOUT_wrapper(
|
||||
[_MODS] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
|
||||
[_LOWER] = LAYOUT_wrapper(
|
||||
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LPRN, KC_RPRN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
|
||||
_______, _______, KC_DEL, _______, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_wrapper(
|
||||
_______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_UNDS, KC_EQL , KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_END, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_wrapper(
|
||||
KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST,
|
||||
VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, EPRM,
|
||||
_______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______,
|
||||
TG(_MODS),RGB_SMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
[_ADJUST] = LAYOUT(
|
||||
KC_MAKE, KC_RST, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
|
||||
RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
|
||||
KC_RGB_T,RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
last_mod = get_mods();
|
||||
last_led = host_keyboard_leds();
|
||||
last_osm =get_oneshot_mods();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef INDICATOR_LIGHT
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
uint8_t modifiders = get_mods();
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
@@ -107,49 +92,41 @@ uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
rgblight_sethsv_at(120, 255, 255, 7);
|
||||
rgblight_sethsv_at(120, 255, 255, 8);
|
||||
}
|
||||
#endif
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_keymap (void) {
|
||||
static uint8_t current_mods;
|
||||
static uint8_t current_host_leds;
|
||||
static uint8_t current_oneshot_mods;
|
||||
static bool has_status_changed = true;
|
||||
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
uint8_t current_mod = get_mods();
|
||||
uint8_t current_led = host_keyboard_leds();
|
||||
uint8_t current_osm =get_oneshot_mods();
|
||||
|
||||
if (last_mod == current_mod) {
|
||||
last_mod = current_mod;
|
||||
has_mods_changed = true;
|
||||
}
|
||||
if (last_led == current_led) {
|
||||
last_led = current_led;
|
||||
has_mods_changed = true;
|
||||
}
|
||||
if (last_osm == current_osm) {
|
||||
last_osm = current_osm;
|
||||
has_mods_changed = true;
|
||||
if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) {
|
||||
has_status_changed = true;
|
||||
current_mods = get_mods();
|
||||
current_host_leds = host_keyboard_leds();
|
||||
current_oneshot_mods = get_oneshot_mods();
|
||||
}
|
||||
if (has_status_changed) {
|
||||
has_status_changed = false;
|
||||
|
||||
|
||||
if (userspace_config.rgb_layer_change && has_mods_changed && biton32(layer_state) == 0) {
|
||||
if (current_mod & MODS_SHIFT_MASK || current_led & (1<<USB_LED_CAPS_LOCK) || current_osm & MODS_SHIFT_MASK) {
|
||||
if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<<USB_LED_CAPS_LOCK) || current_oneshot_mods & MODS_SHIFT_MASK) {
|
||||
rgblight_sethsv_at(0, 255, 255, 5);
|
||||
rgblight_sethsv_at(0, 255, 255, 10);
|
||||
} else {
|
||||
rgblight_sethsv_default_helper(5);
|
||||
rgblight_sethsv_default_helper(10);
|
||||
}
|
||||
if (current_mod & MODS_CTRL_MASK || current_osm & MODS_CTRL_MASK) {
|
||||
if (current_mods & MODS_CTRL_MASK || current_oneshot_mods & MODS_CTRL_MASK) {
|
||||
rgblight_sethsv_at(51, 255, 255, 6);
|
||||
rgblight_sethsv_at(51, 255, 255, 9);
|
||||
} else {
|
||||
rgblight_sethsv_default_helper(6);
|
||||
rgblight_sethsv_default_helper(9);
|
||||
}
|
||||
if (current_mod & MODS_GUI_MASK || current_osm & MODS_GUI_MASK) {
|
||||
if (current_mods & MODS_GUI_MASK || current_oneshot_mods & MODS_GUI_MASK) {
|
||||
rgblight_sethsv_at(120, 255, 255, 7);
|
||||
rgblight_sethsv_at(120, 255, 255, 8);
|
||||
} else {
|
||||
@@ -158,6 +135,7 @@ void matrix_scan_keymap (void) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@@ -9,4 +9,3 @@ AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
SWAP_HANDS_ENABLE = yes
|
||||
INDICATOR_LIGHTS = yes
|
||||
|
@@ -22,14 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
extern userspace_config_t userspace_config;
|
||||
|
||||
uint8_t last_mod;
|
||||
uint8_t last_led;
|
||||
uint8_t last_osm;
|
||||
bool has_mods_changed = false;
|
||||
#endif
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
@@ -41,7 +33,6 @@ bool has_mods_changed = false;
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_wrapper(\
|
||||
@@ -74,35 +65,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_LOWER] = LAYOUT_wrapper(\
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
_______, _________________FUNC_LEFT_________________, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_wrapper(\
|
||||
KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC,
|
||||
_______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_wrapper(\
|
||||
KC_MAKE, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RESET,
|
||||
VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, EPRM,
|
||||
TG(_MODS),RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY
|
||||
KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
|
||||
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
last_mod = get_mods();
|
||||
last_led = host_keyboard_leds();
|
||||
last_osm =get_oneshot_mods();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
uint8_t modifiders = get_mods();
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
@@ -120,49 +103,41 @@ uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
rgblight_sethsv_at(120, 255, 255, 7);
|
||||
rgblight_sethsv_at(120, 255, 255, 8);
|
||||
}
|
||||
#endif
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_keymap (void) {
|
||||
static uint8_t current_mods;
|
||||
static uint8_t current_host_leds;
|
||||
static uint8_t current_oneshot_mods;
|
||||
static bool has_status_changed = true;
|
||||
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
uint8_t current_mod = get_mods();
|
||||
uint8_t current_led = host_keyboard_leds();
|
||||
uint8_t current_osm =get_oneshot_mods();
|
||||
|
||||
if (last_mod == current_mod) {
|
||||
last_mod = current_mod;
|
||||
has_mods_changed = true;
|
||||
}
|
||||
if (last_led == current_led) {
|
||||
last_led = current_led;
|
||||
has_mods_changed = true;
|
||||
}
|
||||
if (last_osm == current_osm) {
|
||||
last_osm = current_osm;
|
||||
has_mods_changed = true;
|
||||
if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) {
|
||||
has_status_changed = true;
|
||||
current_mods = get_mods();
|
||||
current_host_leds = host_keyboard_leds();
|
||||
current_oneshot_mods = get_oneshot_mods();
|
||||
}
|
||||
if (has_status_changed) {
|
||||
has_status_changed = false;
|
||||
|
||||
|
||||
if (userspace_config.rgb_layer_change && has_mods_changed && biton32(layer_state) == 0) {
|
||||
if (current_mod & MODS_SHIFT_MASK || current_led & (1<<USB_LED_CAPS_LOCK) || current_osm & MODS_SHIFT_MASK) {
|
||||
if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<<USB_LED_CAPS_LOCK) || current_oneshot_mods & MODS_SHIFT_MASK) {
|
||||
rgblight_sethsv_at(0, 255, 255, 5);
|
||||
rgblight_sethsv_at(0, 255, 255, 10);
|
||||
} else {
|
||||
rgblight_sethsv_default_helper(5);
|
||||
rgblight_sethsv_default_helper(10);
|
||||
}
|
||||
if (current_mod & MODS_CTRL_MASK || current_osm & MODS_CTRL_MASK) {
|
||||
if (current_mods & MODS_CTRL_MASK || current_oneshot_mods & MODS_CTRL_MASK) {
|
||||
rgblight_sethsv_at(51, 255, 255, 6);
|
||||
rgblight_sethsv_at(51, 255, 255, 9);
|
||||
} else {
|
||||
rgblight_sethsv_default_helper(6);
|
||||
rgblight_sethsv_default_helper(9);
|
||||
}
|
||||
if (current_mod & MODS_GUI_MASK || current_osm & MODS_GUI_MASK) {
|
||||
if (current_mods & MODS_GUI_MASK || current_oneshot_mods & MODS_GUI_MASK) {
|
||||
rgblight_sethsv_at(120, 255, 255, 7);
|
||||
rgblight_sethsv_at(120, 255, 255, 8);
|
||||
} else {
|
||||
@@ -171,7 +146,5 @@ void matrix_scan_keymap (void) {
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -7,4 +7,3 @@ TAP_DANCE_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
INDICATOR_LIGHTS = yes
|
||||
|
@@ -1,20 +1,11 @@
|
||||
{
|
||||
"keyboard_name": "Monkeebs Orthodox Rev.1",
|
||||
"maintainer": "qmk",
|
||||
"width": 17,
|
||||
"height": 17.24,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
|
||||
{"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0},
|
||||
|
||||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3},
|
||||
{"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1},
|
||||
|
||||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4},
|
||||
{"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}
|
||||
]
|
||||
"keyboard_name": "Monkeebs Orthodox Rev.1",
|
||||
"maintainer": "qmk",
|
||||
"width": 17,
|
||||
"height": 17.24,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"TAB", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "y":0}, {"label":"ESC", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,20 +1,11 @@
|
||||
{
|
||||
"keyboard_name": "Monkeebs Orthodox Rev.3",
|
||||
"maintainer": "qmk",
|
||||
"width": 17,
|
||||
"height": 17.24,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
|
||||
{"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0},
|
||||
|
||||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3},
|
||||
{"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1},
|
||||
|
||||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4},
|
||||
{"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}
|
||||
]
|
||||
"keyboard_name": "Monkeebs Orthodox Rev.3",
|
||||
"maintainer": "qmk",
|
||||
"width": 17,
|
||||
"height": 17.24,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"TAB", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "y":0}, {"label":"ESC", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,20 +1,11 @@
|
||||
{
|
||||
"keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)",
|
||||
"maintainer": "qmk",
|
||||
"width": 17,
|
||||
"height": 17.24,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
|
||||
{"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0},
|
||||
|
||||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3},
|
||||
{"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1},
|
||||
|
||||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4},
|
||||
{"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}
|
||||
]
|
||||
"keyboard_name": "Monkeebs Orthodox Rev.3",
|
||||
"maintainer": "qmk",
|
||||
"width": 17,
|
||||
"height": 17.24,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"TAB", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "y":0}, {"label":"ESC", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ extern keymap_config_t keymap_config;
|
||||
#define DIABLO TG(_DIABLO)
|
||||
#define GAMEPAD TG(_GAMEPAD)
|
||||
#define MEDIA TT(_MEDIA)
|
||||
#define COVECUBE TG(_COVECUBE)
|
||||
|
||||
|
||||
//enum more_custom_keycodes {
|
||||
@@ -27,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_NUMLOCK] = LAYOUT_ortho_5x7(
|
||||
LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS,
|
||||
MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST,
|
||||
MEDIA, KC_CALC, COVECUBE,KC_P7, KC_P8, KC_P9, KC_PAST,
|
||||
KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||
KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT
|
||||
@@ -57,6 +58,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT
|
||||
),
|
||||
|
||||
[_COVECUBE] = LAYOUT_ortho_5x7(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, COVECUBE, 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
|
||||
),
|
||||
|
||||
[_MEDIA] = LAYOUT_ortho_5x7(
|
||||
KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
|
||||
@@ -69,7 +77,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
DDRD &= ~(1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
|
@@ -57,11 +57,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
|
||||
// left hand // right hand
|
||||
KC_EQL, ________________NUMBER_LEFT________________, _______, _______, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_EQL, ________________NUMBER_LEFT________________, OSL(_MOUS), OSL(_MOUS), ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||
KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
|
||||
KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
||||
KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF,
|
||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV,
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
||||
),
|
||||
/* Keymap 0: COLEMAK layer
|
||||
@@ -89,11 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Otherwise, it needs KC_*
|
||||
[_COLEMAK] = LAYOUT_ergodox_pretty_wrapper(
|
||||
// left hand // right hand
|
||||
KC_EQL, 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_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
|
||||
KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
||||
KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF,
|
||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV,
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
||||
),
|
||||
/* Keymap 0: DVORAK Layout
|
||||
@@ -121,11 +121,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Otherwise, it needs KC_*
|
||||
[_DVORAK] = LAYOUT_ergodox_pretty_wrapper(
|
||||
// left hand // right hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
|
||||
KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS,
|
||||
KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF,
|
||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV,
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
||||
),
|
||||
/* Keymap 0: WORKMAN layer
|
||||
@@ -153,16 +153,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Otherwise, it needs KC_*
|
||||
[_WORKMAN] = LAYOUT_ergodox_pretty_wrapper(
|
||||
// left hand
|
||||
KC_EQL, 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_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
|
||||
KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
||||
KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF,
|
||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV,
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
||||
),
|
||||
|
||||
// Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES)
|
||||
[_MODS] = LAYOUT_ergodox_pretty_wrapper(
|
||||
[_MODS] = LAYOUT_ergodox_pretty(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
@@ -173,6 +173,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Keymap 3: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | RESET | ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | VRSN | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | RGBM | RED | | OFF | SOLID|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | GREEN| | | | |
|
||||
* | RGB | RGB |------| |------| NUM0 | NUME |
|
||||
* | DARK |BRITE | BLUE | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_SYMB] = LAYOUT_ergodox_pretty(
|
||||
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_QWERTY, KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_RST, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_COLEMAK, KC_WORKMAN, KC_PPLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, KC_F12,
|
||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, KC_PMNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, KC_PSCREEN,
|
||||
VRSN, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_DVORAK, TG(_MODS), KC_NLCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, KC_PAUSE,
|
||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCLN, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, KC_TRNS,
|
||||
RGB_SMOD, KC_RGB_T, KC_TRNS, KC_TRNS,
|
||||
RGB_HUI, KC_TRNS,
|
||||
RGB_M_R, RGB_M_SW, RGB_HUD, KC_PDOT, KC_KP_0, KC_PENT
|
||||
),
|
||||
|
||||
/* Keymap 4: Customized Overwatch Layout
|
||||
*
|
||||
@@ -195,7 +226,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | H | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_GAMEPAD] = LAYOUT_ergodox_pretty_wrapper(
|
||||
[_GAMEPAD] = LAYOUT_ergodox_pretty(
|
||||
KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
@@ -227,7 +258,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | SHIFT| ALT | 0MAC | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_DIABLO] = LAYOUT_ergodox_pretty_wrapper(
|
||||
[_DIABLO] = LAYOUT_ergodox_pretty(
|
||||
KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
@@ -238,37 +269,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_ergodox_pretty_wrapper(
|
||||
_______, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_ergodox_pretty_wrapper(
|
||||
_______, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_ergodox_pretty_wrapper(
|
||||
KC_MAKE, _______, _______, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST,
|
||||
VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, EPRM,
|
||||
RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
|
||||
TG(_MODS),RGB_SMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
/* Keymap 4: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | MsUp | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Play | Stop | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | MWUp | | | | |
|
||||
* | Lclk | Rclk |------| |------| MBn4 | MBn5 |
|
||||
* | | | MWDn | | Mclk | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_MOUS] = LAYOUT_ergodox_pretty(
|
||||
KC_NO, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_WH_U, KC_NO,
|
||||
KC_BTN1, KC_BTN2, KC_WH_D, KC_BTN3, KC_BTN4, KC_BTN5
|
||||
),
|
||||
|
||||
};
|
||||
|
@@ -18,10 +18,6 @@
|
||||
|
||||
#include "process_leader.h"
|
||||
|
||||
#ifndef LEADER_TIMEOUT
|
||||
#define LEADER_TIMEOUT 300
|
||||
#endif
|
||||
|
||||
__attribute__ ((weak))
|
||||
void leader_start(void) {}
|
||||
|
||||
|
@@ -19,13 +19,14 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
bool process_leader(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
void leader_start(void);
|
||||
void leader_end(void);
|
||||
|
||||
|
||||
#ifndef LEADER_TIMEOUT
|
||||
#define LEADER_TIMEOUT 200
|
||||
#endif
|
||||
#define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0)
|
||||
#define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0)
|
||||
#define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == 0 && leader_sequence[4] == 0)
|
||||
|
@@ -158,7 +158,7 @@ void terminal_keymap(void) {
|
||||
for (int c = 0; c < MATRIX_COLS; c++) {
|
||||
uint16_t keycode = pgm_read_word(&keymaps[layer][r][c]);
|
||||
char keycode_s[8];
|
||||
sprintf(keycode_s, "0x%04x,", keycode);
|
||||
sprintf(keycode_s, "0x%04x, ", keycode);
|
||||
send_string(keycode_s);
|
||||
}
|
||||
send_string(newline);
|
||||
|
@@ -150,26 +150,27 @@ void rgb_matrix_set_suspend_state(bool state) {
|
||||
void rgb_matrix_test(void) {
|
||||
// Mask out bits 4 and 5
|
||||
// This 2-bit value will stay the same for 16 ticks.
|
||||
switch ( (g_tick & 0x30) >> 4 )
|
||||
uint32_t factor = 10;
|
||||
switch ( (g_tick & (0b11 << factor)) >> factor )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
rgb_matrix_set_color_all( 20, 0, 0 );
|
||||
rgb_matrix_set_color_all( 255, 0, 0 );
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
rgb_matrix_set_color_all( 0, 20, 0 );
|
||||
rgb_matrix_set_color_all( 0, 255, 0 );
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
rgb_matrix_set_color_all( 0, 0, 20 );
|
||||
rgb_matrix_set_color_all( 0, 0, 255 );
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
rgb_matrix_set_color_all( 20, 20, 20 );
|
||||
rgb_matrix_set_color_all( 255, 255, 255 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -217,7 +218,7 @@ void rgb_matrix_single_LED_test(void) {
|
||||
}
|
||||
|
||||
// All LEDs off
|
||||
void rgb_matrix_all_off(void) {
|
||||
void rgb_matrix_all_off(void) {
|
||||
rgb_matrix_set_color_all( 0, 0, 0 );
|
||||
}
|
||||
|
||||
@@ -243,7 +244,7 @@ void rgb_matrix_solid_reactive(void) {
|
||||
|
||||
// alphas = color1, mods = color2
|
||||
void rgb_matrix_alphas_mods(void) {
|
||||
|
||||
|
||||
RGB rgb1 = hsv_to_rgb( (HSV){ .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val } );
|
||||
RGB rgb2 = hsv_to_rgb( (HSV){ .h = (rgb_matrix_config.hue + 180) % 360, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val } );
|
||||
|
||||
@@ -577,10 +578,10 @@ void rgb_matrix_custom(void) {
|
||||
}
|
||||
|
||||
void rgb_matrix_task(void) {
|
||||
static uint8_t toggle_enable_last = 255;
|
||||
// static uint8_t toggle_enable_last = 255;
|
||||
if (!rgb_matrix_config.enable) {
|
||||
rgb_matrix_all_off();
|
||||
toggle_enable_last = rgb_matrix_config.enable;
|
||||
// toggle_enable_last = rgb_matrix_config.enable;
|
||||
return;
|
||||
}
|
||||
// delay 1 second before driving LEDs or doing anything else
|
||||
@@ -619,50 +620,61 @@ void rgb_matrix_task(void) {
|
||||
// Keep track of the effect used last time,
|
||||
// detect change in effect, so each effect can
|
||||
// have an optional initialization.
|
||||
static uint8_t effect_last = 255;
|
||||
bool initialize = (effect != effect_last) || (rgb_matrix_config.enable != toggle_enable_last);
|
||||
effect_last = effect;
|
||||
toggle_enable_last = rgb_matrix_config.enable;
|
||||
// static uint8_t effect_last = 255;
|
||||
// bool initialize = (effect != effect_last) || (rgb_matrix_config.enable != toggle_enable_last);
|
||||
// effect_last = effect;
|
||||
// toggle_enable_last = rgb_matrix_config.enable;
|
||||
|
||||
// this gets ticked at 20 Hz.
|
||||
// each effect can opt to do calculations
|
||||
// and/or request PWM buffer updates.
|
||||
switch ( effect ) {
|
||||
case RGB_MATRIX_SOLID_COLOR:
|
||||
rgb_matrix_solid_color();
|
||||
rgb_matrix_test();
|
||||
break;
|
||||
case RGB_MATRIX_ALPHAS_MODS:
|
||||
rgb_matrix_alphas_mods();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_alphas_mods();
|
||||
break;
|
||||
case RGB_MATRIX_DUAL_BEACON:
|
||||
rgb_matrix_dual_beacon();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_dual_beacon();
|
||||
break;
|
||||
case RGB_MATRIX_GRADIENT_UP_DOWN:
|
||||
rgb_matrix_gradient_up_down();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_gradient_up_down();
|
||||
break;
|
||||
case RGB_MATRIX_RAINDROPS:
|
||||
rgb_matrix_raindrops( initialize );
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_raindrops( initialize );
|
||||
break;
|
||||
case RGB_MATRIX_CYCLE_ALL:
|
||||
rgb_matrix_cycle_all();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_cycle_all();
|
||||
break;
|
||||
case RGB_MATRIX_CYCLE_LEFT_RIGHT:
|
||||
rgb_matrix_cycle_left_right();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_cycle_left_right();
|
||||
break;
|
||||
case RGB_MATRIX_CYCLE_UP_DOWN:
|
||||
rgb_matrix_cycle_up_down();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_cycle_up_down();
|
||||
break;
|
||||
case RGB_MATRIX_RAINBOW_BEACON:
|
||||
rgb_matrix_rainbow_beacon();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_rainbow_beacon();
|
||||
break;
|
||||
case RGB_MATRIX_RAINBOW_PINWHEELS:
|
||||
rgb_matrix_rainbow_pinwheels();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_rainbow_pinwheels();
|
||||
break;
|
||||
case RGB_MATRIX_RAINBOW_MOVING_CHEVRON:
|
||||
rgb_matrix_rainbow_moving_chevron();
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_rainbow_moving_chevron();
|
||||
break;
|
||||
case RGB_MATRIX_JELLYBEAN_RAINDROPS:
|
||||
rgb_matrix_jellybean_raindrops( initialize );
|
||||
rgb_matrix_test();
|
||||
// rgb_matrix_jellybean_raindrops( initialize );
|
||||
break;
|
||||
#ifdef RGB_MATRIX_KEYPRESSES
|
||||
case RGB_MATRIX_SOLID_REACTIVE:
|
||||
|
@@ -86,6 +86,7 @@ enum rgb_matrix_effects {
|
||||
};
|
||||
|
||||
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue );
|
||||
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
|
||||
|
||||
// This runs after another backlight effect and replaces
|
||||
// colors already set
|
||||
|
@@ -4,6 +4,7 @@
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define AUDIO_CLICKY
|
||||
#define AUDIO_CLICKY_ON
|
||||
#define STARTUP_SONG SONG(E1M1_DOOM)
|
||||
#define GOODBYE_SONG SONG(SONIC_RING)
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
@@ -42,8 +43,6 @@
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#undef PERMISSIVE_HOLD
|
||||
#undef PREVENT_STUCK_MODIFIERS
|
||||
#define TAPPING_FORCE_HOLD
|
||||
//#define RETRO_TAPPING
|
||||
|
||||
#define FORCE_NKRO
|
||||
|
||||
@@ -54,7 +53,7 @@
|
||||
#ifdef TAPPING_TERM
|
||||
#undef TAPPING_TERM
|
||||
#endif // TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
#define TAPPING_TERM 176
|
||||
|
||||
|
||||
// Disable action_get_macro and fn_actions, since we don't use these
|
||||
@@ -62,7 +61,7 @@
|
||||
#ifndef NO_DEBUG
|
||||
#define NO_DEBUG
|
||||
#endif // !NO_DEBUG
|
||||
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
|
||||
#ifndef NO_PRINT
|
||||
#define NO_PRINT
|
||||
#endif // !NO_PRINT
|
||||
#define NO_ACTION_MACRO
|
||||
|
@@ -38,6 +38,10 @@ float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
|
||||
|
||||
|
||||
static uint16_t copy_paste_timer;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
bool rgb_layer_change = true;
|
||||
#endif
|
||||
|
||||
userspace_config_t userspace_config;
|
||||
|
||||
// Helper Functions
|
||||
@@ -160,42 +164,31 @@ void led_set_keymap(uint8_t usb_led) {}
|
||||
// call the keymap's init function
|
||||
void matrix_init_user(void) {
|
||||
uint8_t default_layer = eeconfig_read_default_layer();
|
||||
userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);
|
||||
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
DDRD &= ~(1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
#endif
|
||||
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_enable();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
if (default_layer & (1UL << _COLEMAK)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_magenta();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
} else if (default_layer & (1UL << _DVORAK)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_green();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
} else if (default_layer & (1UL << _WORKMAN)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_goldenrod();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_teal();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
if (default_layer & (1UL << _COLEMAK)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_magenta();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
} else if (default_layer & (1UL << _DVORAK)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_green();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
} else if (default_layer & (1UL << _WORKMAN)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_goldenrod();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_sethsv_teal();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AUDIO_CLICKY
|
||||
userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);
|
||||
clicky_enable = userspace_config.clicky_enable;
|
||||
#endif
|
||||
|
||||
#if ( defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) )
|
||||
set_unicode_input_mode(UC_WINC);
|
||||
@@ -371,9 +364,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
userspace_config.rgb_layer_change ^= 1;
|
||||
eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
rgb_layer_change = !rgb_layer_change;
|
||||
if (rgb_layer_change) {
|
||||
layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
|
||||
}
|
||||
}
|
||||
@@ -382,8 +374,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
|
||||
if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
|
||||
userspace_config.rgb_layer_change = false;
|
||||
eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);
|
||||
rgb_layer_change = false;
|
||||
}
|
||||
return true; break;
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
@@ -412,10 +403,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
break;
|
||||
case CLICKY_TOGGLE:
|
||||
#ifdef AUDIO_CLICKY
|
||||
userspace_config.clicky_enable = clicky_enable;
|
||||
eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);
|
||||
#endif
|
||||
break;
|
||||
#ifdef UNICODE_ENABLE
|
||||
case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻
|
||||
@@ -456,104 +445,123 @@ uint32_t layer_state_set_user(uint32_t state) {
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
|
||||
switch (biton32(state)) {
|
||||
case _NAV:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_blue();
|
||||
rgblight_mode(1);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
break;
|
||||
case _SYMB:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_blue();
|
||||
rgblight_mode(2);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
break;
|
||||
case _MOUS:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_yellow();
|
||||
rgblight_mode(1);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
break;
|
||||
case _MACROS:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_orange();
|
||||
userspace_config.is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _MEDIA:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_chartreuse();
|
||||
rgblight_mode(22);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _GAMEPAD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_orange();
|
||||
rgblight_mode(17);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _DIABLO:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_red();
|
||||
rgblight_mode(5);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _RAISE:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_yellow();
|
||||
rgblight_mode(5);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _LOWER:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_orange();
|
||||
rgblight_mode(5);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _ADJUST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_red();
|
||||
rgblight_mode(23);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
break;
|
||||
case _COVECUBE:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (rgb_layer_change) {
|
||||
rgblight_sethsv_green();
|
||||
rgblight_mode(2);
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
if (default_layer & (1UL << _COLEMAK)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) { rgblight_sethsv_magenta(); }
|
||||
if (rgb_layer_change) { rgblight_sethsv_magenta(); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
}
|
||||
else if (default_layer & (1UL << _DVORAK)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) { rgblight_sethsv_green(); }
|
||||
if (rgb_layer_change) { rgblight_sethsv_green(); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
}
|
||||
else if (default_layer & (1UL << _WORKMAN)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) { rgblight_sethsv_goldenrod(); }
|
||||
if (rgb_layer_change) { rgblight_sethsv_goldenrod(); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
}
|
||||
else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) { rgblight_sethsv_teal(); }
|
||||
if (rgb_layer_change) { rgblight_sethsv_teal(); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
}
|
||||
if (biton32(state) == _MODS) { // If the non-OSM layer is enabled, then breathe
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) { rgblight_mode(2); }
|
||||
if (rgb_layer_change) { rgblight_mode(2); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
} else { // otherwise, stay solid
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) { rgblight_mode(1); }
|
||||
if (rgb_layer_change) { rgblight_mode(1); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -27,8 +27,12 @@ enum userspace_layers {
|
||||
_DVORAK,
|
||||
_WORKMAN,
|
||||
_MODS,
|
||||
_NAV,
|
||||
_COVECUBE,
|
||||
_SYMB,
|
||||
_GAMEPAD,
|
||||
_DIABLO,
|
||||
_MOUS,
|
||||
_MACROS,
|
||||
_MEDIA,
|
||||
_LOWER,
|
||||
@@ -45,6 +49,7 @@ enum userspace_layers {
|
||||
// RGB color codes are no longer located here anymore. Instead, you will want to
|
||||
// head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h
|
||||
|
||||
extern bool rgb_layer_change;
|
||||
extern bool clicky_enable;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
@@ -54,11 +59,10 @@ void rgblight_sethsv_default_helper(uint8_t index);
|
||||
#define EECONFIG_USERSPACE (uint8_t *)20
|
||||
|
||||
typedef union {
|
||||
uint8_t raw;
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool clicky_enable :1;
|
||||
bool rgb_layer_change :1;
|
||||
bool is_overwatch :1;
|
||||
bool clicky_enable :1;
|
||||
bool is_overwatch :1;
|
||||
};
|
||||
} userspace_config_t;
|
||||
|
||||
@@ -162,10 +166,10 @@ enum {
|
||||
#define LAYOUT KEYMAP
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
|
||||
#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
|
||||
|
||||
// Blocks for each of the four major keyboard layouts
|
||||
@@ -232,8 +236,6 @@ enum {
|
||||
|
||||
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
|
||||
#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0
|
||||
#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
|
||||
#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
|
||||
|
||||
// Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
|
||||
// this allows us to quickly modify the bottom row for all of the layouts
|
||||
@@ -243,9 +245,9 @@ enum {
|
||||
#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
|
||||
|
||||
#define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), \
|
||||
#define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), \
|
||||
KC_HOME, KC_PGUP, \
|
||||
LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER)
|
||||
KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
|
||||
|
||||
|
||||
#endif // !USERSPACE
|
||||
|
@@ -162,7 +162,7 @@ This tells us where in the EEPROM that the data structure is located, and this s
|
||||
|
||||
```c
|
||||
typedef union {
|
||||
uint8_t raw;
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool clicky_enable :1;
|
||||
bool is_overwatch :1;
|
||||
@@ -174,23 +174,3 @@ Then, in your C file, you want to add: `userspace_config_t userspace_config;`, a
|
||||
From there, you'd want to use the data structure (such as `userspace_config.is_overwatch`) when you want to check this value.
|
||||
|
||||
And if you want to update it, update directly and then use `eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);` to write the value back to the EEPROM.
|
||||
|
||||
|
||||
Pro Micro Hacking
|
||||
-----------------
|
||||
|
||||
Well, you can get the QMK DFU bootloader working on the ProMicro. But you need to change fuses.
|
||||
|
||||
What worked to get into the firmware properly was:
|
||||
|
||||
```
|
||||
Low: 0x5E High: 0x99 Extended: 0xF3 Lock: 0xFF
|
||||
```
|
||||
|
||||
But some of the columns and rows didn't work, like the pin mapping was wrong. Even when setting the bootloader settings.
|
||||
|
||||
This is here for future reference. And the default fuse settings I believe were:
|
||||
|
||||
```
|
||||
Low: 0xFF High: 0xD8 Extended: 0xC3 Lock: 0x3F
|
||||
```
|
||||
|
@@ -5,7 +5,3 @@ EXTRAFLAGS += -flto
|
||||
ifeq ($(strip $(NO_SECRETS)), yes)
|
||||
OPT_DEFS += -DNO_SECRETS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
|
||||
OPT_DEFS += -DINDICATOR_LIGHTS
|
||||
endif
|
||||
|
Reference in New Issue
Block a user