mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-06 01:02:54 +00:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
73a3399d0e | ||
![]() |
1a907a1627 | ||
![]() |
224b4dea98 | ||
![]() |
40718d2ca3 | ||
![]() |
0533ea4a20 | ||
![]() |
a14eb01883 | ||
![]() |
714c82cc2e | ||
![]() |
f48e20c1eb | ||
![]() |
aa795dc33e | ||
![]() |
07fac2fbbf | ||
![]() |
dd29b64256 | ||
![]() |
35efcc9f39 | ||
![]() |
fa1ee47cf2 | ||
![]() |
04bea9ef74 | ||
![]() |
479bf78f3e | ||
![]() |
83df69488d | ||
![]() |
7e5a0def3a | ||
![]() |
0dcd60eeed | ||
![]() |
ffc2dc0359 | ||
![]() |
8eb674b257 |
@@ -248,3 +248,7 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
* `SPLIT_KEYBOARD`
|
||||
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||
* `WAIT_FOR_USB`
|
||||
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
|
||||
|
10
keyboards/atreus/keymaps/nojjan/config.h
Normal file
10
keyboards/atreus/keymaps/nojjan/config.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#undef MATRIX_ROW_PINS
|
||||
#undef MATRIX_COL_PINS
|
||||
#undef UNUSED_PINS
|
||||
|
||||
// Pin configuration for falbatech atreus
|
||||
#define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
||||
#define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
||||
#define UNUSED_PINS
|
61
keyboards/atreus/keymaps/nojjan/keymap.c
Normal file
61
keyboards/atreus/keymaps/nojjan/keymap.c
Normal file
@@ -0,0 +1,61 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// 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.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QW 0
|
||||
#define _RS 1
|
||||
#define _LW 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = LAYOUT( /* Qwerty */
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P ,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH ,
|
||||
KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT ),
|
||||
/*
|
||||
* ! @ up { } || pgup 7 8 9 *
|
||||
* # left down right $ || pgdn 4 5 6 +
|
||||
* [ ] ( ) & || ` 1 2 3 \
|
||||
* lower insert super shift bksp ctrl || alt space fn . 0 =
|
||||
*/
|
||||
[_RS] = LAYOUT( /* [> RAISE <] */
|
||||
KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR ,
|
||||
KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS ,
|
||||
KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS ,
|
||||
TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ),
|
||||
/*
|
||||
* insert home up end pgup || up F7 F8 F9 F10
|
||||
* del left down right pgdn || down F4 F5 F6 F11
|
||||
* volup reset || F1 F2 F3 F12
|
||||
* voldn super shift bksp ctrl || alt space L0 prtsc scroll pause
|
||||
*/
|
||||
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
||||
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@@ -127,8 +127,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
DDRD &= ~(1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
#endif
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
|
@@ -16,9 +16,16 @@ 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
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
#include <serial_config.h>
|
||||
|
||||
#endif
|
||||
#ifdef USE_Link_Time_Optimization
|
||||
// LTO has issues with macros (action_get_macro) and "functions" (fn_actions),
|
||||
// so just disable them
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#define DISABLE_LEADER
|
||||
#endif // USE_Link_Time_Optimization
|
||||
|
@@ -1,8 +1,5 @@
|
||||
#ifndef CRKBD_H
|
||||
#define CRKBD_H
|
||||
#pragma once
|
||||
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
#include "rev1.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -34,7 +34,7 @@ void i2c_delay(void) {
|
||||
// _delay_us(100);
|
||||
}
|
||||
|
||||
// Setup twi to run at 100kHz
|
||||
// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK)
|
||||
void i2c_master_init(void) {
|
||||
// no prescaler
|
||||
TWSR = 0;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#ifndef I2C_H
|
||||
#define I2C_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -15,7 +14,7 @@
|
||||
|
||||
#define SLAVE_BUFFER_SIZE 0x10
|
||||
|
||||
// i2c SCL clock frequency
|
||||
// i2c SCL clock frequency 400kHz
|
||||
#define SCL_CLOCK 400000L
|
||||
|
||||
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
|
||||
@@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void);
|
||||
extern unsigned char i2c_read(unsigned char ack);
|
||||
|
||||
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
|
||||
|
||||
#endif
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "LUFA/Drivers/Peripheral/TWI.h"
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
@@ -130,7 +129,6 @@ void matrix_init_user(void) {
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
@@ -21,10 +21,10 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ../lib/rgb_state_reader.c \
|
||||
../lib/layer_state_reader.c \
|
||||
../lib/logo_reader.c \
|
||||
../lib/keylogger.c \
|
||||
# ../lib/mode_icon_reader.c \
|
||||
# ../lib/host_led_state_reader.c \
|
||||
# ../lib/timelogger.c \
|
||||
SRC += ./lib/rgb_state_reader.c \
|
||||
./lib/layer_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "LUFA/Drivers/Peripheral/TWI.h"
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
@@ -124,7 +123,6 @@ void matrix_init_user(void) {
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
@@ -21,10 +21,10 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ../lib/rgb_state_reader.c \
|
||||
../lib/layer_state_reader.c \
|
||||
../lib/logo_reader.c \
|
||||
../lib/keylogger.c \
|
||||
# ../lib/mode_icon_reader.c \
|
||||
# ../lib/host_led_state_reader.c \
|
||||
# ../lib/timelogger.c \
|
||||
SRC += ./lib/rgb_state_reader.c \
|
||||
./lib/layer_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
||||
|
@@ -21,9 +21,7 @@
|
||||
|
||||
$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
|
||||
*/
|
||||
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
#pragma once
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
@@ -358,5 +356,3 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
|
||||
#define SERIAL_PORT_USBVIRTUAL Serial
|
||||
#define SERIAL_PORT_HARDWARE Serial1
|
||||
#define SERIAL_PORT_HARDWARE_OPEN Serial1
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
|
@@ -16,10 +16,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef REV1_CONFIG_H
|
||||
#define REV1_CONFIG_H
|
||||
|
||||
#include "../config.h"
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
@@ -82,6 +79,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/interrupt.h>
|
||||
@@ -30,12 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "matrix.h"
|
||||
#include "split_util.h"
|
||||
#include "pro_micro.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
# include "i2c.h"
|
||||
#else // USE_SERIAL
|
||||
# include "serial.h"
|
||||
# include "split_scomm.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
@@ -103,6 +103,8 @@ void matrix_init(void)
|
||||
init_cols();
|
||||
|
||||
TX_RX_LED_INIT;
|
||||
TXLED0;
|
||||
RXLED0;
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
@@ -179,17 +181,20 @@ i2c_error: // the cable is disconnceted, or something else went wrong
|
||||
|
||||
#else // USE_SERIAL
|
||||
|
||||
int serial_transaction(void) {
|
||||
int serial_transaction(int master_changed) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int ret=serial_update_buffers(master_changed);
|
||||
#else
|
||||
int ret=serial_update_buffers();
|
||||
#endif
|
||||
if (ret ) {
|
||||
if(ret==2)RXLED1;
|
||||
if(ret==2) RXLED1;
|
||||
return 1;
|
||||
}
|
||||
RXLED0;
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||
}
|
||||
RXLED0;
|
||||
memcpy(&matrix[slaveOffset],
|
||||
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -200,19 +205,9 @@ uint8_t matrix_scan(void)
|
||||
matrix_master_scan();
|
||||
}else{
|
||||
matrix_slave_scan();
|
||||
|
||||
// if(serial_slave_DATA_CORRUPT()){
|
||||
// TXLED0;
|
||||
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
|
||||
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[offset+i] = serial_master_buffer[i];
|
||||
}
|
||||
|
||||
// }else{
|
||||
// TXLED1;
|
||||
// }
|
||||
|
||||
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
|
||||
memcpy(&matrix[offset],
|
||||
(void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH);
|
||||
matrix_scan_quantum();
|
||||
}
|
||||
return 1;
|
||||
@@ -222,6 +217,7 @@ uint8_t matrix_scan(void)
|
||||
uint8_t matrix_master_scan(void) {
|
||||
|
||||
int ret = _matrix_scan();
|
||||
int mchanged = 1;
|
||||
|
||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||
|
||||
@@ -231,15 +227,18 @@ uint8_t matrix_master_scan(void) {
|
||||
// i2c_slave_buffer[i] = matrix[offset+i];
|
||||
// }
|
||||
#else // USE_SERIAL
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
serial_master_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
mchanged = memcmp((void *)serial_master_buffer,
|
||||
&matrix[offset], SERIAL_MASTER_BUFFER_LENGTH);
|
||||
#endif
|
||||
memcpy((void *)serial_master_buffer,
|
||||
&matrix[offset], SERIAL_MASTER_BUFFER_LENGTH);
|
||||
#endif
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
if( i2c_transaction() ) {
|
||||
#else // USE_SERIAL
|
||||
if( serial_transaction() ) {
|
||||
if( serial_transaction(mchanged) ) {
|
||||
#endif
|
||||
// turn on the indicator led when halves are disconnected
|
||||
TXLED1;
|
||||
@@ -273,9 +272,19 @@ void matrix_slave_scan(void) {
|
||||
i2c_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#else // USE_SERIAL
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int change = 0;
|
||||
#endif
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
if( serial_slave_buffer[i] != matrix[offset+i] )
|
||||
change = 1;
|
||||
#endif
|
||||
serial_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
slave_buffer_change_count += change;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#ifndef REV1_H
|
||||
#define REV1_CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "../crkbd.h"
|
||||
|
||||
@@ -49,5 +48,3 @@
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \
|
||||
)
|
||||
|
||||
#endif
|
||||
|
@@ -1,2 +1,3 @@
|
||||
SRC += rev1/matrix.c \
|
||||
ws2812.c
|
||||
SRC += rev1/matrix.c
|
||||
SRC += rev1/split_util.c
|
||||
SRC += rev1/split_scomm.c
|
||||
|
10
keyboards/crkbd/rev1/serial_config.h
Normal file
10
keyboards/crkbd/rev1/serial_config.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
/* Soft Serial defines */
|
||||
#define SERIAL_PIN_DDR DDRD
|
||||
#define SERIAL_PIN_PORT PORTD
|
||||
#define SERIAL_PIN_INPUT PIND
|
||||
#define SERIAL_PIN_MASK _BV(PD2)
|
||||
#define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
|
||||
#define SERIAL_USE_MULTI_TRANSACTION
|
5
keyboards/crkbd/rev1/serial_config_simpleapi.h
Normal file
5
keyboards/crkbd/rev1/serial_config_simpleapi.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#undef SERIAL_USE_MULTI_TRANSACTION
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
73
keyboards/crkbd/rev1/split_scomm.c
Normal file
73
keyboards/crkbd/rev1/split_scomm.c
Normal file
@@ -0,0 +1,73 @@
|
||||
#ifdef USE_SERIAL
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE flexible API (using multi-type transaction function) --- */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <split_scomm.h>
|
||||
#include "serial.h"
|
||||
#ifdef SERIAL_DEBUG_MODE
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile status_com = 0;
|
||||
uint8_t volatile status1 = 0;
|
||||
uint8_t slave_buffer_change_count = 0;
|
||||
uint8_t s_change_old = 0xff;
|
||||
|
||||
SSTD_t transactions[] = {
|
||||
#define GET_SLAVE_STATUS 0
|
||||
/* master buffer not changed, only recive slave_buffer_change_count */
|
||||
{ (uint8_t *)&status_com,
|
||||
0, NULL,
|
||||
sizeof(slave_buffer_change_count), &slave_buffer_change_count,
|
||||
},
|
||||
#define PUT_MASTER_GET_SLAVE_STATUS 1
|
||||
/* master buffer changed need send, and recive slave_buffer_change_count */
|
||||
{ (uint8_t *)&status_com,
|
||||
sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
|
||||
sizeof(slave_buffer_change_count), &slave_buffer_change_count,
|
||||
},
|
||||
#define GET_SLAVE_BUFFER 2
|
||||
/* recive serial_slave_buffer */
|
||||
{ (uint8_t *)&status1,
|
||||
0, NULL,
|
||||
sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
|
||||
}
|
||||
};
|
||||
|
||||
void serial_master_init(void)
|
||||
{
|
||||
soft_serial_initiator_init(transactions);
|
||||
}
|
||||
|
||||
void serial_slave_init(void)
|
||||
{
|
||||
soft_serial_target_init(transactions);
|
||||
}
|
||||
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
// 2 => checksum error
|
||||
int serial_update_buffers(int master_update)
|
||||
{
|
||||
int status;
|
||||
static int need_retry = 0;
|
||||
if( s_change_old != slave_buffer_change_count ) {
|
||||
status = soft_serial_transaction(GET_SLAVE_BUFFER);
|
||||
if( status == TRANSACTION_END )
|
||||
s_change_old = slave_buffer_change_count;
|
||||
}
|
||||
if( !master_update && !need_retry)
|
||||
status = soft_serial_transaction(GET_SLAVE_STATUS);
|
||||
else
|
||||
status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS);
|
||||
need_retry = ( status == TRANSACTION_END ) ? 0 : 1;
|
||||
return status;
|
||||
}
|
||||
|
||||
#endif // SERIAL_USE_MULTI_TRANSACTION
|
||||
#endif /* USE_SERIAL */
|
21
keyboards/crkbd/rev1/split_scomm.h
Normal file
21
keyboards/crkbd/rev1/split_scomm.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
|
||||
#include "serial.h"
|
||||
|
||||
#else
|
||||
/* --- USE flexible API (using multi-type transaction function) --- */
|
||||
// Buffers for master - slave communication
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
extern uint8_t slave_buffer_change_count;
|
||||
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(int master_changed);
|
||||
|
||||
#endif
|
@@ -7,12 +7,11 @@
|
||||
#include "split_util.h"
|
||||
#include "matrix.h"
|
||||
#include "keyboard.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
# include "i2c.h"
|
||||
#else
|
||||
# include "serial.h"
|
||||
# include "split_scomm.h"
|
||||
#endif
|
||||
|
||||
volatile bool isLeftHand = true;
|
@@ -1,5 +1,4 @@
|
||||
#ifndef SPLIT_KEYBOARD_UTIL_H
|
||||
#define SPLIT_KEYBOARD_UTIL_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "eeconfig.h"
|
||||
@@ -15,5 +14,3 @@ void split_keyboard_setup(void);
|
||||
bool has_usb(void);
|
||||
|
||||
void matrix_master_OLED_init (void);
|
||||
|
||||
#endif
|
@@ -1,7 +1,9 @@
|
||||
SRC += i2c.c \
|
||||
serial.c \
|
||||
split_util.c \
|
||||
ssd1306.c
|
||||
SRC += i2c.c
|
||||
SRC += serial.c
|
||||
SRC += ssd1306.c
|
||||
|
||||
# if firmware size over limit, try this option
|
||||
# CFLAGS += -flto
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
|
@@ -9,36 +9,128 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include "serial.h"
|
||||
//#include <pro_micro.h>
|
||||
|
||||
#ifdef USE_SERIAL
|
||||
|
||||
// Serial pulse period in microseconds. Its probably a bad idea to lower this
|
||||
// value.
|
||||
#define SERIAL_DELAY 24
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
|
||||
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
#endif
|
||||
#if SERIAL_MASTER_BUFFER_LENGTH > 0
|
||||
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||
#endif
|
||||
uint8_t volatile status0 = 0;
|
||||
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||
SSTD_t transactions[] = {
|
||||
{ (uint8_t *)&status0,
|
||||
#if SERIAL_MASTER_BUFFER_LENGTH > 0
|
||||
sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
|
||||
#else
|
||||
0, (uint8_t *)NULL,
|
||||
#endif
|
||||
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
|
||||
sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
|
||||
#else
|
||||
0, (uint8_t *)NULL,
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
#define SLAVE_DATA_CORRUPT (1<<0)
|
||||
volatile uint8_t status = 0;
|
||||
void serial_master_init(void)
|
||||
{ soft_serial_initiator_init(transactions); }
|
||||
|
||||
void serial_slave_init(void)
|
||||
{ soft_serial_target_init(transactions); }
|
||||
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
// 2 => checksum error
|
||||
int serial_update_buffers()
|
||||
{ return soft_serial_transaction(); }
|
||||
|
||||
#endif // Simple API (OLD API, compatible with let's split serial.c)
|
||||
|
||||
#define ALWAYS_INLINE __attribute__((always_inline))
|
||||
#define NO_INLINE __attribute__((noinline))
|
||||
#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
||||
|
||||
// Serial pulse period in microseconds.
|
||||
#define TID_SEND_ADJUST 14
|
||||
|
||||
#define SELECT_SERIAL_SPEED 1
|
||||
#if SELECT_SERIAL_SPEED == 0
|
||||
// Very High speed
|
||||
#define SERIAL_DELAY 4 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 33 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 1
|
||||
// High speed
|
||||
#define SERIAL_DELAY 6 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 2
|
||||
// Middle speed
|
||||
#define SERIAL_DELAY 12 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 3
|
||||
// Low speed
|
||||
#define SERIAL_DELAY 24 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#elif SELECT_SERIAL_SPEED == 4
|
||||
// Very Low speed
|
||||
#define SERIAL_DELAY 50 // micro sec
|
||||
#define READ_WRITE_START_ADJUST 30 // cycles
|
||||
#define READ_WRITE_WIDTH_ADJUST 3 // cycles
|
||||
#else
|
||||
#error Illegal Serial Speed
|
||||
#endif
|
||||
|
||||
|
||||
#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
|
||||
#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
|
||||
|
||||
#define SLAVE_INT_WIDTH_US 1
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
|
||||
#else
|
||||
#define SLAVE_INT_ACK_WIDTH_UNIT 2
|
||||
#define SLAVE_INT_ACK_WIDTH 4
|
||||
#endif
|
||||
|
||||
static SSTD_t *Transaction_table = NULL;
|
||||
|
||||
inline static
|
||||
void serial_delay(void) {
|
||||
_delay_us(SERIAL_DELAY);
|
||||
}
|
||||
void serial_delay_short(void) {
|
||||
_delay_us(SERIAL_DELAY-1);
|
||||
|
||||
inline static
|
||||
void serial_delay_half1(void) {
|
||||
_delay_us(SERIAL_DELAY_HALF1);
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_delay_half2(void) {
|
||||
_delay_us(SERIAL_DELAY_HALF2);
|
||||
}
|
||||
|
||||
inline static void serial_output(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_output(void) {
|
||||
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
// make the serial pin an input with pull-up resistor
|
||||
inline static void serial_input_with_pullup(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_input(void) {
|
||||
void serial_input_with_pullup(void) {
|
||||
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
@@ -48,191 +140,305 @@ uint8_t serial_read_pin(void) {
|
||||
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||
}
|
||||
|
||||
inline static void serial_low(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_low(void) {
|
||||
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
inline static void serial_high(void) ALWAYS_INLINE;
|
||||
inline static
|
||||
void serial_high(void) {
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
void serial_master_init(void) {
|
||||
serial_output();
|
||||
serial_high();
|
||||
void soft_serial_initiator_init(SSTD_t *sstd_table)
|
||||
{
|
||||
Transaction_table = sstd_table;
|
||||
serial_output();
|
||||
serial_high();
|
||||
}
|
||||
|
||||
void serial_slave_init(void) {
|
||||
serial_input();
|
||||
void soft_serial_target_init(SSTD_t *sstd_table)
|
||||
{
|
||||
Transaction_table = sstd_table;
|
||||
serial_input_with_pullup();
|
||||
|
||||
#ifndef USE_SERIAL_PD2
|
||||
// Enable INT0
|
||||
EIMSK |= _BV(INT0);
|
||||
// Trigger on falling edge of INT0
|
||||
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||
#if SERIAL_PIN_MASK == _BV(PD0)
|
||||
// Enable INT0
|
||||
EIMSK |= _BV(INT0);
|
||||
// Trigger on falling edge of INT0
|
||||
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||
#elif SERIAL_PIN_MASK == _BV(PD2)
|
||||
// Enable INT2
|
||||
EIMSK |= _BV(INT2);
|
||||
// Trigger on falling edge of INT2
|
||||
EICRA &= ~(_BV(ISC20) | _BV(ISC21));
|
||||
#else
|
||||
// Enable INT2
|
||||
EIMSK |= _BV(INT2);
|
||||
// Trigger on falling edge of INT2
|
||||
EICRA &= ~(_BV(ISC20) | _BV(ISC21));
|
||||
#error unknown SERIAL_PIN_MASK value
|
||||
#endif
|
||||
}
|
||||
|
||||
// Used by the master to synchronize timing with the slave.
|
||||
// Used by the sender to synchronize timing with the reciver.
|
||||
static void sync_recv(void) NO_INLINE;
|
||||
static
|
||||
void sync_recv(void) {
|
||||
serial_input();
|
||||
// This shouldn't hang if the slave disconnects because the
|
||||
// serial line will float to high if the slave does disconnect.
|
||||
for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
|
||||
}
|
||||
// This shouldn't hang if the target disconnects because the
|
||||
// serial line will float to high if the target does disconnect.
|
||||
while (!serial_read_pin());
|
||||
//serial_delay();
|
||||
_delay_us(SERIAL_DELAY-5);
|
||||
}
|
||||
|
||||
// Used by the slave to send a synchronization signal to the master.
|
||||
// Used by the reciver to send a synchronization signal to the sender.
|
||||
static void sync_send(void)NO_INLINE;
|
||||
static
|
||||
void sync_send(void) {
|
||||
serial_output();
|
||||
|
||||
serial_low();
|
||||
serial_delay();
|
||||
|
||||
serial_high();
|
||||
}
|
||||
|
||||
// Reads a byte from the serial line
|
||||
static
|
||||
uint8_t serial_read_byte(void) {
|
||||
uint8_t byte = 0;
|
||||
serial_input();
|
||||
for ( uint8_t i = 0; i < 8; ++i) {
|
||||
byte = (byte << 1) | serial_read_pin();
|
||||
serial_delay();
|
||||
_delay_us(1);
|
||||
static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
|
||||
static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
|
||||
uint8_t byte, i, p, pb;
|
||||
|
||||
_delay_sub_us(READ_WRITE_START_ADJUST);
|
||||
for( i = 0, byte = 0, p = 0; i < bit; i++ ) {
|
||||
serial_delay_half1(); // read the middle of pulses
|
||||
if( serial_read_pin() ) {
|
||||
byte = (byte << 1) | 1; p ^= 1;
|
||||
} else {
|
||||
byte = (byte << 1) | 0; p ^= 0;
|
||||
}
|
||||
_delay_sub_us(READ_WRITE_WIDTH_ADJUST);
|
||||
serial_delay_half2();
|
||||
}
|
||||
/* recive parity bit */
|
||||
serial_delay_half1(); // read the middle of pulses
|
||||
pb = serial_read_pin();
|
||||
_delay_sub_us(READ_WRITE_WIDTH_ADJUST);
|
||||
serial_delay_half2();
|
||||
|
||||
*pterrcount += (p != pb)? 1 : 0;
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
// Sends a byte with MSB ordering
|
||||
static
|
||||
void serial_write_byte(uint8_t data) {
|
||||
uint8_t b = 8;
|
||||
serial_output();
|
||||
while( b-- ) {
|
||||
if(data & (1 << b)) {
|
||||
serial_high();
|
||||
} else {
|
||||
serial_low();
|
||||
void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
|
||||
void serial_write_chunk(uint8_t data, uint8_t bit) {
|
||||
uint8_t b, p;
|
||||
for( p = 0, b = 1<<(bit-1); b ; b >>= 1) {
|
||||
if(data & b) {
|
||||
serial_high(); p ^= 1;
|
||||
} else {
|
||||
serial_low(); p ^= 0;
|
||||
}
|
||||
serial_delay();
|
||||
}
|
||||
/* send parity bit */
|
||||
if(p & 1) { serial_high(); }
|
||||
else { serial_low(); }
|
||||
serial_delay();
|
||||
|
||||
serial_low(); // sync_send() / senc_recv() need raise edge
|
||||
}
|
||||
|
||||
static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
|
||||
static
|
||||
void serial_send_packet(uint8_t *buffer, uint8_t size) {
|
||||
for (uint8_t i = 0; i < size; ++i) {
|
||||
uint8_t data;
|
||||
data = buffer[i];
|
||||
sync_send();
|
||||
serial_write_chunk(data,8);
|
||||
}
|
||||
}
|
||||
|
||||
// interrupt handle to be used by the slave device
|
||||
static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
|
||||
static
|
||||
uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
|
||||
uint8_t pecount = 0;
|
||||
for (uint8_t i = 0; i < size; ++i) {
|
||||
uint8_t data;
|
||||
sync_recv();
|
||||
data = serial_read_chunk(&pecount, 8);
|
||||
buffer[i] = data;
|
||||
}
|
||||
return pecount == 0;
|
||||
}
|
||||
|
||||
inline static
|
||||
void change_sender2reciver(void) {
|
||||
sync_send(); //0
|
||||
serial_delay_half1(); //1
|
||||
serial_low(); //2
|
||||
serial_input_with_pullup(); //2
|
||||
serial_delay_half1(); //3
|
||||
}
|
||||
|
||||
inline static
|
||||
void change_reciver2sender(void) {
|
||||
sync_recv(); //0
|
||||
serial_delay(); //1
|
||||
serial_low(); //3
|
||||
serial_output(); //3
|
||||
serial_delay_half1(); //4
|
||||
}
|
||||
|
||||
// interrupt handle to be used by the target device
|
||||
ISR(SERIAL_PIN_INTERRUPT) {
|
||||
sync_send();
|
||||
|
||||
uint8_t checksum = 0;
|
||||
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||
serial_write_byte(serial_slave_buffer[i]);
|
||||
sync_send();
|
||||
checksum += serial_slave_buffer[i];
|
||||
}
|
||||
serial_write_byte(checksum);
|
||||
sync_send();
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
serial_low();
|
||||
serial_output();
|
||||
SSTD_t *trans = Transaction_table;
|
||||
#else
|
||||
// recive transaction table index
|
||||
uint8_t tid;
|
||||
uint8_t pecount = 0;
|
||||
sync_recv();
|
||||
tid = serial_read_chunk(&pecount,4);
|
||||
if(pecount> 0)
|
||||
return;
|
||||
serial_delay_half1();
|
||||
|
||||
// wait for the sync to finish sending
|
||||
serial_delay();
|
||||
serial_high(); // response step1 low->high
|
||||
serial_output();
|
||||
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
|
||||
SSTD_t *trans = &Transaction_table[tid];
|
||||
serial_low(); // response step2 ack high->low
|
||||
#endif
|
||||
|
||||
// read the middle of pulses
|
||||
_delay_us(SERIAL_DELAY/2);
|
||||
// target send phase
|
||||
if( trans->target2initiator_buffer_size > 0 )
|
||||
serial_send_packet((uint8_t *)trans->target2initiator_buffer,
|
||||
trans->target2initiator_buffer_size);
|
||||
// target switch to input
|
||||
change_sender2reciver();
|
||||
|
||||
uint8_t checksum_computed = 0;
|
||||
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||
serial_master_buffer[i] = serial_read_byte();
|
||||
sync_send();
|
||||
checksum_computed += serial_master_buffer[i];
|
||||
}
|
||||
uint8_t checksum_received = serial_read_byte();
|
||||
sync_send();
|
||||
|
||||
serial_input(); // end transaction
|
||||
|
||||
if ( checksum_computed != checksum_received ) {
|
||||
status |= SLAVE_DATA_CORRUPT;
|
||||
// target recive phase
|
||||
if( trans->initiator2target_buffer_size > 0 ) {
|
||||
if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
|
||||
trans->initiator2target_buffer_size) ) {
|
||||
*trans->status = TRANSACTION_ACCEPTED;
|
||||
} else {
|
||||
*trans->status = TRANSACTION_DATA_ERROR;
|
||||
}
|
||||
} else {
|
||||
status &= ~SLAVE_DATA_CORRUPT;
|
||||
*trans->status = TRANSACTION_ACCEPTED;
|
||||
}
|
||||
|
||||
sync_recv(); //weit initiator output to high
|
||||
}
|
||||
|
||||
inline
|
||||
bool serial_slave_DATA_CORRUPT(void) {
|
||||
return status & SLAVE_DATA_CORRUPT;
|
||||
}
|
||||
|
||||
// Copies the serial_slave_buffer to the master and sends the
|
||||
// serial_master_buffer to the slave.
|
||||
/////////
|
||||
// start transaction by initiator
|
||||
//
|
||||
// int soft_serial_transaction(int sstd_index)
|
||||
//
|
||||
// Returns:
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
int serial_update_buffers(void) {
|
||||
// this code is very time dependent, so we need to disable interrupts
|
||||
// TRANSACTION_END
|
||||
// TRANSACTION_NO_RESPONSE
|
||||
// TRANSACTION_DATA_ERROR
|
||||
// this code is very time dependent, so we need to disable interrupts
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
int soft_serial_transaction(void) {
|
||||
SSTD_t *trans = Transaction_table;
|
||||
#else
|
||||
int soft_serial_transaction(int sstd_index) {
|
||||
SSTD_t *trans = &Transaction_table[sstd_index];
|
||||
#endif
|
||||
cli();
|
||||
|
||||
// signal to the slave that we want to start a transaction
|
||||
// signal to the target that we want to start a transaction
|
||||
serial_output();
|
||||
serial_low();
|
||||
_delay_us(1);
|
||||
_delay_us(SLAVE_INT_WIDTH_US);
|
||||
|
||||
// wait for the slaves response
|
||||
serial_input();
|
||||
serial_high();
|
||||
_delay_us(SERIAL_DELAY);
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
// wait for the target response
|
||||
serial_input_with_pullup();
|
||||
_delay_us(SLAVE_INT_RESPONSE_TIME);
|
||||
|
||||
// check if the slave is present
|
||||
// check if the target is present
|
||||
if (serial_read_pin()) {
|
||||
// slave failed to pull the line low, assume not present
|
||||
// target failed to pull the line low, assume not present
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_NO_RESPONSE;
|
||||
sei();
|
||||
return 1;
|
||||
return TRANSACTION_NO_RESPONSE;
|
||||
}
|
||||
|
||||
// if the slave is present syncronize with it
|
||||
sync_recv();
|
||||
#else
|
||||
// send transaction table index
|
||||
sync_send();
|
||||
_delay_sub_us(TID_SEND_ADJUST);
|
||||
serial_write_chunk(sstd_index, 4);
|
||||
serial_delay_half1();
|
||||
|
||||
uint8_t checksum_computed = 0;
|
||||
// receive data from the slave
|
||||
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||
serial_slave_buffer[i] = serial_read_byte();
|
||||
sync_recv();
|
||||
checksum_computed += serial_slave_buffer[i];
|
||||
}
|
||||
uint8_t checksum_received = serial_read_byte();
|
||||
sync_recv();
|
||||
|
||||
if (checksum_computed != checksum_received) {
|
||||
sei();
|
||||
return 2;
|
||||
// wait for the target response (step1 low->high)
|
||||
serial_input_with_pullup();
|
||||
while( !serial_read_pin() ) {
|
||||
_delay_sub_us(2);
|
||||
}
|
||||
|
||||
uint8_t checksum = 0;
|
||||
// send data to the slave
|
||||
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||
serial_write_byte(serial_master_buffer[i]);
|
||||
sync_recv();
|
||||
checksum += serial_master_buffer[i];
|
||||
// check if the target is present (step2 high->low)
|
||||
for( int i = 0; serial_read_pin(); i++ ) {
|
||||
if (i > SLAVE_INT_ACK_WIDTH + 1) {
|
||||
// slave failed to pull the line low, assume not present
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_NO_RESPONSE;
|
||||
sei();
|
||||
return TRANSACTION_NO_RESPONSE;
|
||||
}
|
||||
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
|
||||
}
|
||||
#endif
|
||||
|
||||
// initiator recive phase
|
||||
// if the target is present syncronize with it
|
||||
if( trans->target2initiator_buffer_size > 0 ) {
|
||||
if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
|
||||
trans->target2initiator_buffer_size) ) {
|
||||
serial_output();
|
||||
serial_high();
|
||||
*trans->status = TRANSACTION_DATA_ERROR;
|
||||
sei();
|
||||
return TRANSACTION_DATA_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
// initiator switch to output
|
||||
change_reciver2sender();
|
||||
|
||||
// initiator send phase
|
||||
if( trans->initiator2target_buffer_size > 0 ) {
|
||||
serial_send_packet((uint8_t *)trans->initiator2target_buffer,
|
||||
trans->initiator2target_buffer_size);
|
||||
}
|
||||
serial_write_byte(checksum);
|
||||
sync_recv();
|
||||
|
||||
// always, release the line when not in use
|
||||
serial_output();
|
||||
serial_high();
|
||||
sync_send();
|
||||
|
||||
*trans->status = TRANSACTION_END;
|
||||
sei();
|
||||
return 0;
|
||||
return TRANSACTION_END;
|
||||
}
|
||||
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int soft_serial_get_and_clean_status(int sstd_index) {
|
||||
SSTD_t *trans = &Transaction_table[sstd_index];
|
||||
cli();
|
||||
int retval = *trans->status;
|
||||
*trans->status = 0;;
|
||||
sei();
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,32 +1,77 @@
|
||||
#ifndef MY_SERIAL_H
|
||||
#define MY_SERIAL_H
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/* TODO: some defines for interrupt setup */
|
||||
#define SERIAL_PIN_DDR DDRD
|
||||
#define SERIAL_PIN_PORT PORTD
|
||||
#define SERIAL_PIN_INPUT PIND
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
// Need Soft Serial defines in serial_config.h
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
// ex.
|
||||
// #define SERIAL_PIN_DDR DDRD
|
||||
// #define SERIAL_PIN_PORT PORTD
|
||||
// #define SERIAL_PIN_INPUT PIND
|
||||
// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2
|
||||
// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2
|
||||
//
|
||||
// //// USE Simple API (OLD API, compatible with let's split serial.c)
|
||||
// ex.
|
||||
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
// #define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||
//
|
||||
// //// USE flexible API (using multi-type transaction function)
|
||||
// #define SERIAL_USE_MULTI_TRANSACTION
|
||||
//
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef USE_SERIAL_PD2
|
||||
#define SERIAL_PIN_MASK _BV(PD0)
|
||||
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
#else
|
||||
#define SERIAL_PIN_MASK _BV(PD2)
|
||||
#define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
#endif
|
||||
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
|
||||
// Buffers for master - slave communication
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
|
||||
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
#endif
|
||||
#if SERIAL_MASTER_BUFFER_LENGTH > 0
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
#endif
|
||||
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(void);
|
||||
bool serial_slave_data_corrupt(void);
|
||||
|
||||
#endif // USE Simple API
|
||||
|
||||
// Soft Serial Transaction Descriptor
|
||||
typedef struct _SSTD_t {
|
||||
uint8_t *status;
|
||||
uint8_t initiator2target_buffer_size;
|
||||
uint8_t *initiator2target_buffer;
|
||||
uint8_t target2initiator_buffer_size;
|
||||
uint8_t *target2initiator_buffer;
|
||||
} SSTD_t;
|
||||
|
||||
// initiator is transaction start side
|
||||
void soft_serial_initiator_init(SSTD_t *sstd_table);
|
||||
// target is interrupt accept side
|
||||
void soft_serial_target_init(SSTD_t *sstd_table);
|
||||
|
||||
// initiator resullt
|
||||
#define TRANSACTION_END 0
|
||||
#define TRANSACTION_NO_RESPONSE 0x1
|
||||
#define TRANSACTION_DATA_ERROR 0x2
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
int soft_serial_transaction(void);
|
||||
#else
|
||||
int soft_serial_transaction(int sstd_index);
|
||||
#endif
|
||||
|
||||
// target status
|
||||
// *SSTD_t.status has
|
||||
// initiator:
|
||||
// TRANSACTION_END
|
||||
// or TRANSACTION_NO_RESPONSE
|
||||
// or TRANSACTION_DATA_ERROR
|
||||
// target:
|
||||
// TRANSACTION_DATA_ERROR
|
||||
// or TRANSACTION_ACCEPTED
|
||||
#define TRANSACTION_ACCEPTED 0x4
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int soft_serial_get_and_clean_status(int sstd_index);
|
||||
#endif
|
||||
|
@@ -123,6 +123,7 @@ static int8_t capture_sendchar(uint8_t c) {
|
||||
bool iota_gfx_init(bool rotate) {
|
||||
bool success = false;
|
||||
|
||||
i2c_master_init();
|
||||
send_cmd1(DisplayOff);
|
||||
send_cmd2(SetDisplayClockDiv, 0x80);
|
||||
send_cmd2(SetMultiPlex, DisplayHeight - 1);
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#ifndef SSD1306_H
|
||||
#define SSD1306_H
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include "pincontrol.h"
|
||||
#include "config.h"
|
||||
|
||||
enum ssd1306_cmds {
|
||||
DisplayOff = 0xAE,
|
||||
@@ -88,7 +86,3 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data);
|
||||
void matrix_write_ln(struct CharacterMatrix *matrix, const char *data);
|
||||
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
||||
void matrix_render(struct CharacterMatrix *matrix);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
79
keyboards/divergetm2/config.h
Normal file
79
keyboards/divergetm2/config.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* Copyright 2018 Christon DeWan (xton)
|
||||
* Copyright 2017 IslandMan93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x1256
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER UniKeyboard
|
||||
#define PRODUCT diverge tm2
|
||||
#define DESCRIPTION Split 46 key keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/*
|
||||
* 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 { D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* 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)) \
|
||||
)
|
||||
|
||||
|
17
keyboards/divergetm2/divergetm2.c
Normal file
17
keyboards/divergetm2/divergetm2.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2018 Christon DeWan (xton)
|
||||
* Copyright 2017 IslandMan93
|
||||
*
|
||||
* 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 "divergetm2.h"
|
74
keyboards/divergetm2/divergetm2.h
Normal file
74
keyboards/divergetm2/divergetm2.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/* Copyright 2018 Christon DeWan (xton)
|
||||
* Copyright 2017 IslandMan93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//void promicro_bootloader_jmp(bool program);
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
#ifdef USE_I2C
|
||||
#include <stddef.h>
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//void promicro_bootloader_jmp(bool program);
|
||||
|
||||
#ifndef FLIP_HALF
|
||||
// Standard Keymap
|
||||
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, R31, R32, R33, R34, R35 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ L30, L31, L32, L33, L34, KC_NO }, \
|
||||
{ R05, R04, R03, R02, R01, R00 }, \
|
||||
{ R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R25, R24, R23, R22, R21, R20 }, \
|
||||
{ R35, R34, R33, R32, R31, KC_NO } \
|
||||
}
|
||||
#else
|
||||
// Keymap with right side flipped
|
||||
// (TRRS jack on both halves are to the right)
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, R31, R32, R33, R34, R35 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ L30, L31, L32, L33, L34, KC_NO }, \
|
||||
{ R00, R01, R02, R03, R04, R05 }, \
|
||||
{ R10, R11, R12, R13, R14, R15 }, \
|
||||
{ R20, R21, R22, R23, R24, R25 }, \
|
||||
{ KC_NO, R31, R32, R33, R34, R35 } \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12_2x2u LAYOUT
|
23
keyboards/divergetm2/keymaps/default/config.h
Normal file
23
keyboards/divergetm2/keymaps/default/config.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* Copyright 2018 Christon DeWan (xton)
|
||||
* Copyright 2017 IslandMan93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
#define MASTER_RIGHT
|
||||
#define PERMISSIVE_HOLD
|
||||
#define TAPPING_TERM 150
|
200
keyboards/divergetm2/keymaps/default/keymap.c
Normal file
200
keyboards/divergetm2/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,200 @@
|
||||
/* Copyright 2018 Christon DeWan (xton)
|
||||
* Copyright 2017 IslandMan93
|
||||
*
|
||||
* 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
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK
|
||||
};
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
RESET, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
KC_NO, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
|
||||
KC_NO, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12_2x2u( \
|
||||
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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, MO(_RAISE), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
|
||||
_______, _______, _______, _______, MO(_LOWER), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ortho_4x12_2x2u( \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
#endif
|
||||
|
||||
#define SPACE_WAIT 100
|
||||
uint16_t rl_start_time = 0;
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if(rl_start_time && record->event.pressed) rl_start_time = 0;
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
set_single_persistent_default_layer(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
set_single_persistent_default_layer(1UL<<_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
set_single_persistent_default_layer(1UL<<_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
}
|
5
keyboards/divergetm2/keymaps/default/readme.md
Normal file
5
keyboards/divergetm2/keymaps/default/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# A default-ish keymap for diverge tm2
|
||||
|
||||
Actually it's a Planck layout, but I needed something for the default. :-D
|
||||
|
||||
The 2u spacebars are space when tapped, raise/lower when held.
|
0
keyboards/divergetm2/keymaps/default/rules.mk
Normal file
0
keyboards/divergetm2/keymaps/default/rules.mk
Normal file
23
keyboards/divergetm2/keymaps/xtonhasvim/config.h
Normal file
23
keyboards/divergetm2/keymaps/xtonhasvim/config.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
// help for fast typist+dual function keys?
|
||||
#define PERMISSIVE_HOLD
|
||||
// Let me type `ls -l` more quickly.
|
||||
#define TAPPING_FORCE_HOLD
|
||||
|
||||
// where is the cord plugged in?
|
||||
#define MASTER_RIGHT
|
||||
|
||||
/* speed up mousekeys a bit */
|
||||
#define MOUSEKEY_DELAY 50
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 8
|
||||
#define MOUSEKEY_TIME_TO_MAX 30
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||
|
||||
// because I'm lazy and didn't case out the rgb support
|
||||
#define RGBLED_NUM 2
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_LEVELS 3
|
155
keyboards/divergetm2/keymaps/xtonhasvim/keymap.c
Normal file
155
keyboards/divergetm2/keymaps/xtonhasvim/keymap.c
Normal file
@@ -0,0 +1,155 @@
|
||||
/* Copyright 2018 Christon DeWan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "xtonhasvim.h"
|
||||
|
||||
/************************************
|
||||
* states
|
||||
************************************/
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_MOVE,
|
||||
_MOUSE,
|
||||
_CMD
|
||||
};
|
||||
|
||||
extern uint8_t vim_cmd_layer(void) { return _CMD; }
|
||||
|
||||
enum keymap_keycodes {
|
||||
RAISE = VIM_SAFE_RANGE,
|
||||
LOWER
|
||||
};
|
||||
|
||||
/************************************
|
||||
* keymaps!
|
||||
************************************/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ctrl*| A | S | D | F | G | H | J | K | L | ;* | ' |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | chkwm| | Alt | GUI | Lower* | Raise* | SPC | GUI | | Vim |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*
|
||||
* - Ctrl acts as Esc when tapped.
|
||||
* - Holding ; switches to movement layer.
|
||||
* - Tapping raise or lower produces space.
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) , \
|
||||
LSFT(KC_LALT), MO(_MOVE), KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE, KC_SPC), KC_RGUI, KC_RALT, MO(_MOVE), VIM_START \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Bail | | | | Raise | | | Bail | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC, \
|
||||
KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \
|
||||
RESET, TO(_QWERTY), _______, _______, _______, MO(_RAISE), _______, _______, TO(_QWERTY), X_____X \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Bail | | | Lower | | | | Bail | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12_2x2u( \
|
||||
KC_GRV, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC, \
|
||||
KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||
_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \
|
||||
X_____X, TO(_QWERTY), _______, _______, MO(_LOWER), _______, _______, _______, TO(_QWERTY), RESET \
|
||||
),
|
||||
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-------------------------------------------------------------------------------------.
|
||||
* |BL Raise| | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |BL Lower| | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |BL STEP | | | | | | | Next | Vol- | Vol+ | Play | |
|
||||
* |--------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Backlite| Mouse| | | | | | | Bail | |
|
||||
* `-------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ortho_4x12_2x2u( \
|
||||
BL_INC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, \
|
||||
BL_DEC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, \
|
||||
BL_STEP, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, X_____X, \
|
||||
BL_TOGG, TO(_MOUSE), _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X \
|
||||
),
|
||||
|
||||
|
||||
/* movement layer (hold semicolon) */
|
||||
[_MOVE] = LAYOUT_ortho_4x12_2x2u( \
|
||||
TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, \
|
||||
_______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, X_____X, \
|
||||
_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, X_____X \
|
||||
),
|
||||
|
||||
/* mouse layer
|
||||
*/
|
||||
[_MOUSE] = LAYOUT_ortho_4x12_2x2u( \
|
||||
TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X , \
|
||||
_______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, \
|
||||
_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \
|
||||
_______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X \
|
||||
),
|
||||
|
||||
/* vim command layer.
|
||||
*/
|
||||
[_CMD] = LAYOUT_ortho_4x12_2x2u( \
|
||||
X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, \
|
||||
VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, \
|
||||
VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT, \
|
||||
_______, TO(_QWERTY), _______, _______, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
}
|
9
keyboards/divergetm2/keymaps/xtonhasvim/readme.md
Normal file
9
keyboards/divergetm2/keymaps/xtonhasvim/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Xton has a tiny keyboard! With Vim!
|
||||
|
||||
Based on the standard Planck layout with a few changes:
|
||||
|
||||
* Escape moved to dual-function with control.
|
||||
* Dedicated movement and mouse layers.
|
||||
* Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys.
|
||||
* Vim layers! See `users/xtonhasvim`.
|
||||
|
3
keyboards/divergetm2/keymaps/xtonhasvim/rules.mk
Normal file
3
keyboards/divergetm2/keymaps/xtonhasvim/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
MOUSEKEY_ENABLE = yes
|
||||
# BACKLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
21
keyboards/divergetm2/readme.md
Normal file
21
keyboards/divergetm2/readme.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# diverge tm2
|
||||
|
||||
A 4x6x2 split ortholinear keyboard with 2u spacebars like the Levinson (similar to Let's Split). Made by [Unikeyboard](https://unikeyboard.io).
|
||||
|
||||
Keyboard Maintainer: [IslandMan93](https://github.com/islandman93) and [xton](https://github.com/xton)
|
||||
Hardware Supported: Pro Micro
|
||||
Hardware Availability: [Diverge TM2](https://unikeyboard.io/product/diverge-tm/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make divergetm2:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
# Flashing the first time
|
||||
|
||||
Disassemble the case so you have access to each Pro Micro. Flash each half with QMK Toolbox by connecting the USB cable and shorting RST and GND. After that, just use the soft reset key on your respective layout to reflash both halves.
|
||||
|
||||
# Reflashing Animus
|
||||
|
||||
Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST) during the upload step. Then reapply your keymap through Arbites.
|
75
keyboards/divergetm2/rules.mk
Normal file
75
keyboards/divergetm2/rules.mk
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# 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 Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
SPLIT_KEYBOARD = yes
|
||||
|
||||
# must specify this to enable soft-reset
|
||||
BOOTLOADER = caterina
|
36
keyboards/ergo42/keymaps/yshrsmz/config.h
Normal file
36
keyboards/ergo42/keymaps/yshrsmz/config.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
/* auto shift config */
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
|
166
keyboards/ergo42/keymaps/yshrsmz/keymap.c
Normal file
166
keyboards/ergo42/keymaps/yshrsmz/keymap.c
Normal file
@@ -0,0 +1,166 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _BASE 0
|
||||
#define _META 1
|
||||
#define _SYMB 2
|
||||
#define _GAME 3
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
BASE = SAFE_RANGE,
|
||||
META,
|
||||
SYMB,
|
||||
GAME,
|
||||
EISU,
|
||||
KANA
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BASE
|
||||
* ,------------------------------------------------. ,------------------------------------------------.
|
||||
* | = | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | - |
|
||||
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||
* | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft |
|
||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
* | EISU | Ctrl | Alt | GUI | ESC/ |Del |Back | |Enter |Space | META | GUI |=>GAME|=>SYMB| KANA |
|
||||
* | | | | | SYMB | |Space | | | | | | | | |
|
||||
* `------------------------------------------------' `------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_BASE] = LAYOUT( \
|
||||
KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, \
|
||||
EISU, KC_LCTRL, KC_LALT, KC_LGUI, LT(_SYMB, KC_ESC),KC_DEL, KC_BSPC, KC_ENT, KC_SPC, META, KC_LGUI, TG(_GAME), TG(_SYMB), KANA \
|
||||
),
|
||||
|
||||
/* META
|
||||
* ,------------------------------------------------. ,------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | PgUp | |
|
||||
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End |Alt+← |Alt+→ | PgDn | |
|
||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |Reset | | | |
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `------------------------------------------------' `------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_META] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* SYMB
|
||||
* ,------------------------------------------------. ,------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | - |
|
||||
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | PgUp | |
|
||||
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End |Alt+← |Alt+→ | PgDn | |
|
||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |Reset | | | |
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `------------------------------------------------' `------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_SYMB] = LAYOUT( \
|
||||
KC_TILD, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), _______, _______, S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), _______, \
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* GAME
|
||||
* ,------------------------------------------------. ,------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ |
|
||||
* |------+------+------+------+------+------+------| |-------------+------+------+------+------+------|
|
||||
* | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : |
|
||||
* |------+------+------+------+------+------+------| |------|------+------+------+------+------+------|
|
||||
* | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft |
|
||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ |
|
||||
* | | | | | | | | |Space | | | | | | |
|
||||
* `------------------------------------------------' `------------------------------------------------'
|
||||
*/
|
||||
[_GAME] = LAYOUT( \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \
|
||||
KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \
|
||||
KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_BASE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case META:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_META);
|
||||
update_tri_layer(_META, _SYMB, _GAME);
|
||||
} else {
|
||||
layer_off(_META);
|
||||
update_tri_layer(_META, _SYMB, _GAME);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SYMB:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_SYMB);
|
||||
update_tri_layer(_META, _SYMB, _GAME);
|
||||
} else {
|
||||
layer_off(_SYMB);
|
||||
update_tri_layer(_META, _SYMB, _GAME);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case GAME:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_GAME);
|
||||
} else {
|
||||
layer_off(_GAME);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_LANG2);
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_LANG1);
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
4
keyboards/ergo42/keymaps/yshrsmz/rules.mk
Normal file
4
keyboards/ergo42/keymaps/yshrsmz/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
RGBLIGHT_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
|
||||
AUTO_SHIFT_ENABLE = yes
|
47
keyboards/fc660c/keymaps/dbroqua/keymap.c
Normal file
47
keyboards/fc660c/keymaps/dbroqua/keymap.c
Normal file
@@ -0,0 +1,47 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* BASE layer: Default Layer
|
||||
* ,--------------------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | | Ins |
|
||||
* |-----------------------------------------------------------------------------------------+ +-----+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | | Del |
|
||||
* |-----------------------------------------------------------------------------------------+ +-----+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |--------------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up |
|
||||
* +--------------------------------------------------------------------------------------------+-----+
|
||||
* | Ctrl | Gui | Alt | Space | Alt | Gui | Fn | Left| Down|Right|
|
||||
* `--------------------------------------------------------------------------------------------------´
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, 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_INS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL,
|
||||
KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,
|
||||
KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP,
|
||||
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT
|
||||
),
|
||||
/* FN layer
|
||||
* ,--------------------------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | |
|
||||
* |-----------------------------------------------------------------------------------------+ +-----+
|
||||
* | | | | | | | | |PrtSc| Slck| Paus| | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+ +-----+
|
||||
* | | Vol-| Vol+| Mute|Eject| | | | Home| PgUp| | | |
|
||||
* |--------------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | | | End | PgDn| | | |
|
||||
* +--------------------------------------------------------------------------------------------+-----+
|
||||
* | | | | | | | | | | |
|
||||
* `--------------------------------------------------------------------------------------------------´
|
||||
*/
|
||||
[1] = LAYOUT(
|
||||
KC_GRV, 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_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______,
|
||||
_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_EJCT,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______,
|
||||
_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,_______,KC_END, KC_PGDN,_______,_______, _______,
|
||||
_______,_______,_______, _______, _______,_______,MO(1), _______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
51
keyboards/gh60/keymaps/emiilsd/keymap.c
Normal file
51
keyboards/gh60/keymaps/emiilsd/keymap.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Copyright 2018 Funderburker
|
||||
*
|
||||
* 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
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
ISO HHKB layout:
|
||||
|
||||
* 2u Backspace
|
||||
* ISO Enter
|
||||
* split left Shift
|
||||
* split right Shift
|
||||
* Caps as Control
|
||||
* 1u/1.5u/7u/1.5u//1u bottom row
|
||||
*/
|
||||
|
||||
/* 0: QWERTY */
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, 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_NO,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
|
||||
KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT,
|
||||
KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_CAPSLOCK, KC_NO
|
||||
),
|
||||
|
||||
/* 1: Fn layer */
|
||||
[1] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_UP, _______, _______,
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
|
||||
_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_DOWN, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
23
keyboards/helix/rev2/keymaps/yshrsmz/config.h
Normal file
23
keyboards/helix/rev2/keymaps/yshrsmz/config.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/* auto shift config */
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
558
keyboards/helix/rev2/keymaps/yshrsmz/keymap.c
Normal file
558
keyboards/helix/rev2/keymaps/yshrsmz/keymap.c
Normal file
@@ -0,0 +1,558 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "bootloader.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// 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.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_FUNC,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
FUNC,
|
||||
ADJUST,
|
||||
EISU,
|
||||
KANA
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
|
||||
#if HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | - |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ESC | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Shift | Z | X | C | V | B | Fn | Fn | N | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | EISU | Ctrl | Alt | GUI |Lower |Space | Bksp |Enter |Space |Raise | GUI | Alt | Ctrl | KANA |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, FUNC, FUNC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
EISU, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KANA \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Func
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | LEFT | DOWN | UP |RIGHT | PGUP | |
|
||||
* |------+------+------+------+------+------|------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff| Mac | | Win |Qwerty| | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \
|
||||
)
|
||||
};
|
||||
|
||||
#elif HELIX_ROWS == 4
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | = | Q | W | E | R | T | | Y | U | I | O | P | - |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | EISU | Ctrl | Alt | GUI |ESC/Lower | Func | Bksp |Enter |Space |Raise | GUI | Alt | Ctrl | KANA |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT( \
|
||||
KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
EISU, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_ESC), FUNC, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KANA \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Func
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | LEFT | DOWN | UP |RIGHT | PGUP | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | Reset| | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff| Mac | | Win |Qwerty| | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \
|
||||
)
|
||||
};
|
||||
|
||||
#else
|
||||
#error "undefined keymaps"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
// Setting ADJUST layer RGB back to default
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode);
|
||||
#endif
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(16);
|
||||
#endif
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||
#endif
|
||||
TOG_STATUS = false;
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(15);
|
||||
#endif
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
TOG_STATUS = false;
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||
case RGB_MOD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG2);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG1);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
// hook point for 'led_test' keymap
|
||||
// 'default' keymap's led_test_init() is empty function, do nothing
|
||||
// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35);
|
||||
__attribute__ ((weak))
|
||||
void led_test_init(void) {}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
led_test_init();
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
#define L_LOWER (1<<_LOWER)
|
||||
#define L_RAISE (1<<_RAISE)
|
||||
#define L_FUNC (1<<_FUNC)
|
||||
#define L_ADJUST (1<<_ADJUST)
|
||||
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
|
||||
|
||||
static void render_logo(struct CharacterMatrix *matrix) {
|
||||
|
||||
static char logo[]={
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||
0};
|
||||
matrix_write(matrix, logo);
|
||||
//matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
// Render to mode icon
|
||||
static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
matrix_write(matrix, logo[0][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, logo[0][1]);
|
||||
}else{
|
||||
matrix_write(matrix, logo[1][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, logo[1][1]);
|
||||
}
|
||||
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
char buf[40];
|
||||
snprintf(buf,sizeof(buf), "Undef-%ld", layer_state);
|
||||
matrix_write_P(matrix, PSTR("\nLayer: "));
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
matrix_write_P(matrix, PSTR("Default"));
|
||||
break;
|
||||
case L_RAISE:
|
||||
matrix_write_P(matrix, PSTR("Raise"));
|
||||
break;
|
||||
case L_LOWER:
|
||||
matrix_write_P(matrix, PSTR("Lower"));
|
||||
break;
|
||||
case L_FUNC:
|
||||
matrix_write_P(matrix, PSTR("Func"));
|
||||
break;
|
||||
case L_ADJUST:
|
||||
case L_ADJUST_TRI:
|
||||
matrix_write_P(matrix, PSTR("Adjust"));
|
||||
break;
|
||||
default:
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
char led[40];
|
||||
snprintf(led, sizeof(led), "\n%s %s %s",
|
||||
(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
|
||||
(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
|
||||
(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
|
||||
matrix_write(matrix, led);
|
||||
}
|
||||
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if(is_master){
|
||||
render_status(&matrix);
|
||||
}else{
|
||||
render_logo(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
25
keyboards/helix/rev2/keymaps/yshrsmz/readme.md
Normal file
25
keyboards/helix/rev2/keymaps/yshrsmz/readme.md
Normal file
@@ -0,0 +1,25 @@
|
||||
SSD1306 OLED Display via I2C
|
||||
======
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Some features supported by the firmware:
|
||||
|
||||
|
||||
* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this
|
||||
requires pull-up resistors on the data and clock lines.
|
||||
* OLED display will connect from either side
|
||||
|
||||
|
||||
Wiring
|
||||
------
|
||||
|
||||
|
||||
Work in progress...
|
||||
|
||||
|
||||
OLED Configuration
|
||||
-------------------------------
|
||||
|
||||
Work in progress...
|
121
keyboards/helix/rev2/keymaps/yshrsmz/rules.mk
Normal file
121
keyboards/helix/rev2/keymaps/yshrsmz/rules.mk
Normal file
@@ -0,0 +1,121 @@
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
|
||||
define HELIX_CUSTOMISE_MSG
|
||||
$(info Helix customize)
|
||||
$(info - OLED_ENABLE=$(OLED_ENABLE))
|
||||
$(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE))
|
||||
$(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
|
||||
$(info - LED_ANIMATION=$(LED_ANIMATIONS))
|
||||
$(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
|
||||
endef
|
||||
|
||||
# Helix keyboard customize
|
||||
# you can edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集します。
|
||||
HELIX_ROWS = 4 # Helix Rows is 4 or 5
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
LED_ANIMATIONS = no # LED animations
|
||||
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
|
||||
#### Do not enable these with audio at the same time.
|
||||
|
||||
### Helix keyboard 'default' keymap: convenient command line option
|
||||
## make HELIX=<options> helix:defualt
|
||||
## option= oled | back | under | na | ios
|
||||
## ex.
|
||||
## make HELIX=oled helix:defualt
|
||||
## make HELIX=oled,back helix:defualt
|
||||
## make HELIX=oled,under helix:defualt
|
||||
## make HELIX=oled,back,na helix:defualt
|
||||
## make HELIX=oled,back,ios helix:defualt
|
||||
##
|
||||
ifneq ($(strip $(HELIX)),)
|
||||
ifeq ($(findstring oled,$(HELIX)), oled)
|
||||
OLED_ENABLE = yes
|
||||
endif
|
||||
ifeq ($(findstring back,$(HELIX)), back)
|
||||
LED_BACK_ENABLE = yes
|
||||
else ifeq ($(findstring under,$(HELIX)), under)
|
||||
LED_UNDERGLOW_ENABLE = yes
|
||||
endif
|
||||
ifeq ($(findstring na,$(HELIX)), na)
|
||||
LED_ANIMATIONS = no
|
||||
endif
|
||||
ifeq ($(findstring ios,$(HELIX)), ios)
|
||||
IOS_DEVICE_ENABLE = yes
|
||||
endif
|
||||
$(eval $(call HELIX_CUSTOMISE_MSG))
|
||||
$(info )
|
||||
endif
|
||||
|
||||
# Uncomment these for checking
|
||||
# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。
|
||||
# $(eval $(call HELIX_CUSTOMISE_MSG))
|
||||
# $(info )
|
||||
|
||||
ifneq ($(strip $(HELIX_ROWS)), 4)
|
||||
ifneq ($(strip $(HELIX_ROWS)), 5)
|
||||
$(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value)
|
||||
endif
|
||||
endif
|
||||
OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS))
|
||||
|
||||
ifeq ($(strip $(LED_BACK_ENABLE)), yes)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_BACK
|
||||
ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
|
||||
$(eval $(call HELIX_CUSTOMISE_MSG))
|
||||
$(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
|
||||
endif
|
||||
else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
else
|
||||
RGBLIGHT_ENABLE = no
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DIOS_DEVICE_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
OPT_DEFS += -DOLED_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
||||
OPT_DEFS += -DLOCAL_GLCDFONT
|
||||
endif
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
# Uncomment these for debugging
|
||||
# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
|
||||
# $(info -- OPT_DEFS=$(OPT_DEFS))
|
||||
# $(info )
|
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
, , , , , , ,PGDN,PGUP, , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,TILD,PIPE,MINS,PLUS, , LEFT,DOWN, UP ,RGHT, , ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
@@ -59,9 +59,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
, , , , , , , , , , ,F12 ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
, , , , , , MUTE,VOLD,VOLU, , , ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
, , , , , , , , , , , , , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
|
49
keyboards/jj40/keymaps/like_jis/config.h
Normal file
49
keyboards/jj40/keymaps/like_jis/config.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#define MOUSEKEY_INTERVAL 5
|
||||
|
||||
#undef MOUSEKEY_TIME_TO_MAX
|
||||
#define MOUSEKEY_TIME_TO_MAX 150
|
||||
|
||||
#undef MOUSEKEY_MAX_SPEED
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
|
||||
#undef MOUSEKEY_MOVE_DELTA
|
||||
#define MOUSEKEY_MOVE_DELTA 3
|
||||
|
||||
#undef MOUSEKEY_DELAY
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#endif
|
||||
|
||||
#undef BACKLIGHT_LEVELS
|
||||
#define BACKLIGHT_LEVELS 15
|
||||
// #undef BACKLIGHT_LEVELS
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #undef BREATHING_PERIOD
|
||||
// #define BREATHING_PERIOD 4
|
200
keyboards/jj40/keymaps/like_jis/keymap.c
Normal file
200
keyboards/jj40/keymaps/like_jis/keymap.c
Normal file
@@ -0,0 +1,200 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
RGBRST
|
||||
};
|
||||
|
||||
#define KC______ KC_TRNS
|
||||
#define KC_XXXXX KC_NO
|
||||
#define KC_KANJI KC_GRV
|
||||
|
||||
#define KC_LOWER LOWER
|
||||
#define KC_RAISE RAISE
|
||||
#define KC_ADJST ADJUST
|
||||
|
||||
#define KC_RST RESET
|
||||
|
||||
#define KC_LRST RGBRST
|
||||
#define KC_LTOG RGB_TOG
|
||||
#define KC_LHUI RGB_HUI
|
||||
#define KC_LHUD RGB_HUD
|
||||
#define KC_LSAI RGB_SAI
|
||||
#define KC_LSAD RGB_SAD
|
||||
#define KC_LVAI RGB_VAI
|
||||
#define KC_LVAD RGB_VAD
|
||||
#define KC_LSMOD RGB_SMOD
|
||||
#define KC_BTOG BL_TOGG
|
||||
#define KC_BINC BL_INC
|
||||
#define KC_BDEC BL_DEC
|
||||
// #define KC_BRTG BL_BRTG
|
||||
|
||||
#define KC_KNRM AG_NORM
|
||||
#define KC_KSWP AG_SWAP
|
||||
|
||||
// Layer Mode aliases
|
||||
// #define KC_L_LO MO(_LOWER)
|
||||
// #define KC_L_RA MO(_RAISE)
|
||||
// #define KC_L_AD MO(_ADJUST)
|
||||
#define KC_TBSF LSFT_T(KC_TAB)
|
||||
// #define KC_SPSF LSFT_T(KC_SPC)
|
||||
// #define KC_GUAP LALT_T(KC_APP)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = KC_LAYOUT_ortho_4x12( \
|
||||
//,-----------------------------------------------------------------------------------.
|
||||
ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
TBSF, A, S, D, F, G, H, J, K, L, SCLN, ENT,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
LSFT, Z, X, C, V, B, N, M, COMM, DOT, UP, RSFT,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
LCTRL, LALT, LGUI, ADJST, LOWER, BSPC, SPC, RAISE, APP, LEFT, DOWN, RGHT \
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_LOWER] = KC_LAYOUT_ortho_4x12( \
|
||||
//,-----------------------------------------------------------------------------------.
|
||||
TAB, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
_____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
_____, F11, F12, XXXXX, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
_____, _____, _____, _____, _____, DEL, _____, _____, _____, _____, _____, _____ \
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_RAISE] = KC_LAYOUT_ortho_4x12( \
|
||||
//,-----------------------------------------------------------------------------------.
|
||||
_____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
_____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 4, 5, 6, QUOT, PLUS,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
_____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, SLSH,\
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
_____, _____, _____, _____, _____, BSPC, _____, _____, _____, _____, _____, _____ \
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_ADJUST] = KC_LAYOUT_ortho_4x12( \
|
||||
//,-----------------------------------------------------------------------------------.
|
||||
XXXXX, RST, LRST, KNRM, KSWP, XXXXX, XXXXX, WH_L, WH_U, HOME, PGUP, XXXXX,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
XXXXX, LTOG, LHUI, LSAI, LVAI, BTOG, BINC, WH_R, WH_D, END, PGDN, XXXXX,\
|
||||
//|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
XXXXX, LSMOD, LHUD, LSAD, LVAD, XXXXX, BDEC, XXXXX, BTN1, BTN2, MS_U, XXXXX,\
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
_____, _____, _____, _____, _____, XXXXX, XXXXX, _____, _____, MS_L, MS_D, MS_R \
|
||||
//|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
extern backlight_config_t backlight_config;
|
||||
|
||||
inline void enable_backright(bool on) {
|
||||
backlight_config.enable = on;
|
||||
if (backlight_config.raw == 1) // enabled but level = 0
|
||||
backlight_config.level = 1;
|
||||
eeconfig_update_backlight(backlight_config.raw);
|
||||
// dprintf("backlight toggle: %u\n", backlight_config.enable);
|
||||
backlight_set(backlight_config.enable ? backlight_config.level : 0);
|
||||
}
|
||||
|
||||
uint8_t bl_breath_count;
|
||||
uint8_t bl_breath_speed = 10;
|
||||
int8_t bl_breath_updown = 1;
|
||||
bool bl_breath_on;
|
||||
backlight_config_t bl_breath_backup;
|
||||
|
||||
void bl_breath_start(uint8_t speed) {
|
||||
|
||||
bl_breath_on = true;
|
||||
bl_breath_speed = speed;
|
||||
bl_breath_backup = backlight_config;
|
||||
}
|
||||
|
||||
void bl_breath_end(void) {
|
||||
|
||||
bl_breath_on = false;
|
||||
backlight_config = bl_breath_backup;
|
||||
eeconfig_update_backlight(backlight_config.raw);
|
||||
backlight_set(backlight_config.enable ? backlight_config.level : 0);
|
||||
}
|
||||
|
||||
void bl_breath_update(void) {
|
||||
|
||||
if (bl_breath_on) {
|
||||
++bl_breath_count;
|
||||
if (bl_breath_count > bl_breath_speed) {
|
||||
bl_breath_count = 0;
|
||||
|
||||
backlight_config.level += bl_breath_updown;
|
||||
bl_breath_updown = (backlight_config.level > BACKLIGHT_LEVELS) ? -1 :
|
||||
(backlight_config.level <= 0) ? 1 :
|
||||
bl_breath_updown;
|
||||
enable_backright(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define BL_BREATH_START bl_breath_start
|
||||
#define BL_BREATH_END bl_breath_end
|
||||
#define BL_BREATH_UPDATE bl_breath_update
|
||||
|
||||
#else
|
||||
|
||||
#define BL_BREATH_START(a)
|
||||
#define BL_BREATH_END()
|
||||
#define BL_BREATH_UPDATE()
|
||||
#endif
|
||||
|
||||
// Loop
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
BL_BREATH_UPDATE();
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
BL_BREATH_START(50);
|
||||
layer_on(_LOWER);
|
||||
} else {
|
||||
BL_BREATH_END();
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
BL_BREATH_START(100);
|
||||
layer_on(_RAISE);
|
||||
} else {
|
||||
BL_BREATH_END();
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
5
keyboards/jj40/keymaps/like_jis/rules.mk
Normal file
5
keyboards/jj40/keymaps/like_jis/rules.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
MOUSEKEY_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
@@ -4,7 +4,8 @@ A WKL Hot Swap Double USB C 60%
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: KBD6x PCB
|
||||
Hardware Availability: [KBDFans](https://kbdfans.cn/products/kbd6x-wkl-hot-swap-60-double-type-c-pcb)
|
||||
Hardware Availability: [KBDFans](https://kbdfans.cn/products/kbd6x-wkl-hot-swap-60-double-type-c-pcb)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make kbd6x:default
|
||||
|
@@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
|
@@ -20,6 +20,11 @@ enum custom_keycodes {
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Aliases to make the keymap more uniform
|
||||
#define GUI_END GUI_T(KC_END)
|
||||
#define MED_DEL LT(_MEDIA, KC_DEL)
|
||||
#define KPD_ENT LT(_KEYPAD, KC_ENT)
|
||||
|
||||
/*
|
||||
|
||||
Function Keys on All Layers (Keypad toggles):
|
||||
@@ -96,9 +101,9 @@ enum custom_keycodes {
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || | | | | | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || | Mute | Vol- | Vol+ | | |
|
||||
| | | Mute | Vol- | Vol+ | || | | | | | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || Stop | Prev | Play | Next | Sel | |
|
||||
| | Stop | Prev | Play | Next | Sel || | | | | | |
|
||||
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||
| | | | | | | | | |
|
||||
`---------------------------' `---------------------------'
|
||||
@@ -116,12 +121,12 @@ enum custom_keycodes {
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| Sleep | | | | | || | KP 7 | KP 8 | KP 9 | KP - | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| Wake | |QWERTY|Colemk|Dvorak| || | KP 4 | KP 5 | KP 6 | KP + | |
|
||||
| Wake | | Mute | Vol- | Vol+ | || | KP 4 | KP 5 | KP 6 | KP + | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||
| | Stop | Prev | Play | Next | Sel || | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||
| | | | | | | | KP . |KP Ent| |
|
||||
`---------------------------' `----------------------------------'
|
||||
| |QWERTY|Colemk|Dvorak| | | | KP . |KP Ent|
|
||||
`---------------------------' `---------------------------'
|
||||
,-------------.,-------------.
|
||||
| | || | |
|
||||
,------|------|------||------+------+------.
|
||||
@@ -144,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left Thumb
|
||||
KC_LCTL, KC_LALT,
|
||||
KC_HOME,
|
||||
KC_BSPC, LT(_MEDIA, KC_DEL), KC_END,
|
||||
KC_BSPC, MED_DEL, GUI_END,
|
||||
|
||||
// Right Hand
|
||||
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET,
|
||||
@@ -156,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Right Thumb
|
||||
KC_RGUI, KC_RCTL,
|
||||
KC_PGUP,
|
||||
KC_PGDN, LT(_KEYPAD, KC_ENT), KC_SPC
|
||||
KC_PGDN, KPD_ENT, KC_SPC
|
||||
),
|
||||
|
||||
[_QWERTY] = LAYOUT (
|
||||
@@ -170,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left Thumb
|
||||
KC_LCTL, KC_LALT,
|
||||
KC_HOME,
|
||||
KC_BSPC, LT(_MEDIA, KC_DEL), KC_END,
|
||||
KC_BSPC, MED_DEL, KC_END,
|
||||
|
||||
// Right Hand
|
||||
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET,
|
||||
@@ -182,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Right Thumb
|
||||
KC_RGUI, KC_RCTL,
|
||||
KC_PGUP,
|
||||
KC_PGDN, LT(_KEYPAD, KC_ENT), KC_SPC
|
||||
KC_PGDN, KPD_ENT, KC_SPC
|
||||
),
|
||||
|
||||
[_COLEMAK] = LAYOUT (
|
||||
@@ -196,7 +201,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left Thumb
|
||||
KC_LCTL, KC_LALT,
|
||||
KC_HOME,
|
||||
KC_BSPC, LT(_MEDIA, KC_DEL), KC_END,
|
||||
KC_BSPC, MED_DEL, KC_END,
|
||||
|
||||
// Right Hand
|
||||
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KEYPAD), RESET,
|
||||
@@ -208,7 +213,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Right Thumb
|
||||
KC_RGUI, KC_RCTL,
|
||||
KC_PGUP,
|
||||
KC_PGDN, LT(_KEYPAD, KC_ENT), KC_SPC
|
||||
KC_PGDN, KPD_ENT, KC_SPC
|
||||
),
|
||||
|
||||
[_MEDIA] = LAYOUT (
|
||||
@@ -216,8 +221,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______,
|
||||
_______, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL,
|
||||
_______, _______, _______, _______,
|
||||
// Left Thumb
|
||||
_______, _______,
|
||||
@@ -228,8 +233,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
|
||||
KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
// Right Thumb
|
||||
_______, _______,
|
||||
@@ -242,9 +247,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_PWR, _______, _______, _______, _______, _______,
|
||||
KC_SLEP, _______, _______, _______, _______, _______,
|
||||
KC_WAKE, _______, QWERTY, COLEMAK, DVORAK, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
KC_WAKE, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______,
|
||||
_______, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL,
|
||||
_______, QWERTY, COLEMAK, DVORAK,
|
||||
// Left Thumb
|
||||
_______, _______,
|
||||
_______,
|
||||
|
@@ -4,19 +4,17 @@
|
||||
|
||||
The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my QMK Kinesis.
|
||||
|
||||
~~After a year of using a planck, I've become accustomed to my / and ? being above the - key, so I've decided to move my [, ], and = to the normal Advantage location and set the two keys above the - to new locations. I'll play with it for a while and see how I like it.~~ I didn't like it, so I've switched back.
|
||||
|
||||
The QWERTY layout shown here is based entirely on the Kinesis Advantage layout. The Colemak layout is merely an adaptation of that.
|
||||
|
||||
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
|
||||
|
||||
As of August 4 2018, I've got the LEDs working ... mostly. Caps Lock and Num Lock LEDs work for me. The Scroll Lock LED does work on my keyboard, but I can't get it to work when I use the Scroll Lock key on my keyboard. I also have no idea how to get the Num Pad LED working when I switch to the Numpad layer.
|
||||
Depending on the OS, most of the LEDs are now working in this keymap, but I still have yet to get the Num Pad LED working when switching to the Numpad layer.
|
||||
|
||||
## Still to do:
|
||||
|
||||
* Figure out how to make the Numpad and ScrLck LEDs work properly.
|
||||
* Figure out how to make the Numpad LED work properly.
|
||||
|
||||
### Function Keys on All Layers (keypad toggles):
|
||||
### Function Keys on All Layers (`keypad` toggles to the keypad layer):
|
||||
,-----------------------------------------------------------------.
|
||||
| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 |
|
||||
`-----------------------------------------------------------------'
|
||||
@@ -94,9 +92,9 @@ As of August 4 2018, I've got the LEDs working ... mostly. Caps Lock and Num Loc
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || | | | | | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || | Mute | Vol- | Vol+ | | |
|
||||
| | | Mute | Vol- | Vol+ | || | | | | | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || Stop | Prev | Play | Next | Sel | |
|
||||
| | Stop | Prev | Play | Next | Sel || | | | | | |
|
||||
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||
| | | | | | | | | |
|
||||
`---------------------------' `---------------------------'
|
||||
@@ -117,12 +115,12 @@ As of August 4 2018, I've got the LEDs working ... mostly. Caps Lock and Num Loc
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| Sleep | | | | | || | KP 7 | KP 8 | KP 9 | KP - | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| Wake | |QWERTY|Colemk|Dvorak| || | KP 4 | KP 5 | KP 6 | KP + | |
|
||||
| Wake | | Mute | Vol- | Vol+ | || | KP 4 | KP 5 | KP 6 | KP + | |
|
||||
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||
| | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||
| | Stop | Prev | Play | Next | Sel || | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||
| | | | | | | | KP . |KP Ent| |
|
||||
`---------------------------' `----------------------------------'
|
||||
| |QWERTY|Colemk|Dvorak| | | | KP . |KP Ent|
|
||||
`---------------------------' `---------------------------'
|
||||
,-------------.,-------------.
|
||||
| | || | |
|
||||
,------|------|------||------+------+------.
|
||||
|
@@ -2,11 +2,11 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
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 = yes # Commands for debug and configuration
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
|
35
keyboards/lets_split/keymaps/yshrsmz/config.h
Normal file
35
keyboards/lets_split/keymaps/yshrsmz/config.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* auto shift config */
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define EE_HANDS
|
180
keyboards/lets_split/keymaps/yshrsmz/keymap.c
Normal file
180
keyboards/lets_split/keymaps/yshrsmz/keymap.c
Normal file
@@ -0,0 +1,180 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _FUNC 3
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
FUNC,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | GUI |Shift |Adjust| Fn |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12( \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
|
||||
FUNC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RSFT, ADJUST, FUNC \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12( \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* FUNC
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | F11 | F12 | | | | LEFT | DOWN | UP |RIGHT | PGUP | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = LAYOUT_ortho_4x12( \
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \
|
||||
_______, KC_F11, KC_F12, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ortho_4x12( \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
1
keyboards/lets_split/keymaps/yshrsmz/rules.mk
Normal file
1
keyboards/lets_split/keymaps/yshrsmz/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
AUTO_SHIFT_ENABLE = yes
|
35
keyboards/levinson/keymaps/xtonhasvim/config.h
Normal file
35
keyboards/levinson/keymaps/xtonhasvim/config.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#define USE_SERIAL
|
||||
|
||||
// #define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
// #define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
// help for fast typist+dual function keys?
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
// where is the cord plugged in?
|
||||
#define MASTER_LEFT
|
237
keyboards/levinson/keymaps/xtonhasvim/keymap.c
Normal file
237
keyboards/levinson/keymaps/xtonhasvim/keymap.c
Normal file
@@ -0,0 +1,237 @@
|
||||
/* Copyright 2015-2017 Christon DeWan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "xtonhasvim.h"
|
||||
#include "fancylighting.h"
|
||||
|
||||
/************************************
|
||||
* states
|
||||
************************************/
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_MOVE,
|
||||
_MOUSE,
|
||||
_CMD
|
||||
};
|
||||
|
||||
extern uint8_t vim_cmd_layer(void) { return _CMD; }
|
||||
|
||||
/************************************
|
||||
* keymaps!
|
||||
************************************/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ctrl*| A* | S | D | F | G | H | J | K | L | ;* | ' |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | chkwm| | Alt | GUI |Lower*| Sp|ace |Raise*| SPC | GUI | | Vim |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*
|
||||
* - Ctrl acts as Esc when tapped.
|
||||
* - Holding A or ; switches to movement layer.
|
||||
* - Raise and Lower are one-shot layers.
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12( \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) , \
|
||||
LSFT(KC_LALT), MO(_MOVE), KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_RGUI, KC_RALT, MO(_MOVE), VIM_START \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Bail | | | | | |Raise | | | Bail | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12( \
|
||||
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC, \
|
||||
KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \
|
||||
RESET, TO(_QWERTY), _______, _______, _______, _______, _______, MO(_RAISE), _______, _______, TO(_QWERTY), X_____X \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Bail | | |Lower | | | | | | Bail | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12( \
|
||||
KC_GRV, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC, \
|
||||
KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||
_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \
|
||||
X_____X, TO(_QWERTY), _______, _______, MO(_LOWER), _______, _______, _______, _______, _______, TO(_QWERTY), RESET \
|
||||
),
|
||||
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-------------------------------------------------------------------------------------.
|
||||
* |BL Raise| | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |BL Lower| | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |BL STEP | | | | | | | Next | Vol- | Vol+ | Play | |
|
||||
* |--------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Backlite| Bail | | | | | | | | | Bail | |
|
||||
* `-------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ortho_4x12( \
|
||||
BL_INC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, RGB_MODE_PLAIN, \
|
||||
BL_DEC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, RGB_MODE_REVERSE, \
|
||||
BL_STEP, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, RGB_MODE_FORWARD, \
|
||||
BL_TOGG, TO(_MOUSE), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), RGB_TOG \
|
||||
),
|
||||
|
||||
|
||||
/* movement layer (hold semicolon) */
|
||||
[_MOVE] = LAYOUT_ortho_4x12( \
|
||||
TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, \
|
||||
_______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, X_____X, \
|
||||
_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \
|
||||
_______, _______, _______, _______, _______, X_____X, X_____X, _______, _______, _______, _______, X_____X \
|
||||
),
|
||||
|
||||
/* mouse layer
|
||||
*/
|
||||
[_MOUSE] = LAYOUT_ortho_4x12( \
|
||||
TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X, \
|
||||
_______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, \
|
||||
_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \
|
||||
_______, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X \
|
||||
),
|
||||
|
||||
/* vim command layer.
|
||||
*/
|
||||
[_CMD] = LAYOUT_ortho_4x12( \
|
||||
X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, \
|
||||
VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, \
|
||||
VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT, \
|
||||
_______, TO(_QWERTY), _______, _______, X_____X, X_____X, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define C_RED 0xFF, 0x00, 0x00
|
||||
#define C_GRN 0x00, 0xFF, 0x00
|
||||
#define C_BLU 0x00, 0x00, 0xFF
|
||||
|
||||
#define C_YAN 0x00, 0xFF, 0xFF
|
||||
#define C_PRP 0x7A, 0x00, 0xFF
|
||||
#define C_ORG 0xFF, 0x93, 0x00
|
||||
|
||||
void rgbflag(uint8_t r, uint8_t g, uint8_t b, uint8_t rr, uint8_t gg, uint8_t bb) {
|
||||
LED_TYPE *target_led = user_rgb_mode ? shadowed_led : led;
|
||||
for (int i = 0; i < RGBLED_NUM; i++) {
|
||||
switch (i) {
|
||||
case 10: case 11:
|
||||
target_led[i].r = r;
|
||||
target_led[i].g = g;
|
||||
target_led[i].b = b;
|
||||
break;
|
||||
case 0: case 1:
|
||||
target_led[i].r = rr;
|
||||
target_led[i].g = gg;
|
||||
target_led[i].b = bb;
|
||||
break;
|
||||
default:
|
||||
target_led[i].r = 0;
|
||||
target_led[i].g = 0;
|
||||
target_led[i].b = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void set_state_leds(void) {
|
||||
if (rgblight_get_mode() == 1) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _RAISE:
|
||||
rgbflag(C_BLU, C_GRN);
|
||||
break;
|
||||
case _LOWER:
|
||||
rgbflag(C_BLU, C_RED);
|
||||
break;
|
||||
case _ADJUST:
|
||||
rgbflag(C_BLU, C_PRP);
|
||||
break;
|
||||
case _MOVE:
|
||||
rgbflag(C_RED, C_PRP);
|
||||
break;
|
||||
case _MOUSE:
|
||||
rgbflag(C_RED, C_GRN);
|
||||
break;
|
||||
case _CMD:
|
||||
switch(vstate) {
|
||||
case VIM_V:
|
||||
case VIM_VI:
|
||||
case VIM_VS:
|
||||
rgbflag(C_GRN, C_YAN);
|
||||
break;
|
||||
case VIM_C:
|
||||
case VIM_CI:
|
||||
rgbflag(C_GRN, C_ORG);
|
||||
break;
|
||||
case VIM_D:
|
||||
case VIM_DI:
|
||||
rgbflag(C_GRN, C_RED);
|
||||
break;
|
||||
case VIM_G:
|
||||
rgbflag(C_GRN, C_BLU);
|
||||
break;
|
||||
case VIM_Y:
|
||||
rgbflag(C_GRN, C_PRP);
|
||||
break;
|
||||
case VIM_START:
|
||||
default:
|
||||
rgbflag(C_GRN, C_GRN);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
rgbflag(C_YAN, C_YAN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
}
|
9
keyboards/levinson/keymaps/xtonhasvim/readme.md
Normal file
9
keyboards/levinson/keymaps/xtonhasvim/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Xton has a tiny keyboard! With Vim!
|
||||
|
||||
Based on the standard Planck layout with a few changes:
|
||||
|
||||
* Escape moved to dual-function with control.
|
||||
* Dedicated movement and mouse layers.
|
||||
* Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys.
|
||||
* Vim layers! See `users/xtonhasvim`.
|
||||
|
5
keyboards/levinson/keymaps/xtonhasvim/rules.mk
Normal file
5
keyboards/levinson/keymaps/xtonhasvim/rules.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
# MOUSEKEY_ENABLE = yes
|
||||
# BACKLIGHT_ENABLE = yes
|
||||
# AUDIO_ENABLE = no
|
||||
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
203
keyboards/massdrop/ctrl/keymaps/mac/keymap.c
Normal file
203
keyboards/massdrop/ctrl/keymaps/mac/keymap.c
Normal file
@@ -0,0 +1,203 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum ctrl_keycodes {
|
||||
L_BRI = SAFE_RANGE, //LED Brightness Increase
|
||||
L_BRD, //LED Brightness Decrease
|
||||
L_PTN, //LED Pattern Select Next
|
||||
L_PTP, //LED Pattern Select Previous
|
||||
L_PSI, //LED Pattern Speed Increase
|
||||
L_PSD, //LED Pattern Speed Decrease
|
||||
L_T_MD, //LED Toggle Mode
|
||||
L_T_ONF, //LED Toggle On / Off
|
||||
L_ON, //LED On
|
||||
L_OFF, //LED Off
|
||||
L_T_BR, //LED Toggle Breath Effect
|
||||
L_T_PTD, //LED Toggle Scrolling Pattern Direction
|
||||
U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
|
||||
U_T_AGCR, //USB Toggle Automatic GCR control
|
||||
DBG_TOG, //DEBUG Toggle On / Off
|
||||
DBG_MTRX, //DEBUG Toggle Matrix Prints
|
||||
DBG_KBD, //DEBUG Toggle Keyboard Prints
|
||||
DBG_MOU, //DEBUG Toggle Mouse Prints
|
||||
};
|
||||
|
||||
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
|
||||
|
||||
keymap_config_t keymap_config;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
||||
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_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \
|
||||
L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \
|
||||
L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, KC_TRNS, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
|
||||
),
|
||||
/*
|
||||
[X] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
};
|
||||
|
||||
#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT))
|
||||
#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL))
|
||||
#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT))
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case L_BRI:
|
||||
if (record->event.pressed) {
|
||||
if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
|
||||
else gcr_desired += LED_GCR_STEP;
|
||||
if (led_animation_breathing) gcr_breathe = gcr_desired;
|
||||
}
|
||||
return false;
|
||||
case L_BRD:
|
||||
if (record->event.pressed) {
|
||||
if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
|
||||
else gcr_desired -= LED_GCR_STEP;
|
||||
if (led_animation_breathing) gcr_breathe = gcr_desired;
|
||||
}
|
||||
return false;
|
||||
case L_PTN:
|
||||
if (record->event.pressed) {
|
||||
if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
|
||||
else led_animation_id++;
|
||||
}
|
||||
return false;
|
||||
case L_PTP:
|
||||
if (record->event.pressed) {
|
||||
if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
|
||||
else led_animation_id--;
|
||||
}
|
||||
return false;
|
||||
case L_PSI:
|
||||
if (record->event.pressed) {
|
||||
led_animation_speed += ANIMATION_SPEED_STEP;
|
||||
}
|
||||
return false;
|
||||
case L_PSD:
|
||||
if (record->event.pressed) {
|
||||
led_animation_speed -= ANIMATION_SPEED_STEP;
|
||||
if (led_animation_speed < 0) led_animation_speed = 0;
|
||||
}
|
||||
return false;
|
||||
case L_T_MD:
|
||||
if (record->event.pressed) {
|
||||
led_lighting_mode++;
|
||||
if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
|
||||
}
|
||||
return false;
|
||||
case L_T_ONF:
|
||||
if (record->event.pressed) {
|
||||
led_enabled = !led_enabled;
|
||||
I2C3733_Control_Set(led_enabled);
|
||||
}
|
||||
return false;
|
||||
case L_ON:
|
||||
if (record->event.pressed) {
|
||||
led_enabled = 1;
|
||||
I2C3733_Control_Set(led_enabled);
|
||||
}
|
||||
return false;
|
||||
case L_OFF:
|
||||
if (record->event.pressed) {
|
||||
led_enabled = 0;
|
||||
I2C3733_Control_Set(led_enabled);
|
||||
}
|
||||
return false;
|
||||
case L_T_BR:
|
||||
if (record->event.pressed) {
|
||||
led_animation_breathing = !led_animation_breathing;
|
||||
if (led_animation_breathing)
|
||||
{
|
||||
gcr_breathe = gcr_desired;
|
||||
led_animation_breathe_cur = BREATHE_MIN_STEP;
|
||||
breathe_dir = 1;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case L_T_PTD:
|
||||
if (record->event.pressed) {
|
||||
led_animation_direction = !led_animation_direction;
|
||||
}
|
||||
return false;
|
||||
case U_T_AUTO:
|
||||
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||
usb_extra_manual = !usb_extra_manual;
|
||||
CDC_print("USB extra port manual mode ");
|
||||
CDC_print(usb_extra_manual ? "enabled" : "disabled");
|
||||
CDC_print("\r\n");
|
||||
}
|
||||
return false;
|
||||
case U_T_AGCR:
|
||||
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||
usb_gcr_auto = !usb_gcr_auto;
|
||||
CDC_print("USB GCR auto mode ");
|
||||
CDC_print(usb_gcr_auto ? "enabled" : "disabled");
|
||||
CDC_print("\r\n");
|
||||
}
|
||||
return false;
|
||||
case DBG_TOG:
|
||||
if (record->event.pressed) {
|
||||
debug_enable = !debug_enable;
|
||||
CDC_print("Debug mode ");
|
||||
CDC_print(debug_enable ? "enabled" : "disabled");
|
||||
CDC_print("\r\n");
|
||||
}
|
||||
return false;
|
||||
case DBG_MTRX:
|
||||
if (record->event.pressed) {
|
||||
debug_matrix = !debug_matrix;
|
||||
CDC_print("Debug matrix ");
|
||||
CDC_print(debug_matrix ? "enabled" : "disabled");
|
||||
CDC_print("\r\n");
|
||||
}
|
||||
return false;
|
||||
case DBG_KBD:
|
||||
if (record->event.pressed) {
|
||||
debug_keyboard = !debug_keyboard;
|
||||
CDC_print("Debug keyboard ");
|
||||
CDC_print(debug_keyboard ? "enabled" : "disabled");
|
||||
CDC_print("\r\n");
|
||||
}
|
||||
return false;
|
||||
case DBG_MOU:
|
||||
if (record->event.pressed) {
|
||||
debug_mouse = !debug_mouse;
|
||||
CDC_print("Debug mouse ");
|
||||
CDC_print(debug_mouse ? "enabled" : "disabled");
|
||||
CDC_print("\r\n");
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return true; //Process all other keycodes normally
|
||||
}
|
||||
}
|
@@ -1,12 +1,21 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#ifdef MITOSIS_DATAGROK_SLOWUART
|
||||
// This is the highest possible baud rate that a pro micro clocked at 8Mhz can
|
||||
// support without errors. I don't notice any difference in behavior at this
|
||||
// slower speed. (So I think it should maybe be the default, to allow a single
|
||||
// codebase to support both available flavors of pro micro.) This requires a
|
||||
// corresponding change to the wireless module firmware; see
|
||||
// https://github.com/reversebias/mitosis/pull/10
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
#endif
|
||||
|
||||
// I want to place an underscore as tap behavior on the right shift key. But
|
||||
// RSFT_T(KC_UNDS) doesn't work; mod-tap doesn't work with pre-shifted keys. So
|
||||
// instead we take advantage of Space Cadet Shift that does something similar
|
||||
// and just tweak it to use the -_ key instead of 0) See
|
||||
// instead I take advantage of Space Cadet Shift that does something similar
|
||||
// and just tweak it to use the -/_ key instead of 0/). See
|
||||
// https://github.com/qmk/qmk_firmware/pull/2055
|
||||
#define RSPC_KEY KC_MINS
|
||||
|
||||
@@ -18,11 +27,12 @@
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
#define STARTUP_SONG SONG(MARIO_MUSHROOM)
|
||||
#define DEFAULT_LAYER_SONGS { \
|
||||
SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND), \
|
||||
SONG(ZELDA_TREASURE), \
|
||||
}
|
||||
#define AUDIO_VOICES
|
||||
#define AUDIO_CLICKY
|
||||
@@ -30,3 +40,18 @@
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define LAYOUT_bottomspace( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, \
|
||||
k41, k42, k43, k44, k45, k46, k47, k48 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
|
||||
{ KC_NO, k31, k32, k43, k44, k45, k46, k37, k38, KC_NO }, \
|
||||
{ KC_NO, k41, k42, k33, k34, k35, k36, k47, k48, KC_NO } \
|
||||
}
|
||||
|
@@ -1,16 +1,34 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#ifdef DEFAULT_LAYER_SONGS
|
||||
extern float default_layer_songs[][][];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
enum mitosis_layers
|
||||
{
|
||||
{
|
||||
_xQ, // qwerty
|
||||
_xC, // colemak
|
||||
_xD, // dvorak
|
||||
_xW, // workman
|
||||
_xS, // symbols
|
||||
_xN, // numbers
|
||||
_xF // functions
|
||||
};
|
||||
};
|
||||
|
||||
enum mitosis_keycodes
|
||||
{
|
||||
KC_LAYO = SAFE_RANGE
|
||||
};
|
||||
|
||||
// Setting MITOSIS_DATAGROK_BOTTOMSPACE in rules.mk will swap the upper and
|
||||
// lower center four thumb-keys. See keymaps/datagrok/rules.mk.
|
||||
#ifdef MITOSIS_DATAGROK_BOTTOMSPACE
|
||||
#undef LAYOUT
|
||||
#define LAYOUT LAYOUT_bottomspace
|
||||
#endif
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS // Transparent
|
||||
@@ -31,58 +49,125 @@ enum mitosis_layers
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_xQ] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ KC_LGUI, KC_LCTL, MO(_xS), KC_TAB, KC_SPC, MO(_xS), KC_RCTL, KC_RGUI,
|
||||
/*, */ KC_HENK, KC_LALT, MO(_xN), KC_LSFT, KC_RSPC, MO(_xN), KC_RALT, KC_MHEN),
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ KC_LGUI, KC_LCTL, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RCTL, KC_RGUI,
|
||||
/*, */ KC_HENK, KC_LALT, MO(_xN), LSFT_T(KC_TAB), KC_RSPC, MO(_xN), KC_RALT, KC_MHEN),
|
||||
[_xC] = LAYOUT(
|
||||
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
|
||||
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xD] = LAYOUT(
|
||||
KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L,
|
||||
KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S,
|
||||
KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xW] = LAYOUT(
|
||||
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xS] = LAYOUT(
|
||||
KC_ESC, KC_GRV , KC_UP, KC_EQL , KC_TILD, KC_PLUS, KC_CIRC, KC_AMPR, KC_PERC, KC_MINS,
|
||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PIPE, KC_AT, KC_DLR, KC_HASH, KC_ENT,
|
||||
KC_BSLS, KC_LABK, KC_LCBR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RCBR, KC_RPRN, KC_RABK, KC_SLSH,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______),
|
||||
KC_ESC, KC_GRV , KC_UP, KC_EQL , KC_TILD, KC_PLUS, KC_CIRC, KC_AMPR, KC_PERC, KC_MINS,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PIPE, KC_AT, KC_DLR, KC_HASH, KC_ENT,
|
||||
KC_BSLS, KC_LABK, KC_LCBR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_RCBR, KC_RABK, KC_SLSH,
|
||||
/*, */ _______, _______, _______, KC_DEL, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, TT(_xF), _______, _______, TT(_xF), _______, _______),
|
||||
[_xN] = LAYOUT(
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_PPLS, KC_7, KC_8, KC_9, KC_PMNS,
|
||||
_______, KC_F4, KC_F5, KC_F6, KC_F11, KC_NLCK, KC_4, KC_5, KC_6, KC_PENT,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS,
|
||||
/*, */ _______, _______, MO(_xF), _______, _______, MO(_xF), KC_0, KC_PDOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_PPLS, KC_7, KC_8, KC_9, KC_PMNS,
|
||||
KC_SLCK, KC_F4, KC_F5, KC_F6, KC_F11, KC_NLCK, KC_4, KC_5, KC_6, KC_PENT,
|
||||
KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS,
|
||||
/*, */ _______, _______, TT(_xF), _______, _______, TT(_xF), KC_0, KC_DOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xF] = LAYOUT(
|
||||
RESET, KC_INS, KC_PGUP, KC_DEL, KC_VOLU, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||
CK_TOGG, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PENT,
|
||||
TG(_xW), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS,
|
||||
/*, */ CK_UP, MU_TOG, _______, _______, _______, _______, KC_P0, KC_PDOT,
|
||||
/*, */ CK_DOWN, MU_MOD, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS),
|
||||
RESET, KC_INS, KC_PGUP, DEBUG, KC_VOLU, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||
CK_TOGG, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PENT,
|
||||
KC_LAYO, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS,
|
||||
/*, */ CK_UP, MU_TOG, _______, _______, _______, _______, KC_P0, KC_PDOT,
|
||||
/*, */ CK_DOWN, MU_MOD, _______, _______, _______, _______, _______, _______),
|
||||
};
|
||||
const bool defaultlayers[] = {
|
||||
[_xQ] = true,
|
||||
[_xC] = true,
|
||||
[_xD] = true,
|
||||
[_xW] = true,
|
||||
[_xS] = false,
|
||||
[_xN] = false,
|
||||
[_xF] = false,
|
||||
};
|
||||
const size_t defaultlayers_n = sizeof(defaultlayers) / sizeof(defaultlayers[0]);
|
||||
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclaimation
|
||||
// New keycode KC_LAYO rotates between available default layers (for e.g.,
|
||||
// selecting a base layout). Shift+KC_LAYO makes the current one persistent.
|
||||
bool process_record_layout(uint16_t keycode, keyrecord_t *record) {
|
||||
uint32_t default_layer;
|
||||
uint8_t i;
|
||||
#if defined(AUDIO_ENABLE)
|
||||
float saved_song[][2] = SONG(COIN_SOUND);
|
||||
#endif
|
||||
|
||||
if (keycode != KC_LAYO || !record->event.pressed) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))) { // shift pressed
|
||||
// save default layer. whatever the current default layer is, store that
|
||||
eeconfig_update_default_layer(default_layer_state);
|
||||
#if defined(AUDIO_ENABLE)
|
||||
PLAY_SONG(saved_song);
|
||||
#endif
|
||||
} else {
|
||||
// rotate default layer.
|
||||
// find the current default layer
|
||||
default_layer = biton32(default_layer_state);
|
||||
// find next valid default layer
|
||||
for (i = 1; i < defaultlayers_n; i++) {
|
||||
if (defaultlayers[(default_layer + i) % defaultlayers_n]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == defaultlayers_n) {
|
||||
// we fell out of the loop without finding another default layer to switch
|
||||
// to.
|
||||
return false;
|
||||
}
|
||||
default_layer = (default_layer + i) % defaultlayers_n;
|
||||
default_layer_set(1U<<default_layer);
|
||||
led_set(host_keyboard_leds());
|
||||
#if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS)
|
||||
PLAY_SONG(default_layer_songs[default_layer]);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclamation
|
||||
// mark> on <shift-period>, when using an operating system configured for a
|
||||
// US/qwerty layout.
|
||||
// cdeq = "comma dot exclamation question"
|
||||
bool comm_shifted = false;
|
||||
bool ques_shifted = false;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
bool process_record_cdeq(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t shifted;
|
||||
uint16_t s_keycode;
|
||||
bool *k_shifted;
|
||||
|
||||
switch (keycode) {
|
||||
case KC_COMM:
|
||||
s_keycode = KC_SLSH;
|
||||
k_shifted = &comm_shifted;
|
||||
break;
|
||||
case KC_DOT:
|
||||
s_keycode = KC_1;
|
||||
k_shifted = &ques_shifted;
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
case KC_COMM:
|
||||
s_keycode = KC_SLSH;
|
||||
k_shifted = &comm_shifted;
|
||||
break;
|
||||
case KC_DOT:
|
||||
s_keycode = KC_1;
|
||||
k_shifted = &ques_shifted;
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||
@@ -104,47 +189,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_fnpc[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_fnmac[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return \
|
||||
process_record_cdeq(keycode, record) && \
|
||||
process_record_layout(keycode, record);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Set the bits of A selected by MASK to the corresponding bits of B
|
||||
#define setbits(A, B, MASK) A = (A & (B | ~MASK)) | (B & MASK)
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
void led_set_user(uint8_t usb_leds) {
|
||||
// A simple (but technically inaccurate) model of the momentary layer state:
|
||||
// Red layer active -> indicator = red
|
||||
// Blue layer active -> indicator = blue
|
||||
// Purple layer active -> indicator = purple
|
||||
// the Pro Micro tx LED displays Num Lock status.
|
||||
//
|
||||
// Workman layout active -> indicator = green
|
||||
// Workman red layer -> indicator = yellow (red + green)
|
||||
// Workman blue layer -> indicator = cyan (blue + green)
|
||||
// Workman purple layer -> indicator = white (red + blue + green)
|
||||
|
||||
// Bit # 7 6 5 4 3 2 1 0
|
||||
// layer_state: [ | | | _xF | _xN | _xS | _xQ | _xW ]
|
||||
// layer_state: [ | _xF | _xN | _xS | _xW | _xD | _xC | _xQ ]
|
||||
// usb_led [ | | |kana |cmps |scrl |caps | num ]
|
||||
// PORTB: [ NC | 10 | 9 | 8 | 14 | 16 | 15 |rxled]
|
||||
// PORTC: [ NC | 5 | | | | | | ]
|
||||
@@ -158,16 +225,16 @@ void matrix_scan_user(void) {
|
||||
// board. Each may be connected to an LED by way of a resistor (4.7k to
|
||||
// match the others) for a total of 14 additional indicators.
|
||||
|
||||
// A simple (but technically inaccurate) model of the momentary layer state:
|
||||
// Fn1 key makes _xS active; indicator = red
|
||||
// Fn2 key makes _xN active; indicator = blue
|
||||
// Both keys make _xF active; indicator = purple
|
||||
// Toggling QWERTY mode makes indicator include green, so (red/blue/purple becomes yellow/cyan/white)
|
||||
|
||||
uint32_t portf_bits = \
|
||||
((layer_state|default_layer_state)&0b01100000)>>1 | \
|
||||
((layer_state|default_layer_state)&0b00010000)<<1 | \
|
||||
((layer_state|default_layer_state)&0b01000000)>>2;
|
||||
uint32_t portd_bits = \
|
||||
(usb_leds&0b1)<<5 | \
|
||||
((layer_state|default_layer_state)&0b1000)>>2;
|
||||
// negated because for ports 0=LED on.
|
||||
uint32_t portf_bits = ~(layer_state|layer_state<<1|(layer_state&0b100)<<3);
|
||||
setbits(PORTF, portf_bits, 0b00110000);
|
||||
setbits(PORTD, ~layer_state, 0b00000010);
|
||||
setbits(PORTF, ~portf_bits, 0b00110000);
|
||||
setbits(PORTD, ~portd_bits, 0b00100010);
|
||||
}
|
||||
|
||||
// vim: set sw=2 et:
|
||||
|
@@ -1,54 +1,59 @@
|
||||
# a layout for the Mitosis
|
||||
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged symmetrically, but left/right distinguishable by the OS.
|
||||
Shift, Red ("Lower"), Blue ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper (actually Henkan/Muhenkan).
|
||||
I place left- and right-versions of Shift, GUI ("Super"), and Alt ("Meta"), and Henkan/Muhenkan (which I plan to overload for "Hyper").
|
||||
|
||||
I'm going for a [Space Cadet](https://en.wikipedia.org/wiki/Space-cadet_keyboard) aesthetic;
|
||||
I want a keyboard that can (even just in theory) make use of all the bucky bits my operating system can support.
|
||||
|
||||
- Red and Blue are used to momentary-enable (like a shift key) one of three layers:
|
||||
- Red key and Blue key momentary-enable (like a shift key) one of three layers:
|
||||
|
||||
- Red: Symbols layer
|
||||
- Blue: Numbers layer
|
||||
- "Purple" (both Red and Blue): Functions layer
|
||||
|
||||
This tri-state layer mechanism is a bit similar to Planck and Preonic's "Raise," "Lower," and "Adjust."
|
||||
|
||||
- The base layer is QWERTY.
|
||||
A slight variant of [Workman][] may be toggled using `Red`+`Blue`+`Z`.
|
||||
[Colemak][], [Dvorak][], and [Workman][] may be toggled using `Red`+`Blue`+`Z`.
|
||||
When you find the one you like, save it with `Shift`+`Red`+`Blue`+`Z`.
|
||||
|
||||
- Minimize hand travel, so as not to lose orientation with home row.
|
||||
|
||||
- `?` and `!` are moved to take the place of `<` and `>`. Rationale: unmodded
|
||||
and shifted keys should be for prose, while symbols useful for programming
|
||||
should be colocated on their own layer.
|
||||
- `?` and `!` are moved to take the place of `<` and `>`.
|
||||
Rationale: unmodded and shifted keys should be for prose, while symbols useful for programming should be colocated on their own layer.
|
||||
|
||||
- Key positions chosen for mnemonics.
|
||||
For example, you can distinguish between alphanumeric numerals and keypad numerals, but they occupy the same key positions.
|
||||
|
||||
## Layout Images
|
||||
|
||||

|
||||

|
||||
|
||||
Base layer. Notes:
|
||||
- customized comma and period, which have exclamation point and question mark on their shift layer.
|
||||
- tap right-shift for underscore
|
||||
- tap right-shift for underscore, tap left-shift for tab.
|
||||
|
||||

|
||||

|
||||
|
||||
Red layer. Intended for common navigation and programming symbols. Notes:
|
||||
- symmetric layout of paired braces/brackets/slashes for easier memorization
|
||||
- arrows placed directly on home position
|
||||
|
||||

|
||||

|
||||
|
||||
Blue layer. Intended for "number pad." Notes:
|
||||
- Keycodes generated for numbers, enter key, and mathematical symbols are from the alphanumeric keys, not keypad. This way they are not influenced by the state of Num Lock. If you want to send the keypad equivalents, just use Red and Blue modifiers simultaneously.
|
||||
- Keycodes generated for numbers, enter key, and mathematical symbols are from the alphanumeric keys, not keypad.
|
||||
This way they are not influenced by the state of Num Lock.
|
||||
If you want to send the keypad equivalents, just press Blue as well to access keypad numbers in the same positions in the Purple layer.
|
||||
|
||||

|
||||

|
||||
|
||||
Purple (Red+Blue) layer. Intended for "true keypad" and various functions. Notes:
|
||||
- Numbers on this layer send Keypad codes, so the result will be affected by the state of Num Lock.
|
||||
- "Switch Layout" toggles the alphabet keys between QWERTY and Workman
|
||||
- Page Up / Page Down / Home / End are placed on similar arrows
|
||||
- To press Print Screen it is necessary to use the left-side Red and Blue modifiers.
|
||||
- "Switch Layout" toggles the alphabet keys between QWERTY, Colemak, Dvorak, and Workman.
|
||||
Shift + "Switch Layout" stores the currently selected alphabet layout in eeprom, so the selection persists across reboots and computers.
|
||||
- Page Up / Page Down / Home / End are placed on corresponding arrow keys.
|
||||
|
||||
Keyboard layout editor sources:
|
||||
[base](http://www.keyboard-layout-editor.com/#/gists/bc2d06a3203d1bc3a14ed2245cf39643)
|
||||
@@ -56,14 +61,41 @@ Keyboard layout editor sources:
|
||||
[blue](http://www.keyboard-layout-editor.com/#/gists/240e807f3d7e1d3ddabe1b69ee675048)
|
||||
[purple](http://www.keyboard-layout-editor.com/#/gists/9559f0f8bb1ee47677c8f2b4d766829d)
|
||||
|
||||
[Imgur album](https://imgur.com/a/KSoVgPx)
|
||||
[Imgur album](https://imgur.com/a/hm4bbdM)
|
||||
|
||||
## Indicators
|
||||
|
||||
- When Red layer is active, the RGB indicator turns red.
|
||||
- When Blue layer is active, the RGB indicator turns blue.
|
||||
- When Purple layer is active, the RGB indicator turns purple.
|
||||
- When the Workman layer is active, the RGB indicator turns green.
|
||||
Currently, this means that activating the Red layer while using the Workman layout will make the indicator show yellow. (red + green.)
|
||||
- The Num Lock status is shown on the Pro Micro tx LED.
|
||||
- If you attach a speaker to PC6 (pin 5) and compile with AUDIO_ENABLE=yes, music will be played at startup, when switching default layers, and when saving the default layer.
|
||||
|
||||
## Variants
|
||||
|
||||
Some additional compile-time options for this layout are available by editing rules.mk or compiling like so:
|
||||
|
||||
Normal compilation:
|
||||
|
||||
```make mitosis:datagrok```
|
||||
|
||||
Swap Space onto bottom thumb row: swaps Red/Backspace/Space/Red with Blue/Shift/Shift/Blue:
|
||||
|
||||
```make mitosis:datagrok MITOSIS_DATAGROK_BOTTOMSPACE=yes```
|
||||
|
||||
Lower baud UART. Useful when using an 8Mhz pro micro; corresponding changes required in wireless firmware. See rules.mk for details.
|
||||
|
||||
```make mitosis:datagrok MITOSIS_DATAGROK_SLOWUART=yes```
|
||||
|
||||
## Design notes
|
||||
|
||||
### Workman layout
|
||||
|
||||
- I'm learning a new physical key placement, so I might as well go all-out and
|
||||
use an optimal non-QWERTY layout.
|
||||
- I'm learning a new physical key placement, so I might as well go all-out and use an optimal non-QWERTY layout.
|
||||
Bonus: it's easy to switch back to QWERTY on a traditional row-staggered keyboard.
|
||||
The designer of the Mitosis had [a similar experience](https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/dgfr22q/).
|
||||
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a standard
|
||||
@@ -78,14 +110,10 @@ Keyboard layout editor sources:
|
||||
The next fastest baudrate that works without errors is 250k baud.
|
||||
So if you want to do the same:
|
||||
|
||||
- Set the Pro Micro clock rate correctly in `rules.mk`:
|
||||
- Set the Pro Micro clock and baud rate correctly in `rules.mk`:
|
||||
```
|
||||
F_CPU = 800000
|
||||
```
|
||||
- Configure it to communicate at 250k baud in `config.h`:
|
||||
```
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
MITOSIS_DATAGROK_SLOWUART = yes
|
||||
```
|
||||
- Configure the receiver's wireless module to communicate at 250k baud in `main.c`. See https://github.com/reversebias/mitosis/pull/10
|
||||
```
|
||||
@@ -99,7 +127,7 @@ Keyboard layout editor sources:
|
||||
|
||||
- Arrow keys are in the home position on the Red layer.
|
||||
|
||||
- Blue+Arrows = PgUp/PgDn/Home/End, which is intuitive for me.
|
||||
- Blue+Arrows = PgUp/PgDn/Home/End, which is intuitive for me and similar to what is done on Apple and some Dell keyboards.
|
||||
|
||||
- The number pad: I placed the ten-key number pad on the Blue layer.
|
||||
However, this would do the wrong thing when Num Lock was not enabled.
|
||||
@@ -111,11 +139,7 @@ Keyboard layout editor sources:
|
||||
- The Function-keys are arranged to mimic the order of the ten-key pad.
|
||||
|
||||
- Enter is now in a more qwerty-familiar location, and may be activated with one hand.
|
||||
Numpad Enter is in the same position.
|
||||
|
||||
- Rather than place Backspace opposite Space, I intentionally place it on a layer where it takes some effort to activate.
|
||||
Backspace is one of the keys I most dislike on a QWERTY keyboard because it moves me away from homerow and I need to use it so often.
|
||||
Rather than make it easier to strike, I want to discourage myself from using it by learning to type more accurately.
|
||||
Numpad Enter is in the same position for mnemonics.
|
||||
|
||||
- Why do I dislike [snake\_case](https://en.wikipedia.org/wiki/Snake_case) (`__variable_names_that_use_underscores_`)?
|
||||
Maybe because it's hard to type all those underscores requiring the shift key?
|
||||
@@ -126,6 +150,22 @@ Keyboard layout editor sources:
|
||||
|
||||
### Current
|
||||
|
||||
- Discard "intentionally difficult backspace" idea.
|
||||
Tab returns to left-shift.
|
||||
Del returns to Red+Backspace
|
||||
- "High Profile mode:" Swap Red/Backspace/Space/Red with Blue/Shift/Shift/Blue (placing space on lower thumb keys) using `MITOSIS_DATAGROK_BOTTOMSPACE=yes` when compiling.
|
||||
- Move Print Screen / Scroll Lock / Pause to pinky column on Blue layer.
|
||||
- Let's try using TT instead of MO so we can e.g. lock-on the keypad.
|
||||
- We still use MO for first modifier, so e.g. Red + tapping Blue will lock purple.
|
||||
So far it feels a bit janky, we'll see.
|
||||
- One key `KC_LAYO` to cycle through available base layers instead of a dedicated key for each;
|
||||
Shift + `KC_LAYO` stores current base layer selection in eeprom so it comes back after disconnecting or a reset.
|
||||
- Added Colemak and Dvorak as default layers that may be selected.
|
||||
- Set UART to 250kbaud with make argument `MITOSIS_DATAGROK_SLOWUART=yes`, for use with 8Mhz Pro Micros.
|
||||
- Display Num Lock status on tx LED
|
||||
|
||||
### 0.6.60
|
||||
|
||||
- Experiment: no-modifier underscore on right shift key.
|
||||
- New combined numbers + keypad arrangement.
|
||||
No more worrying about Num Lock key.
|
||||
@@ -168,27 +208,33 @@ Keyboard layout editor sources:
|
||||
|
||||
### Abandoned ideas
|
||||
|
||||
- "Since QWERTY and Workman keep angle brackets together, place other
|
||||
enclosing symbols on the same keys. This informs the numbers placement,
|
||||
which informs the function-key placement."
|
||||
- Abandoned: intentionally-difficult backspace.
|
||||
"Backspace is one of the keys I most dislike on a QWERTY keyboard because it moves me away from homerow and I need to use it so often.
|
||||
Rather than make it easier to strike, I want to discourage myself from using it and train myself to type more accurately."
|
||||
|
||||
- Many other people like an easy-to-reach backspace.
|
||||
- Many other split-spacebar ergo boards place backspace at the thumbs.
|
||||
- I can still train myself to type well with it in an easy location.
|
||||
- I couldn't think of anything really better to put opposite space.
|
||||
|
||||
- I tried this and it was bad. I don't like having to pick the right
|
||||
modifier to get the right flavor of bracket. Instead, now, one modifier
|
||||
activates a symbols layer where all brackets are easily accessible.
|
||||
- Abandoned: pile all brackets onto one pair of keys.
|
||||
"Since QWERTY and Workman keep angle brackets together, place other enclosing symbols on the same keys."
|
||||
|
||||
- Space/Enter to the left of layer select for Enter
|
||||
- I didn't like having to pick the right modifier to get the right flavor of bracket.
|
||||
Instead, now, one modifier activates a symbols layer where all brackets are easily accessible.
|
||||
|
||||
- Doesn't work well; I always trigger space first when mashing the keys
|
||||
- Abandoned: chorded Enter without proper chording detection
|
||||
|
||||
- I tried to make Red+Space = Enter with the intention that I could hit both with my thumb.
|
||||
That didn't work well; I always trigger space first when mashing the keys
|
||||
simultaneously. ~~This might not continue to be true if I change the angle
|
||||
at which I strike the keys e.g. with a neoprene base or a wrist support.~~
|
||||
Even with a wrist rest or low-profile, this is hard to do with one hand.
|
||||
Need to adjust the firmware to understand chorded thumb keys.
|
||||
|
||||
- I used to have Blue on ring finger, but that was too hard to use in
|
||||
conjunction with shift.
|
||||
|
||||
## To do
|
||||
|
||||
- Ctrl+'+' doesn't seem to work; fix.
|
||||
- **Shared Layouts.**
|
||||
Figure out how to make use of QMK's common `layouts/`
|
||||
- **Chorded Combos.**
|
||||
@@ -203,16 +249,23 @@ Keyboard layout editor sources:
|
||||
Do any of my applications use it?
|
||||
Should I have the firmware ensure it is set how I want it?
|
||||
Maybe cause it to be momentary active with Blue?
|
||||
See [@drashna's comment](https://github.com/qmk/qmk_firmware/pull/2366#issuecomment-404951953)
|
||||
- Store default base layer in eeprom?
|
||||
See [@drashna's comment](https://github.com/qmk/qmk_firmware/pull/2366#issuecomment-404951953) for code to force it always-on, which I don't know if I want.
|
||||
- ~~Store default layer in eeprom?~~
|
||||
- Allow "!? on ,." to be easily toggled-off.
|
||||
- Modularize "!? on ,." so it can be easily used on any QMK keyboard. (about half done)
|
||||
- See if the henkan/muhenkan placement is at all useful for Japanese speakers,
|
||||
or abuse different keysyms for Left/Right Hyper. (Original space cadet used
|
||||
scancodes 145/175. 145 is LANG2, 175 is "reserved" in USB HID spec.)
|
||||
- Implement "layer lock" key
|
||||
- Feature parity with popular boards e.g. Planck?
|
||||
- Layers for ~~Dvorak, Coleman,~~ Plover
|
||||
- More music and midi stuff
|
||||
- Macros?
|
||||
- Improve tri-layer behavior
|
||||
- Find a better location for PrintScr/SysRq, Scroll Lock, Pause/Break, Caps Lock.
|
||||
- ~~Figure out where to place non-numpad numbers so we don't need num lock turned
|
||||
on to type them?~~
|
||||
- Find out what `update_tri_layer_state` offers that my simple layers arrangement lacks.
|
||||
- ~~Find a better location for Caps Lock, PrintScr/SysRq, Scroll Lock, Pause/Break,~~.
|
||||
Placed on Blue layer. Caps will be Shift+"Layer Lock," once I get that working.
|
||||
- ~~Figure out where to place non-numpad numbers so we don't need num lock turned on to type them?~~
|
||||
- ~~Add Insert, PrintScr, Pause/Break~~
|
||||
- ~~Make QWERTY base layer for people who customize layout in software?~~
|
||||
I default to QWERTY now.
|
||||
|
@@ -1,4 +1,19 @@
|
||||
AUDIO_ENABLE = yes # audio output
|
||||
# Space and "Red" modifier are keys I want in the easiest-to-reach position in
|
||||
# the thumb row. Depending on the angle and height of the Mitosis and the type
|
||||
# of keycaps you use, the upper row or the lower row of thumb keys might be more
|
||||
# comfortable for you. I put red/space on the upper row and blue/shift on the
|
||||
# lower, but to swap that, set MITOSIS_DATAGROK_BOTTOMSPACE = yes. This has the
|
||||
# effect of swapping only the four center keys on the upper row of thumb keys with that
|
||||
# of the lower row of thumb keys.
|
||||
MITOSIS_DATAGROK_BOTTOMSPACE = no
|
||||
|
||||
# I used to use a pro micro clocked at 8Mhz. It can't reach the same baud rate
|
||||
# that the standard 16Mhz-clocked pro micro can, so the baud rate needs to be
|
||||
# lowered. Set this to "yes" to do that. See also
|
||||
# https://github.com/reversebias/mitosis/pull/10
|
||||
MITOSIS_DATAGROK_SLOWUART = no
|
||||
|
||||
AUDIO_ENABLE = no # audio output
|
||||
FAUXCLICKY_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
@@ -9,4 +24,12 @@ UNICODE_ENABLE = no # Unicode
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
|
||||
ifeq ($(strip $(MITOSIS_DATAGROK_BOTTOMSPACE)), yes)
|
||||
OPT_DEFS += -DMITOSIS_DATAGROK_BOTTOMSPACE
|
||||
endif
|
||||
ifeq ($(strip $(MITOSIS_DATAGROK_SLOWUART)), yes)
|
||||
OPT_DEFS += -DMITOSIS_DATAGROK_SLOWUART
|
||||
endif
|
||||
|
||||
# vim: set ts=8 noet:
|
||||
|
@@ -5,13 +5,12 @@ void uart_init(void) {
|
||||
}
|
||||
|
||||
void led_init(void) {
|
||||
DDRD |= (1<<1);
|
||||
PORTD |= (1<<1);
|
||||
DDRF |= (1<<4) | (1<<5);
|
||||
PORTF |= (1<<4) | (1<<5);
|
||||
DDRD |= (1<<1); // Pin to green, set as output
|
||||
PORTD |= (1<<1); // Turn it off
|
||||
DDRF |= (1<<4) | (1<<5); // Pins to red and blue, set as output
|
||||
PORTF |= (1<<4) | (1<<5); // Turn them off
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
@@ -20,16 +19,6 @@ void matrix_init_kb(void) {
|
||||
led_init();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
__attribute__ ((weak))
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
@@ -53,15 +53,14 @@
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, \
|
||||
k41, k42, k43, k44, k45, k46, k47, k48 \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, \
|
||||
k41, k42, k43, k44, k45, k46, k47, k48 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
|
||||
{ KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO }, \
|
||||
{ KC_NO, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO } \
|
||||
}
|
||||
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
|
||||
{ KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO }, \
|
||||
{ KC_NO, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO } \
|
||||
}
|
||||
#endif
|
||||
|
39
keyboards/nyquist/keymaps/yshrsmz/config.h
Normal file
39
keyboards/nyquist/keymaps/yshrsmz/config.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* auto shift config */
|
||||
#define AUTO_SHIFT_TIMEOUT 140
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
195
keyboards/nyquist/keymaps/yshrsmz/keymap.c
Normal file
195
keyboards/nyquist/keymaps/yshrsmz/keymap.c
Normal file
@@ -0,0 +1,195 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _FUNC 3
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
FUNC,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | GUI |Shift |Adjust| Fn |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
FUNC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RSFT, ADJUST, FUNC \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* FUNC
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ` | F1 | F2 | F3 | F4 | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F5 | F6 | F7 | F8 | | LEFT | DOWN | UP |RIGHT | PGUP | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F9 | F10 | F11 | F12 | | HOME | END |Alt+← |Alt+→ | PGDN | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \
|
||||
_______, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_HOME, KC_END, LALT(KC_LEFT),LALT(KC_RGHT), KC_PGDN, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||
_______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
1
keyboards/nyquist/keymaps/yshrsmz/rules.mk
Normal file
1
keyboards/nyquist/keymaps/yshrsmz/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
AUTO_SHIFT_ENABLE = yes
|
37
keyboards/planck/keymaps/vaire/config.h
Normal file
37
keyboards/planck/keymaps/vaire/config.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
#define MOUSEKEY_INTERVAL 16
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 0
|
||||
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
150
keyboards/planck/keymaps/vaire/keymap.c
Normal file
150
keyboards/planck/keymaps/vaire/keymap.c
Normal file
@@ -0,0 +1,150 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "action_layer.h"
|
||||
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define EXCEL_HOME LALT(KC_H)
|
||||
#define EXCEL_COL LCTL(KC_SPC)
|
||||
#define EXCEL_ROW LSFT(KC_SPC)
|
||||
#define DESK_LEFT LCTL(LGUI(KC_LEFT))
|
||||
#define WIN_LEFT LSFT(KC_TAB)
|
||||
#define WIN_CLOSE LALT(KC_F4)
|
||||
#define WIN_RIGHT KC_TAB
|
||||
#define DESK_RIGHT LCTL(LGUI(KC_RGHT))
|
||||
#define DOCS LGUI(KC_E)
|
||||
#define SNAP_RIGHT LGUI(KC_RGHT)
|
||||
#define SNAP_UP LGUI(KC_UP)
|
||||
#define SNAP_LEFT LGUI(KC_LEFT)
|
||||
#define SNAP_DOWN LGUI(KC_DOWN)
|
||||
#define COPY LCTL(KC_C)
|
||||
#define PASTE LCTL(KC_V)
|
||||
#define CUT LCTL(KC_X)
|
||||
#define UNDO LCTL(KC_Z)
|
||||
#define FIND LCTL(KC_F)
|
||||
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_T(KC_ENT),
|
||||
MO(1), KC_LCTL, KC_LALT, KC_LGUI, MO(2), LT(5,KC_ENT), LT(4,KC_SPC), MO(3), KC_SLSH, KC_LEFT, KC_DOWN, CTL_T(KC_RGHT)),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_ESC, KC_NLCK, LCTL(KC_SPC), KC_UP, LSFT(KC_SPC), KC_DLR, KC_EQL, KC_P7, KC_P8, KC_P9, KC_PPLS, LCTL(KC_BSPC),
|
||||
KC_TAB, FIND, KC_LEFT, KC_DOWN, KC_RGHT, KC_PERC, KC_CIRC, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_BSLS,
|
||||
KC_LSFT, UNDO, CUT, COPY, PASTE, EXCEL_HOME, KC_PSCR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_LSFT,
|
||||
KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, TO(1), KC_ENT, KC_SPC, KC_PENT, KC_P0, KC_PDOT, KC_PAST, KC_LCTL),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LT, KC_GT, KC_LPRN,
|
||||
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_MPLY, KC_MNXT, KC_PGUP, SFT_T(KC_VOLU),
|
||||
TO(0), KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_ENT, KC_SPC, MO(3), KC_PSCR, KC_MPRV, KC_PGDOWN, CTL_T(KC_VOLD)),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_TILD, DESK_LEFT, WIN_LEFT, KC_F4, WIN_RIGHT, DESK_RIGHT, DOCS, SNAP_LEFT, SNAP_UP, SNAP_RIGHT, SNAP_DOWN, KC_DEL,
|
||||
KC_CAPS, KC_QUOT, KC_LBRC, KC_LCBR, KC_LPRN, KC_BSLS, KC_SLSH, KC_RPRN, KC_RCBR, KC_RBRC, KC_DQUO, KC_QUOT,
|
||||
KC_PWR, KC_SLEP, KC_WAKE, KC_HOME, BL_BRTG, BL_STEP, KC_TRNS, KC_CALC, KC_LT, KC_GT, KC_COLON, KC_LSFT,
|
||||
TO(0), KC_LCTL, KC_LALT, KC_LGUI, KC_LALT, KC_LCTL, KC_TRNS, KC_TRNS, AU_TOG, MU_TOG, MU_MOD, LCTL(KC_RGHT)),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
TO(0), KC_LSCR, WIN_LEFT, KC_MS_WH_UP, WIN_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_U, KC_MS_BTN2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_INS, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
|
||||
RESET, KC_APP, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_TRNS, KC_TRNS, TO(0), TO(1), TO(2), TO(3), TO(4),
|
||||
TO(0), KC_MENU, KC_TRNS, KC_TRNS, KC_LALT, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RCTL),
|
||||
|
||||
LAYOUT_planck_grid(
|
||||
KC_BSPC, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSPC,
|
||||
KC_TAB, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, KC_QUOT,
|
||||
KC_LSFT, KC_ENT, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, SFT_T(KC_ENT),
|
||||
TO(0), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_TRNS, KC_TRNS, MO(3), KC_SLSH, KC_LEFT, KC_DOWN, LCTL(KC_RGHT)),
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
set_voice(default_voice);
|
||||
startup_user();
|
||||
println("Matrix Init");
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led)
|
||||
{
|
||||
static uint8_t old_usb_led = 0;
|
||||
|
||||
_delay_ms(10); // gets rid of tick
|
||||
|
||||
if (!is_playing_notes())
|
||||
{
|
||||
if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
|
||||
{
|
||||
// If CAPS LK LED is turning on...
|
||||
PLAY_SONG(tone_caps_on);
|
||||
}
|
||||
else if (!(usb_led & (1<<USB_LED_CAPS_LOCK)) && (old_usb_led & (1<<USB_LED_CAPS_LOCK)))
|
||||
{
|
||||
// If CAPS LK LED is turning off...
|
||||
PLAY_SONG(tone_caps_off);
|
||||
}
|
||||
else if ((usb_led & (1<<USB_LED_NUM_LOCK)) && !(old_usb_led & (1<<USB_LED_NUM_LOCK)))
|
||||
{
|
||||
// If NUM LK LED is turning on...
|
||||
PLAY_SONG(tone_numlk_on);
|
||||
}
|
||||
else if (!(usb_led & (1<<USB_LED_NUM_LOCK)) && (old_usb_led & (1<<USB_LED_NUM_LOCK)))
|
||||
{
|
||||
// If NUM LED is turning off...
|
||||
PLAY_SONG(tone_numlk_off);
|
||||
}
|
||||
else if ((usb_led & (1<<USB_LED_SCROLL_LOCK)) && !(old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
|
||||
{
|
||||
// If SCROLL LK LED is turning on...
|
||||
PLAY_SONG(tone_scroll_on);
|
||||
}
|
||||
else if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)) && (old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
|
||||
{
|
||||
// If SCROLL LED is turning off...
|
||||
PLAY_SONG(tone_scroll_off);
|
||||
}
|
||||
}
|
||||
|
||||
old_usb_led = usb_led;
|
||||
}
|
||||
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(30); // gets rid of tick
|
||||
PLAY_SONG(tone_my_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
PLAY_SONG(tone_my_goodbye);
|
||||
_delay_ms(3000);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void audio_on_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_audio_on);
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
PLAY_SONG(tone_music_on);
|
||||
}
|
||||
|
||||
#endif /* AUDIO_ENABLE */
|
6
keyboards/planck/keymaps/vaire/readme.md
Normal file
6
keyboards/planck/keymaps/vaire/readme.md
Normal file
@@ -0,0 +1,6 @@
|
||||
#The vaire planck layout
|
||||
|
||||
- easy access numpad
|
||||
- mouse and wheel controls
|
||||
- flipped keyboard for one hand typing
|
||||
- sound on all num, scroll, and caps lock
|
82
keyboards/planck/keymaps/vaire/rules.mk
Normal file
82
keyboards/planck/keymaps/vaire/rules.mk
Normal file
@@ -0,0 +1,82 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# 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)
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
ifeq ($(strip $(KEYBOARD)), planck/rev3)
|
||||
BOOTLOADER = atmel-dfu
|
||||
endif
|
||||
ifeq ($(strip $(KEYBOARD)), planck/rev4)
|
||||
BOOTLOADER = atmel-dfu
|
||||
endif
|
||||
ifeq ($(strip $(KEYBOARD)), planck/rev5)
|
||||
BOOTLOADER = qmk-dfu
|
||||
endif
|
||||
ifeq ($(strip $(KEYBOARD)), planck/light)
|
||||
BOOTLOADER = qmk-dfu
|
||||
endif
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in[]
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # 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
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = no
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
LAYOUTS = ortho_4x12 planck_mit planck_grid
|
||||
LAYOUTS_HAS_RGB = no
|
||||
|
||||
DEFAULT_FOLDER = planck/rev5
|
||||
|
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn3 │ ' │█████│Enter│█████│
|
||||
│Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │█████│Enter│█████│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│Shift│█████│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │█████│Shift│ Fn │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
|
70
layouts/community/ortho_4x12/symbolic/README.md
Normal file
70
layouts/community/ortho_4x12/symbolic/README.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Symbolic ortho 4x12 layout
|
||||
|
||||
## Features
|
||||
|
||||
### QWERTY based
|
||||
|
||||

|
||||
|
||||
* Default keymap
|
||||
* QWERTY layout
|
||||
* Hold and tap
|
||||
* `Shift` and `Space`
|
||||
* `Left Ctrl` and `Tab`
|
||||
* Symmetric Modifiers
|
||||
* `Shift`
|
||||
* `Raise Layer`
|
||||
* `Lower Layer`
|
||||
* `GUI`
|
||||
* `Reset`
|
||||
|
||||
### symbol charactor layer
|
||||
|
||||

|
||||
|
||||
* Raise Layer
|
||||
* assigned symbolic(punctuation) characters
|
||||
* as could as possible, related neighbor keys
|
||||
* brackets
|
||||
* quotes
|
||||
* operators
|
||||
* slashes
|
||||
* related default layer keys
|
||||
* colons
|
||||
* exclamation and question
|
||||
* thus above features, easy learn keymapping
|
||||
* transparent all modifiers
|
||||
|
||||
### numbers and allows layer
|
||||
|
||||

|
||||
|
||||
* Lower Layer
|
||||
* entrust vim style arrows
|
||||
* also numkeys
|
||||
* additional, computer volume keys
|
||||
* transparent all modifiers
|
||||
|
||||
### Numpads and F key layer
|
||||
|
||||

|
||||
|
||||
* visibled when Raise and Lower layer visibled
|
||||
* F keys assigned left hand side
|
||||
* Numpads assigned right hand side
|
||||
* for that reason, override `RGUI` key
|
||||
* transparent mostly modifiers
|
||||
|
||||
|
||||
### Goals
|
||||
|
||||
* release a right little finger from symbols
|
||||
* entrust more symbols for a left hand
|
||||
* simple, minimal, easy learn
|
||||
* as soon as possible, don't disable any shortcuts
|
||||
|
||||
|
||||
### suggestions or find issues
|
||||
|
||||
[post issues for my fork](https://github.com/leico/qmk_firmware/issues)
|
||||
|
47
layouts/community/ortho_4x12/symbolic/config.h
Normal file
47
layouts/community/ortho_4x12/symbolic/config.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// prevent stuck modifiers
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
|
||||
// hold & tapping delay setting
|
||||
#define TAPPING_TERM 100
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
//#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(DVORAK_SOUND), \
|
||||
SONG(COLEMAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
171
layouts/community/ortho_4x12/symbolic/keymap.c
Normal file
171
layouts/community/ortho_4x12/symbolic/keymap.c
Normal file
@@ -0,0 +1,171 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _NEUTRAL 3
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
L_LOWER,
|
||||
R_LOWER,
|
||||
L_RAISE,
|
||||
R_RAISE
|
||||
};
|
||||
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,------------------------------------------------------------------------------------.
|
||||
* | | | | | | || | | | | | |
|
||||
* | Esc | Q | W | E | R | T || Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* |LCTL_T| | | | | || | | | | | |
|
||||
* | Tab | A | S | D | F | G || H | J | K | L | ; |Enter |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | | || | | | | | |
|
||||
* | | Z | X | C | V | B || N | M | , | . | ! | |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | |LSFT_T||RSFT_T| | | | | |
|
||||
* |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset |
|
||||
* `------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12( \
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||
XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_EXLM, XXXXXXX, \
|
||||
RESET, KC_LALT, KC_LGUI, L_LOWER, L_RAISE, LSFT_T( KC_SPC ), RSFT_T( KC_SPC ), R_RAISE, R_LOWER, KC_RGUI, KC_DEL, RESET \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,------------------------------------------------------------------------------------.
|
||||
* | | | | | | || | | | | | |
|
||||
* | Esc | | & | { | } | % || \ | [ | ] | # | | Bksp |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* |LCTL_T| | | | | || | | | | | |
|
||||
* | Tab | ~ | | | ( | ) | * || / | < | > | ' | : |Enter |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | | || | | | | | |
|
||||
* | | ` | ^ | @ | $ | + || - | = | _ | " | ? | |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | |LSFT_T||RSFT_T| | | | | |
|
||||
* |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset |
|
||||
* `------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12( \
|
||||
_______, XXXXXXX, KC_AMPR, KC_LCBR, KC_RCBR, KC_PERC, KC_BSLS, KC_LBRC, KC_RBRC, KC_HASH, XXXXXXX, _______, \
|
||||
_______, KC_TILD, KC_PIPE, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLSH, KC_LABK, KC_RABK, KC_QUOT, KC_COLN, _______, \
|
||||
_______, KC_GRV, KC_CIRC, KC_AT, KC_DLR, KC_PLUS, KC_MINS, KC_EQL, KC_UNDS, KC_DQUO, KC_QUES, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
/* Lower
|
||||
* ,------------------------------------------------------------------------------------.
|
||||
* | | | | | | || | | | | | |
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* |LCTL_T| | | | | || | | | | | |
|
||||
* | Tab | |VolDn |VolUp | Mute | || Left | Down | Up |Right | |Enter |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | | || | | | | | |
|
||||
* | | | | | | || | | | | | |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | |LSFT_T||RSFT_T| | | | | |
|
||||
* |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset |
|
||||
* `------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12( \
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||
_______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Neutral
|
||||
* ,------------------------------------------------------------------------------------.
|
||||
* | | | | | | || | | | | | |
|
||||
* | Esc | F1 | F2 | F3 | F4 | || + | - | 1 | 2 | 3 | Bksp |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* |LCTL_T| | | | | || | | | | | |
|
||||
* | Tab | F5 | F6 | F7 | F8 | || * | / | 4 | 5 | 6 |Enter |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | | || | | | | | |
|
||||
* | | F9 | F10 | F11 | F12 | || . | , | 7 | 8 | 9 | |
|
||||
* |------+------+------+------+------+------++------+------+------+------+------+------|
|
||||
* | | | | | |LSFT_T||RSFT_T| | | | | |
|
||||
* |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| 0 | Del |Reset |
|
||||
* `------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NEUTRAL] = LAYOUT_ortho_4x12( \
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_PPLS, KC_PMNS, KC_P1, KC_P2, KC_P3, _______, \
|
||||
_______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_PAST, KC_PSLS, KC_P4, KC_P5, KC_P6, _______, \
|
||||
_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PDOT, KC_COMM, KC_P7, KC_P8, KC_P9, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, _______, _______ \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
void DualKeyPressed ( bool brother_state, uint8_t target ){
|
||||
|
||||
if( brother_state ) return;
|
||||
|
||||
layer_on( target );
|
||||
return;
|
||||
}
|
||||
|
||||
void DualKeyReleased ( bool brother_state, uint8_t target1 ){
|
||||
|
||||
if( brother_state ) return ;
|
||||
|
||||
layer_off( target1 );
|
||||
return ;
|
||||
}
|
||||
|
||||
bool LayerSwitch ( keyrecord_t *record, bool *key_state, bool brother, uint8_t layer ){
|
||||
if ( record -> event.pressed ) {
|
||||
*key_state = true;
|
||||
DualKeyPressed( brother, layer );
|
||||
}
|
||||
else {
|
||||
*key_state = false;
|
||||
DualKeyReleased( brother, layer );
|
||||
}
|
||||
|
||||
update_tri_layer(_LOWER, _RAISE, _NEUTRAL );
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
static bool l_lower = false;
|
||||
static bool r_lower = false;
|
||||
|
||||
static bool l_raise = false;
|
||||
static bool r_raise = false;
|
||||
|
||||
switch (keycode) {
|
||||
|
||||
|
||||
case L_LOWER : return LayerSwitch( record, &l_lower, r_lower, _LOWER ); break;
|
||||
case R_LOWER : return LayerSwitch( record, &r_lower, l_lower, _LOWER ); break;
|
||||
case L_RAISE : return LayerSwitch( record, &l_raise, r_raise, _RAISE ); break;
|
||||
case R_RAISE : return LayerSwitch( record, &r_raise, l_raise, _RAISE ); break;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
@@ -773,6 +773,12 @@ void register_code(uint8_t code)
|
||||
else if IS_CONSUMER(code) {
|
||||
host_consumer_send(KEYCODE2CONSUMER(code));
|
||||
}
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
else if IS_MOUSEKEY(code) {
|
||||
mousekey_on(code);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/** \brief Utilities for actions. (FIXME: Needs better description)
|
||||
@@ -832,6 +838,11 @@ void unregister_code(uint8_t code)
|
||||
else if IS_CONSUMER(code) {
|
||||
host_consumer_send(0);
|
||||
}
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
else if IS_MOUSEKEY(code) {
|
||||
mousekey_off(code);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/** \brief Utilities for actions. (FIXME: Needs better description)
|
||||
|
@@ -142,10 +142,15 @@ int main(void) {
|
||||
|
||||
/* Wait until the USB or serial link is active */
|
||||
while (true) {
|
||||
#if defined(WAIT_FOR_USB) || defined(SERIAL_LINK_ENABLE)
|
||||
if(USB_DRIVER.state == USB_ACTIVE) {
|
||||
driver = &chibios_driver;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
driver = &chibios_driver;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SERIAL_LINK_ENABLE
|
||||
if(is_serial_link_connected()) {
|
||||
driver = get_serial_link_driver();
|
||||
@@ -178,6 +183,7 @@ int main(void) {
|
||||
/* Main loop */
|
||||
while(true) {
|
||||
|
||||
#if !defined(NO_USB_STARTUP_CHECK)
|
||||
if(USB_DRIVER.state == USB_SUSPENDED) {
|
||||
print("[s]");
|
||||
#ifdef VISUALIZER_ENABLE
|
||||
@@ -205,6 +211,7 @@ int main(void) {
|
||||
visualizer_resume();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
keyboard_task();
|
||||
#ifdef CONSOLE_ENABLE
|
||||
|
@@ -45,7 +45,7 @@ void matrix_scan_keymap(void) {
|
||||
|
||||
uint16_t effect_start_timer = 0;
|
||||
uint8_t user_rgb_mode = 0;
|
||||
LED_TYPE shadowed_led[RGBLED_NUM] = {0};
|
||||
LED_TYPE shadowed_led[RGBLED_NUM] = {{0}};
|
||||
|
||||
void start_firey_return(void) {
|
||||
user_rgb_mode = BREATH_FIRE;
|
||||
@@ -79,7 +79,7 @@ void set_color_for_offsets(uint16_t time_offset, uint16_t space_offset, uint8_t
|
||||
float alpha = (time_progress + 0.1) * 7.0 - space_progress;
|
||||
alpha = fmin(1.0, alpha*alpha);
|
||||
|
||||
LED_TYPE px[1] = {0};
|
||||
LED_TYPE px[1] = {{0}};
|
||||
sethsv((uint16_t)(fmod(time_progress * 1.5 + space_progress,1.0)*360), 255, (uint8_t)(progress*255),&px[0]);
|
||||
led[idx].r = alpha * px[0].r + ( 1.0 - alpha) * shadowed_led[idx].r;
|
||||
led[idx].g = alpha * px[0].g + ( 1.0 - alpha) * shadowed_led[idx].g;
|
||||
|
Reference in New Issue
Block a user