Merge branch 'Adding_My_Settings'

This commit is contained in:
Takeshi Nishio 2020-02-08 09:51:36 +09:00
commit e9d911ebf7
33 changed files with 2317 additions and 0 deletions

View File

@ -0,0 +1,33 @@
/*
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

View File

@ -0,0 +1,214 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 10
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
};
#define EISU LALT(KC_GRV)
#define ESC_ADJ LT(_ADJUST, KC_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,----------------------------------------------------------------------------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 |Pscree|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | ` | Q | W | E | R | T | - | | = | Y | U | I | O | P | \ |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | A | S | D | F | G | Del | | Bksp | H | J | K | L | ; | " |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | Space| | Enter| N | M | , | . | / | Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Left | Down | Up | Right|
* ,----------------------------------------------------------------------------------------------------------------------.
*/
/* DEFAULT
[_QWERTY] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_SPC , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_DEL, KC_BSPC,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
*/
/* Qwerty
* ,----------------------------------------------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Bksp |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | | Y | U | I | O | P | [ | ] |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Ctrl | A | S | D | F | G | H | | H | J | K | L | ; | " | Enter|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | Raise| | Lower| N | M | , | . | Up | / Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | ESC | GUI | ALt | GUI |||||||| Raise| Space| Lower|||||||| Space| Raise| Lower/||||||| GUI | Left | Down | Right|
* ,----------------------------------------------------------------------------------------------------------------------.
*/
[_QWERTY] = LAYOUT( \
ESC_ADJ, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_T(KC_SLSH), \
KC_MUTE, KC_VOLD, KC_VOLU, KC_LALT, KC_LGUI, KC_SPC, RAISE, LOWER, KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT \
),
/* Lower
* ,----------------------------------------------------------------------------------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Home |PageDn|PageUp| End |
* ,----------------------------------------------------------------------------------------------------------------------.
*/
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_DEL, \
_______, _______, _______, LCTL(KC_E), _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, \
KC_CAPS, LCTL(KC_A), _______, KC_DEL, KC_RGHT, KC_ESC, KC_Y, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
_______, _______, _______, _______, _______, KC_LEFT, KC_H, _______, KC_DOWN, KC_LEFT, KC_DOWN, KC_RGHT, KC_SLSH, KC_HOME, \
KC_MRWD, KC_MPLY, KC_MFFD, _______, _______, _______, _______, _______,_______, _______, _______, KC_END, KC_PGDN, KC_PGUP \
),
/* Raise
* ,----------------------------------------------------------------------------------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Home |PageDn|PageUp| End |
* ,----------------------------------------------------------------------------------------------------------------------.
*/
[_RAISE] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PEQL, KC_PSLS, KC_PAST, KC_PMNS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_MRWD, KC_MPLY, KC_MFFD, _______, _______, _______, _______, _______,_______, _______, KC_P0, KC_BSPC, KC_PDOT, KC_PENT \
),
/* Adjust
* ,----------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | | | BL ON| BRTG| INC| DEC| | | | | | | | | |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | | | |
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | | | | |||||||| | | |||||||| | | |||||||| | | | |
* ,----------------------------------------------------------------------------------------------------------------------.
*/
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \
_______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
_______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______,_______,_______, _______,_______, _______, _______, _______, _______, _______ \
)
};
#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);
}
// レイヤーキーを変換・無変換キーと共用する際に動作を改善する。
static bool lower_pressed = false;
static uint16_t lower_pressed_time = 0;
static bool raise_pressed = false;
static uint16_t raise_pressed_time = 0;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case LOWER:
if (record->event.pressed) {
lower_pressed = true;
lower_pressed_time = record->event.time;
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
/*
if (lower_pressed && (TIMER_DIFF_16(record->event.time, lower_pressed_time) < TAPPING_TERM)) {
*/
if (lower_pressed) {
register_code(KC_LANG2); // for macOS
register_code(KC_MHEN);
unregister_code(KC_MHEN);
unregister_code(KC_LANG2);
}
lower_pressed = false;
}
return false;
break;
case RAISE:
if (record->event.pressed) {
raise_pressed = true;
raise_pressed_time = record->event.time;
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
/*
if (raise_pressed && (TIMER_DIFF_16(record->event.time, raise_pressed_time) < TAPPING_TERM)) {
*/
if (raise_pressed) {
register_code(KC_LANG1); // for macOS
register_code(KC_HENK);
unregister_code(KC_HENK);
unregister_code(KC_LANG1);
}
raise_pressed = false;
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
default:
if (record->event.pressed) {
// reset the flags
lower_pressed = false;
raise_pressed = false;
}
break;
}
return true;
}

View File

@ -0,0 +1,3 @@
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = no

View File

@ -0,0 +1,33 @@
/*
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

View File

@ -0,0 +1,166 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
//ADJUST,
};
#define EISU LALT(KC_GRV)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,----------------------------------------------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Bksp |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | | Y | U | I | O | P | [ | ] |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Ctrl | A | S | D | F | G | H | | H | J | K | L | ; | " | Enter|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | Raise| | Lower| N | M | , | . | Up | / Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | ESC | GUI | ALt | GUI |||||||| Raise| Space| Lower|||||||| Space| Raise| Lower/||||||| GUI | Left | Down | Right|
* ,----------------------------------------------------------------------------------------------------------------------.
*/
/*
[_QWERTY] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_SPC , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_DEL, KC_BSPC,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
*/
[_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_MINS, KC_EQL, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, 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, RAISE, LOWER, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, RSFT_T(KC_SLSH), \
KC_ESC, KC_LGUI, KC_LALT, KC_LGUI, RAISE, KC_SPC, LOWER, KC_SPC, RAISE, LOWER, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT \
),
/* Lower
* ,----------------------------------------------------------------------------------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Home |PageDn|PageUp| End |
* ,----------------------------------------------------------------------------------------------------------------------.
*/
[_LOWER] = LAYOUT(
_______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_PEQL, KC_PSLS, KC_PAST, KC_PMNS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, \
_______, _______, _______, _______, _______, _______, _______, _______,_______, _______, KC_P0, KC_BSPC, KC_PDOT, KC_PENT \
),
/* Raise
* ,----------------------------------------------------------------------------------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
* | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Home |PageDn|PageUp| End |
* ,----------------------------------------------------------------------------------------------------------------------.
*/
[_RAISE] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_BSLS, \
_______, _______, _______, _______, KC_RGHT, KC_ESC, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, KC_LEFT, _______, _______, KC_DOWN, _______, _______, KC_SLSH, KC_PGUP, KC_SLSH, \
_______, _______, _______, _______, _______, _______, _______, _______,_______, _______, KC_LGUI, KC_HOME, KC_PGDN, KC_END \
),
/* Adjust
* ,----------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | | | BL ON| BRTG| INC| DEC| | | | | | | | | |
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | | | |
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
* | | | | |||||||| | | |||||||| | | |||||||| | | | |
* ,----------------------------------------------------------------------------------------------------------------------.
*/
/*
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \
_______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
_______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______,_______,_______, _______,_______, _______, _______, _______, _______, _______ \
)
*/
};
#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) {
print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_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 ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
*/
}
return true;
}

View File

@ -0,0 +1,3 @@
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = yes

View File

@ -0,0 +1,115 @@
/*
Copyright 2019 yohei <yohewi@gmail.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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6062
#define DEVICE_VER 0x0001
#define MANUFACTURER Profet
#define PRODUCT Atreus
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 13
// wiring of each half
#define MATRIX_ROW_PINS { C6, D7, E6, B4 }
#define MATRIX_COL_PINS { B6, F4, F5, F6, F7, B1, B3, B2, D2, D1, D0, D4, B5 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
//#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* 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
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_TIMER
//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
// keyboard RGB LED support
//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
#define RGBLED_NUM 6
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_VAL_STEP 17
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#if defined(RGBLIGHT_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for stonehenge30 keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

View File

@ -0,0 +1,115 @@
/*
Copyright 2019 yohei <yohewi@gmail.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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6062
#define DEVICE_VER 0x0001
#define MANUFACTURER Profet
#define PRODUCT Atreus
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 11
// wiring of each half
#define MATRIX_ROW_PINS { C6, D7, E6, B4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D2, D1, D0, D4 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
//#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* 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
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_TIMER
//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
// keyboard RGB LED support
//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
#define RGBLED_NUM 6
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_VAL_STEP 17
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#if defined(RGBLIGHT_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for stonehenge30 keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "numatreus",
"url": "",
"maintainer": "qmk",
"width": 13,
"height": 4.7,
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}]
}
}
}

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "numatreus",
"url": "",
"maintainer": "qmk",
"width": 13,
"height": 4.7,
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}]
}
}
}

View File

@ -0,0 +1,206 @@
// 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 _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 10
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( /* Qwerty */
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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
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_SLSH),
KC_MUTE, KC_VOLD, KC_VOLU, KC_LALT, KC_LGUI, KC_SPC, LOWER, RAISE, KC_BSPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT
),
/*
* ! @ # $ % || ^ & * ( )
* del left down right pgdn || down F4 F5 F6 F11
* volup reset || F1 F2 F3 F12
* voldn super shift space bspc|| alt ent L0 prtsc scroll pause
*/
[_LOWER] = LAYOUT( /* [> LOWER <] */
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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_HOME,KC_PGDN,KC_PGUP,KC_END, KC_BSLS,KC_QUOT,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,KC_LBRC,KC_RBRC,KC_PGUP,_______,
KC_MRWD,KC_MPLY,KC_MFFD,_______,_______,_______,_______, _______,_______,_______,_______,KC_HOME,KC_PGDN,KC_END
),
/*
* 1 2 3 4 5 || 6 7 8 9 0
* # left down right $ || pgdn 4 5 6 +
* [ ] ( ) & || ` 1 2 3 \
* lower insert super shift space bksp|| alt Ent fn . 0 =
*/
[_RAISE] = LAYOUT( /* [> RAISE <] */
KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_PLUS,
_______,_______,_______,KC_DEL, KC_RGHT,KC_ESC, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_PIPE,KC_DQUO,
_______,_______,_______,_______,_______,KC_LEFT, _______,_______,KC_LCBR,KC_RCBR,_______,_______,
KC_MRWD,KC_MPLY,KC_MFFD,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______
),
/*
* ! @ # $ % || ^ & * ( )
* del left down right pgdn || down F4 F5 F6 F11
* volup reset || F1 F2 F3 F12
* voldn super shift space bspc|| alt ent L0 prtsc scroll pause
*/
[_ADJUST] = LAYOUT( /* [> ADJUST <] */
_______,_______,_______,_______,RESET, _______, _______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______
)
};
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;
};
// レイヤーキーを変換・無変換キーと共用する際に動作を改善する。
static bool lower_pressed = false;
static uint16_t lower_pressed_time = 0;
static bool raise_pressed = false;
static uint16_t raise_pressed_time = 0;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case LOWER:
if (record->event.pressed) {
lower_pressed = true;
lower_pressed_time = record->event.time;
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
/*
if (lower_pressed && (TIMER_DIFF_16(record->event.time, lower_pressed_time) < TAPPING_TERM)) {
*/
if (lower_pressed) {
register_code(KC_LANG2); // for macOS
register_code(KC_MHEN);
unregister_code(KC_MHEN);
unregister_code(KC_LANG2);
}
lower_pressed = false;
}
return false;
break;
case RAISE:
if (record->event.pressed) {
raise_pressed = true;
raise_pressed_time = record->event.time;
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
/*
if (raise_pressed && (TIMER_DIFF_16(record->event.time, raise_pressed_time) < TAPPING_TERM)) {
*/
if (raise_pressed) {
register_code(KC_LANG1); // for macOS
register_code(KC_HENK);
unregister_code(KC_HENK);
unregister_code(KC_LANG1);
}
raise_pressed = false;
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
default:
if (record->event.pressed) {
// reset the flags
lower_pressed = false;
raise_pressed = false;
}
break;
}
return true;
}
/*
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_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 ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}
*/

View File

@ -0,0 +1,64 @@
// 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_LSFT, KC_TAB, KC_LCTL, MO(_LW), KC_SPC, KC_BSPC, KC_LALT, KC_ENT, MO(_RS), KC_MINS, KC_QUOT, KC_BSPC
),
/*
* 1 2 3 4 5 || 6 7 8 9 0
* # left down right $ || pgdn 4 5 6 +
* [ ] ( ) & || ` 1 2 3 \
* lower insert super shift space bksp|| alt Ent fn . 0 =
*/
[_RS] = LAYOUT( /* [> RAISE <] */
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
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_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_TRNS, KC_DOT, KC_0, KC_EQL ),
/*
* ! @ # $ % || ^ & * ( )
* del left down right pgdn || down F4 F5 F6 F11
* volup reset || F1 F2 F3 F12
* voldn super shift space bspc|| alt ent L0 prtsc scroll pause
*/
[_LW] = LAYOUT( /* [> LOWER <] */
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN ,
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_UP, KC_F12 ,
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, TO(_QW), KC_LEFT, KC_DOWN, KC_RGHT )
};
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;
};

View File

@ -0,0 +1,60 @@
/*
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
#ifdef TAPPING_TERM
#undef TAPPING_TERM
#endif
#define TAPPING_TERM 225
#define PREVENT_STUCK_MODIFIERS
#define IGNORE_MOD_TAP_INTERRUPT
#ifdef MOUSEKEY_ENABLE
#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 1
#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 4
#undef MOUSEKEY_DELAY
#define MOUSEKEY_DELAY 0
#endif
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
//#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
//#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif

View File

@ -0,0 +1,214 @@
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
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
// 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 {
_BASE = 0,
_NUMPAD,
_LOWER,
_RAISE,
_ADJUST,
};
enum custom_keycodes {
BASE = SAFE_RANGE,
NUMPAD,
KANJI,
LOWER,
RAISE,
ADJUST,
RGBRST
};
enum tapdances{
TD_CODO = 0,
// TD_MNUB,
};
// Layer Mode aliases
#define KC_LOWER LOWER
#define KC_RAISE RAISE
#define KC_ADJST ADJUST
#define KC_DLNP NUMPAD //DF(_NUMPAD)
#define KC_DLBS BASE //DF(_BASE)
#define KC______ KC_TRNS
#define KC_XXXXX KC_NO
#define KC_KANJI KANJI
#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_LMOD RGB_MOD
#define KC_KNRM AG_NORM
#define KC_KSWP AG_SWAP
#define KC_ZSFT LSFT_T(KC_Z)
#define KC_MNSF LSFT_T(KC_MINS)
#define KC_ESCT LCTL_T(KC_ESC)
#define KC_TBAL LALT_T(KC_TAB)
#define KC_11SF LSFT_T(KC_F11)
#define KC_ALAP LALT_T(KC_APP)
#define KC_JEQL LSFT(KC_MINS)
#define KC_WLCK LALT(KC_L)
#define KC_SFEQ LSFT(KC_MINS)
#define KC_SFPL LSFT(KC_SCLN)
#define KC_SFAS LSFT(KC_QUOT)
#define KC_CODO TD(TD_CODO)
// #define KC_MNUB TD(TD_MNUB)
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
// [TD_MNUB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, LSFT(KC_RO)),
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_kc( \
//,----------------------------------. ,----------------------------------.
Q, W, E, R, T, Y, U, I, O, P,\
//|------+------+------+------+------| |------+------+------+------+------|
A, S, D, F, G, H, J, K, L, ENT,\
//|------+------+------+------+------| |------+------+------+------+------|
ZSFT, X, C, V, B, N, M, CODO, UP, MNSF,\
//|------+------+------+------+------|------+------+------+------+------+------+------|
ESCT, TBAL, LGUI, LOWER, BSPC, BSPC, SPC, SPC, RAISE, LEFT, DOWN, RGHT \
//|------+------+------+------+-------------+------+------+------+------+------+------|
),
[_NUMPAD] = LAYOUT_kc( \
//,----------------------------------. ,----------------------------------.
P7, P8, P9, PAST, NLCK, P7, P8, P9, PAST, NLCK,\
//|------+------+------+------+------| |------+------+------+------+------|
P4, P5, P6, PMNS, PSLS, P4, P5, P6, PMNS, PSLS,\
//|------+------+------+------+------| |------+------+------+------+------|
P1, P2, P3, PPLS, QUOT, P1, P2, P3, PPLS, QUOT,\
//|------+------+------+------+------|------+------+------+------+------+------+------|
DLBS, P0, PDOT, SFEQ, SPC, DEL, SPC, DLBS, P0, PDOT, SFEQ, BSPC \
//|------+------+------+------+-------------+------+------+------+------+------+------|
),
[_LOWER] = LAYOUT_kc( \
//,----------------------------------. ,----------------------------------.
F1, F2, F3, F4, F5, MINS, EQL, JYEN, LBRC, RBRC,\
//|------+------+------+------+------| |------+------+------+------+------|
F6, F7, F8, F9, F10, XXXXX, XXXXX, SCLN, QUOT, BSLS,\
//|------+------+------+------+------| |------+------+------+------+------|
11SF, F12, DLNP, KANJI, ENT, XXXXX, COMM, DOT, SLSH, RO,\
//|------+------+------+------+------|------+------+------+------+------+------+------|
_____, _____, _____, _____, DEL, _____, _____, _____, _____, _____, _____, _____ \
//|------+------+------+------+-------------+------+------+------+------+------+------|
),
[_RAISE] = LAYOUT_kc( \
//,----------------------------------. ,----------------------------------.
1, 2, 3, 4, 5, 6, 7, 8, 9, 0,\
//|------+------+------+------+------| |------+------+------+------+------|
XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, QUOT, 4, 5, 6, MINS,\
//|------+------+------+------+------| |------+------+------+------+------|
LSFT, XXXXX, XXXXX, XXXXX, XXXXX, SLSH, 1, 2, 3, PPLS,\
//|------+------+------+------+------|------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, WLCK, _____, 0, DOT, JEQL \
//|------+------+------+------+-------------+------+------+------+------+------+------|
),
[_ADJUST] = LAYOUT_kc( \
//,----------------------------------. ,----------------------------------.
RST, LRST, KNRM, KSWP, CAPS, XXXXX, WH_L, WH_U, HOME, PGUP,\
//|------+------+------+------+------| |------+------+------+------+------|
LTOG, LHUI, LSAI, LVAI, SLCK, XXXXX, WH_R, WH_D, END, PGDN,\
//|------+------+------+------+------| |------+------+------+------+------|
LMOD, LHUD, LSAD, LVAD, NLCK, XXXXX, BTN1, BTN2, MS_U, XXXXX,\
//|------+------+------+------+------|------+------+------+------+------+------+------|
LSFT, _____, _____, _____, _____, _____, _____, _____, _____, MS_L, MS_D, MS_R \
//|------+------+------+------+-------------+------+------+------+------+------+------|
)
};
#define L_BASE _BASE
#define L_NUMPAD (1<<_NUMPAD)
static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
pressed ? layer_on(layer1) : layer_off(layer1);
IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
}
int RGB_current_mode;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool result = false;
switch (keycode) {
case BASE:
if (record->event.pressed) {
default_layer_set(L_BASE);
}
break;
case NUMPAD:
if (record->event.pressed) {
default_layer_set(L_NUMPAD);
}
break;
case LOWER:
update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
break;
case RAISE:
update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
break;
case KANJI:
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);
}
break;
#ifdef RGBLIGHT_ENABLE
//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:
if (record->event.pressed) {
rgblight_mode(RGB_current_mode);
rgblight_step();
RGB_current_mode = rgblight_config.mode;
}
break;
case RGBRST:
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
RGB_current_mode = rgblight_config.mode;
}
break;
#endif
default:
result = true;
break;
}
return result;
}
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
RGB_current_mode = rgblight_config.mode;
#endif
}

View File

@ -0,0 +1,8 @@
MOUSEKEY_ENABLE = yes
TAP_DANCE_ENABLE = yes
RGBLIGHT_ENABLE = yes
LED_ANIMATIONS = yes
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DLED_ANIMATIONS
endif

View File

@ -0,0 +1,38 @@
#ifndef NUMATREUS_H
#define NUMATREUS_H
#include "quantum.h"
#include "matrix.h"
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \
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, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
{ \
{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
{ k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
{ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \
}
// Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc( \
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, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
LAYOUT( \
KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, \
KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, \
KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, \
KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
)
#endif

View File

@ -0,0 +1 @@
#include "numatreus_plus8.h"

View File

@ -0,0 +1,39 @@
#ifndef NUMATREUS_H
#define NUMATREUS_H
#include "quantum.h"
#include "matrix.h"
#define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d \
) \
{ \
{ k00, k01, k02, k03, k04, k05, XXX, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, XXX, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k36, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b, k3c, k3d } \
}
// Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d \
) \
LAYOUT( \
KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c, KC_##k3d \
)
#endif

View File

@ -0,0 +1,16 @@
NumAtreus
===
A small mechanical keyboard that is based around the shape of the human hand.
Keyboard Maintainer: [Phil Hagelberg](https://github.com/technomancy)
Hardware Supported: NumAtreus, PCB-based or hand-wired
Hardware Availability:
Make example for this keyboard (after setting up your build environment):
make numatreus:default:avrdude
Unlike the TMK firmware, this command should be run from the root of
the repository, not the directory containing this readme.

View File

@ -0,0 +1,70 @@
# 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.
BOOTLOADER = caterina
# 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 = no # Enable keyboard backlight functionality
#MIDI_ENABLE = no # MIDI controls
UNICODE_ENABLE = yes # Unicode
#BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
#TAP_DANCE_ENABLE = yes
RGBLIGHT_ENABLE = no
LED_ANIMATIONS = no
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DLED_ANIMATIONS
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

View File

@ -0,0 +1,264 @@
/*
Copyright 2020 Takeshi Nishio
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 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER Takeshi Nishio
#define PRODUCT test_k15r2
#define DESCRIPTION A custom keyboard
/* key matrix size */
//#define MATRIX_ROWS 6*2
#define MATRIX_ROWS 3
#define MATRIX_COLS 5
/*
* 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 { F6, F7, B1, B3, B2, B6 }
#define MATRIX_ROW_PINS { F6, F7, B1}
//#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4, B5, F4, F5 }
#define MATRIX_COL_PINS { D1, D0, D4, C6, D7 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/* Encorders */
#define ENCODERS_PAD_A { B6, B5 }
#define ENCODERS_PAD_B { B2, B4 }
#define ENCODER_RESOLUTION 4
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
#define RGB_DI_PIN D3
#ifdef RGB_DI_PIN
#define RGBLED_NUM 8
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// /*== all animations enable ==*/
// #define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
// #define RGBLIGHT_EFFECT_SNAKE
// #define RGBLIGHT_EFFECT_KNIGHT
// #define RGBLIGHT_EFFECT_CHRISTMAS
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
// /*== customize breathing effect ==*/
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
// /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
//#define DEBOUNCE 5
#define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP H
//#define MAGIC_KEY_HELP_ALT SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#endif
/*
* 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 1
/*
* HD44780 LCD Display Configuration
*/
/*
#define LCD_LINES 2 //< number of visible lines of the display
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
#if LCD_IO_MODE
#define LCD_PORT PORTB //< port for the LCD lines
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
#define LCD_RS_PORT LCD_PORT //< port for RS line
#define LCD_RS_PIN 3 //< pin for RS line
#define LCD_RW_PORT LCD_PORT //< port for RW line
#define LCD_RW_PIN 2 //< pin for RW line
#define LCD_E_PORT LCD_PORT //< port for Enable line
#define LCD_E_PIN 1 //< pin for Enable line
#endif
*/
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0
/* Serial settings */
#define USE_SERIAL
#define RGBLED_SPLIT {8,8}

View File

@ -0,0 +1,18 @@
{
"keyboard_name": "test_k15r2",
"url": "",
"maintainer": "Takeshi Nishio",
"width": 3,
"height": 2,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"k00", "x":0, "y":0},
{"label":"k01", "x":1, "y":0},
{"label":"k02", "x":2, "y":0},
{"label":"k10", "x":0, "y":1, "w":1.5},
{"label":"k12", "x":1.5, "y":1, "w":1.5}
]
}
}
}

View File

@ -0,0 +1 @@
#pragma once

View File

@ -0,0 +1,228 @@
/* Copyright 2019 e3w2q
*
* 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
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
SEND_A1 = SAFE_RANGE,
SEND_B1, SEND_C1, SEND_D1, SEND_E1, SEND_F1, SEND_G1, SEND_H1, SEND_I1, SEND_J1,
SEND_A2, SEND_B2, SEND_C2, SEND_D2, SEND_E2, SEND_F2, SEND_G2, SEND_H2, SEND_I2, SEND_J2,
SEND_A3, SEND_B3, SEND_C3, SEND_D3, SEND_E3, SEND_F3, SEND_G3, SEND_H3, SEND_I3, SEND_J3,
SEND_A4, SEND_B4, SEND_C4, SEND_D4, SEND_E4, SEND_F4, SEND_G4, SEND_H4, SEND_I4, SEND_J4,
SEND_A5, SEND_B5, SEND_C5, SEND_D5, SEND_E5, SEND_F5, SEND_G5, SEND_H5, SEND_I5, SEND_J5,
SEND_A6, SEND_B6, SEND_C6, SEND_D6, SEND_E6, SEND_F6, SEND_G6, SEND_H6, SEND_I6, SEND_J6,
SEND_SA1, SEND_SB1, SEND_SC1, SEND_SD1, SEND_SE1, SEND_SF1, SEND_SG1, SEND_SH1, SEND_SI1, SEND_SJ1,
SEND_SA2, SEND_SB2, SEND_SC2, SEND_SD2, SEND_SE2, SEND_SF2, SEND_SG2, SEND_SH2, SEND_SI2, SEND_SJ2,
SEND_SA3, SEND_SB3, SEND_SC3, SEND_SD3, SEND_SE3, SEND_SF3, SEND_SG3, SEND_SH3, SEND_SI3, SEND_SJ3,
SEND_SA4, SEND_SB4, SEND_SC4, SEND_SD4, SEND_SE4, SEND_SF4, SEND_SG4, SEND_SH4, SEND_SI4, SEND_SJ4,
SEND_SA5, SEND_SB5, SEND_SC5, SEND_SD5, SEND_SE5, SEND_SF5, SEND_SG5, SEND_SH5, SEND_SI5, SEND_SJ5,
SEND_SA6, SEND_SB6, SEND_SC6, SEND_SD6, SEND_SE6, SEND_SF6, SEND_SG6, SEND_SH6, SEND_SI6, SEND_SJ6
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default Layer
* Master Side (USB Cable Connected Side)
* ,---------------------------------------------------
* | A1 B1 C1 D1 E1 F1 G1 H1 I1 J1
* | A2 B2 C2 D2 E2 F2 G2 H2 I2 J2
* | A3 B3 C3 D3 E3 F3 G3 H3 I3 J3
* | A4 B4 C4 D4 E4 F4 G4 H4 I4 J4
* | A5 B5 C5 D5 E5 F5 G5 H5 I5 J5
* | A6 B6 C6 D6 E6 F6 G6 H6 I6 J6
* `---------------------------------------------------
* Slave Side (USB Cable Not Connected Side)
* ,---------------------------------------------------
* | SA1 SB1 SC1 SD1 SE1 SF1 SG1 SH1 SI1 SJ1
* | SA2 SB2 SC2 SD2 SE2 SF2 SG2 SH2 SI2 SJ2
* | SA3 SB3 SC3 SD3 SE3 SF3 SG3 SH3 SI3 SJ3
* | SA4 SB4 SC4 SD4 SE4 SF4 SG4 SH4 SI4 SJ4
* | SA5 SB5 SC5 SD5 SE5 SF5 SG5 SH5 SI5 SJ5
* | SA6 SB6 SC6 SD6 SE6 SF6 SG6 SH6 SI6 SJ6
* `---------------------------------------------------
*/
[0] = LAYOUT( /* Base */
SEND_A1, SEND_B1, SEND_C1, SEND_D1, SEND_E1, SEND_F1, SEND_G1, SEND_H1, SEND_I1, SEND_J1,
SEND_A2, SEND_B2, SEND_C2, SEND_D2, SEND_E2, SEND_F2, SEND_G2, SEND_H2, SEND_I2, SEND_J2,
SEND_A3, SEND_B3, SEND_C3, SEND_D3, SEND_E3, SEND_F3, SEND_G3, SEND_H3, SEND_I3, SEND_J3,
SEND_A4, SEND_B4, SEND_C4, SEND_D4, SEND_E4, SEND_F4, SEND_G4, SEND_H4, SEND_I4, SEND_J4,
SEND_A5, SEND_B5, SEND_C5, SEND_D5, SEND_E5, SEND_F5, SEND_G5, SEND_H5, SEND_I5, SEND_J5,
SEND_A6, SEND_B6, SEND_C6, SEND_D6, SEND_E6, SEND_F6, SEND_G6, SEND_H6, SEND_I6, SEND_J6,
SEND_SA1, SEND_SB1, SEND_SC1, SEND_SD1, SEND_SE1, SEND_SF1, SEND_SG1, SEND_SH1, SEND_SI1, SEND_SJ1,
SEND_SA2, SEND_SB2, SEND_SC2, SEND_SD2, SEND_SE2, SEND_SF2, SEND_SG2, SEND_SH2, SEND_SI2, SEND_SJ2,
SEND_SA3, SEND_SB3, SEND_SC3, SEND_SD3, SEND_SE3, SEND_SF3, SEND_SG3, SEND_SH3, SEND_SI3, SEND_SJ3,
SEND_SA4, SEND_SB4, SEND_SC4, SEND_SD4, SEND_SE4, SEND_SF4, SEND_SG4, SEND_SH4, SEND_SI4, SEND_SJ4,
SEND_SA5, SEND_SB5, SEND_SC5, SEND_SD5, SEND_SE5, SEND_SF5, SEND_SG5, SEND_SH5, SEND_SI5, SEND_SJ5,
SEND_SA6, SEND_SB6, SEND_SC6, SEND_SD6, SEND_SE6, SEND_SF6, SEND_SG6, SEND_SH6, SEND_SI6, SEND_SJ6
),
[1] = LAYOUT(
RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SEND_A1: if (record->event.pressed) SEND_STRING("A1"); break;
case SEND_B1: if (record->event.pressed) SEND_STRING("B1"); break;
case SEND_C1: if (record->event.pressed) SEND_STRING("C1"); break;
case SEND_D1: if (record->event.pressed) SEND_STRING("D1"); break;
case SEND_E1: if (record->event.pressed) SEND_STRING("E1"); break;
case SEND_F1: if (record->event.pressed) SEND_STRING("F1"); break;
case SEND_G1: if (record->event.pressed) SEND_STRING("G1"); break;
case SEND_H1: if (record->event.pressed) SEND_STRING("H1"); break;
case SEND_I1: if (record->event.pressed) SEND_STRING("I1"); break;
case SEND_J1: if (record->event.pressed) SEND_STRING("J1"); break;
case SEND_A2: if (record->event.pressed) SEND_STRING("A2"); break;
case SEND_B2: if (record->event.pressed) SEND_STRING("B2"); break;
case SEND_C2: if (record->event.pressed) SEND_STRING("C2"); break;
case SEND_D2: if (record->event.pressed) SEND_STRING("D2"); break;
case SEND_E2: if (record->event.pressed) SEND_STRING("E2"); break;
case SEND_F2: if (record->event.pressed) SEND_STRING("F2"); break;
case SEND_G2: if (record->event.pressed) SEND_STRING("G2"); break;
case SEND_H2: if (record->event.pressed) SEND_STRING("H2"); break;
case SEND_I2: if (record->event.pressed) SEND_STRING("I2"); break;
case SEND_J2: if (record->event.pressed) SEND_STRING("J2"); break;
case SEND_A3: if (record->event.pressed) SEND_STRING("A3"); break;
case SEND_B3: if (record->event.pressed) SEND_STRING("B3"); break;
case SEND_C3: if (record->event.pressed) SEND_STRING("C3"); break;
case SEND_D3: if (record->event.pressed) SEND_STRING("D3"); break;
case SEND_E3: if (record->event.pressed) SEND_STRING("E3"); break;
case SEND_F3: if (record->event.pressed) SEND_STRING("F3"); break;
case SEND_G3: if (record->event.pressed) SEND_STRING("G3"); break;
case SEND_H3: if (record->event.pressed) SEND_STRING("H3"); break;
case SEND_I3: if (record->event.pressed) SEND_STRING("I3"); break;
case SEND_J3: if (record->event.pressed) SEND_STRING("J3"); break;
case SEND_A4: if (record->event.pressed) SEND_STRING("A4"); break;
case SEND_B4: if (record->event.pressed) SEND_STRING("B4"); break;
case SEND_C4: if (record->event.pressed) SEND_STRING("C4"); break;
case SEND_D4: if (record->event.pressed) SEND_STRING("D4"); break;
case SEND_E4: if (record->event.pressed) SEND_STRING("E4"); break;
case SEND_F4: if (record->event.pressed) SEND_STRING("F4"); break;
case SEND_G4: if (record->event.pressed) SEND_STRING("G4"); break;
case SEND_H4: if (record->event.pressed) SEND_STRING("H4"); break;
case SEND_I4: if (record->event.pressed) SEND_STRING("I4"); break;
case SEND_J4: if (record->event.pressed) SEND_STRING("J4"); break;
case SEND_A5: if (record->event.pressed) SEND_STRING("A5"); break;
case SEND_B5: if (record->event.pressed) SEND_STRING("B5"); break;
case SEND_C5: if (record->event.pressed) SEND_STRING("C5"); break;
case SEND_D5: if (record->event.pressed) SEND_STRING("D5"); break;
case SEND_E5: if (record->event.pressed) SEND_STRING("E5"); break;
case SEND_F5: if (record->event.pressed) SEND_STRING("F5"); break;
case SEND_G5: if (record->event.pressed) SEND_STRING("G5"); break;
case SEND_H5: if (record->event.pressed) SEND_STRING("H5"); break;
case SEND_I5: if (record->event.pressed) SEND_STRING("I5"); break;
case SEND_J5: if (record->event.pressed) SEND_STRING("J5"); break;
case SEND_A6: if (record->event.pressed) SEND_STRING("A6"); break;
case SEND_B6: if (record->event.pressed) SEND_STRING("B6"); break;
case SEND_C6: if (record->event.pressed) SEND_STRING("C6"); break;
case SEND_D6: if (record->event.pressed) SEND_STRING("D6"); break;
case SEND_E6: if (record->event.pressed) SEND_STRING("E6"); break;
case SEND_F6: if (record->event.pressed) SEND_STRING("F6"); break;
case SEND_G6: if (record->event.pressed) SEND_STRING("G6"); break;
case SEND_H6: if (record->event.pressed) SEND_STRING("H6"); break;
case SEND_I6: if (record->event.pressed) SEND_STRING("I6"); break;
case SEND_J6: if (record->event.pressed) SEND_STRING("J6"); break;
case SEND_SA1: if (record->event.pressed) SEND_STRING("SA1"); break;
case SEND_SB1: if (record->event.pressed) SEND_STRING("SB1"); break;
case SEND_SC1: if (record->event.pressed) SEND_STRING("SC1"); break;
case SEND_SD1: if (record->event.pressed) SEND_STRING("SD1"); break;
case SEND_SE1: if (record->event.pressed) SEND_STRING("SE1"); break;
case SEND_SF1: if (record->event.pressed) SEND_STRING("SF1"); break;
case SEND_SG1: if (record->event.pressed) SEND_STRING("SG1"); break;
case SEND_SH1: if (record->event.pressed) SEND_STRING("SH1"); break;
case SEND_SI1: if (record->event.pressed) SEND_STRING("SI1"); break;
case SEND_SJ1: if (record->event.pressed) SEND_STRING("SJ1"); break;
case SEND_SA2: if (record->event.pressed) SEND_STRING("SA2"); break;
case SEND_SB2: if (record->event.pressed) SEND_STRING("SB2"); break;
case SEND_SC2: if (record->event.pressed) SEND_STRING("SC2"); break;
case SEND_SD2: if (record->event.pressed) SEND_STRING("SD2"); break;
case SEND_SE2: if (record->event.pressed) SEND_STRING("SE2"); break;
case SEND_SF2: if (record->event.pressed) SEND_STRING("SF2"); break;
case SEND_SG2: if (record->event.pressed) SEND_STRING("SG2"); break;
case SEND_SH2: if (record->event.pressed) SEND_STRING("SH2"); break;
case SEND_SI2: if (record->event.pressed) SEND_STRING("SI2"); break;
case SEND_SJ2: if (record->event.pressed) SEND_STRING("SJ2"); break;
case SEND_SA3: if (record->event.pressed) SEND_STRING("SA3"); break;
case SEND_SB3: if (record->event.pressed) SEND_STRING("SB3"); break;
case SEND_SC3: if (record->event.pressed) SEND_STRING("SC3"); break;
case SEND_SD3: if (record->event.pressed) SEND_STRING("SD3"); break;
case SEND_SE3: if (record->event.pressed) SEND_STRING("SE3"); break;
case SEND_SF3: if (record->event.pressed) SEND_STRING("SF3"); break;
case SEND_SG3: if (record->event.pressed) SEND_STRING("SG3"); break;
case SEND_SH3: if (record->event.pressed) SEND_STRING("SH3"); break;
case SEND_SI3: if (record->event.pressed) SEND_STRING("SI3"); break;
case SEND_SJ3: if (record->event.pressed) SEND_STRING("SJ3"); break;
case SEND_SA4: if (record->event.pressed) SEND_STRING("SA4"); break;
case SEND_SB4: if (record->event.pressed) SEND_STRING("SB4"); break;
case SEND_SC4: if (record->event.pressed) SEND_STRING("SC4"); break;
case SEND_SD4: if (record->event.pressed) SEND_STRING("SD4"); break;
case SEND_SE4: if (record->event.pressed) SEND_STRING("SE4"); break;
case SEND_SF4: if (record->event.pressed) SEND_STRING("SF4"); break;
case SEND_SG4: if (record->event.pressed) SEND_STRING("SG4"); break;
case SEND_SH4: if (record->event.pressed) SEND_STRING("SH4"); break;
case SEND_SI4: if (record->event.pressed) SEND_STRING("SI4"); break;
case SEND_SJ4: if (record->event.pressed) SEND_STRING("SJ4"); break;
case SEND_SA5: if (record->event.pressed) SEND_STRING("SA5"); break;
case SEND_SB5: if (record->event.pressed) SEND_STRING("SB5"); break;
case SEND_SC5: if (record->event.pressed) SEND_STRING("SC5"); break;
case SEND_SD5: if (record->event.pressed) SEND_STRING("SD5"); break;
case SEND_SE5: if (record->event.pressed) SEND_STRING("SE5"); break;
case SEND_SF5: if (record->event.pressed) SEND_STRING("SF5"); break;
case SEND_SG5: if (record->event.pressed) SEND_STRING("SG5"); break;
case SEND_SH5: if (record->event.pressed) SEND_STRING("SH5"); break;
case SEND_SI5: if (record->event.pressed) SEND_STRING("SI5"); break;
case SEND_SJ5: if (record->event.pressed) SEND_STRING("SJ5"); break;
case SEND_SA6: if (record->event.pressed) SEND_STRING("SA6"); break;
case SEND_SB6: if (record->event.pressed) SEND_STRING("SB6"); break;
case SEND_SC6: if (record->event.pressed) SEND_STRING("SC6"); break;
case SEND_SD6: if (record->event.pressed) SEND_STRING("SD6"); break;
case SEND_SE6: if (record->event.pressed) SEND_STRING("SE6"); break;
case SEND_SF6: if (record->event.pressed) SEND_STRING("SF6"); break;
case SEND_SG6: if (record->event.pressed) SEND_STRING("SG6"); break;
case SEND_SH6: if (record->event.pressed) SEND_STRING("SH6"); break;
case SEND_SI6: if (record->event.pressed) SEND_STRING("SI6"); break;
case SEND_SJ6: if (record->event.pressed) SEND_STRING("SJ6"); break;
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -0,0 +1,19 @@
/* Copyright 2020 Takeshi Nishio
*
* 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

View File

@ -0,0 +1,76 @@
/* Copyright 2020 Takeshi Nishio
*
* 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
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN
};
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT(
KC_A, KC_1, MO(_FN),
KC_TAB, KC_SPC
),
[_FN] = LAYOUT(
QMKBEST, QMKURL, _______,
RESET, XXXXXXX
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
} else {
// when keycode QMKURL is released
}
break;
}
return true;
}
/*
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool led_update_user(led_t led_state) {
return true;
}
*/

View File

@ -0,0 +1 @@
# The default keymap for test_k15r2

View File

@ -0,0 +1 @@
#pragma once

View File

@ -0,0 +1,111 @@
/* Copyright 2019 e3w2q
*
* 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
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
SEND_A1 = SAFE_RANGE,
SEND_B1, SEND_C1, SEND_D1, SEND_E1,
SEND_A2, SEND_B2, SEND_C2, SEND_D2, SEND_E2,
SEND_A3, SEND_B3, SEND_C3, SEND_D3, SEND_E3
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default Layer
* Master Side (USB Cable Connected Side)
* ,---------------------------------------------------
* | A1 B1 C1 D1 E1 F1 G1 H1 I1 J1
* | A2 B2 C2 D2 E2 F2 G2 H2 I2 J2
* | A3 B3 C3 D3 E3 F3 G3 H3 I3 J3
* | A4 B4 C4 D4 E4 F4 G4 H4 I4 J4
* | A5 B5 C5 D5 E5 F5 G5 H5 I5 J5
* | A6 B6 C6 D6 E6 F6 G6 H6 I6 J6
* `---------------------------------------------------
* Slave Side (USB Cable Not Connected Side)
* ,---------------------------------------------------
* | SA1 SB1 SC1 SD1 SE1 SF1 SG1 SH1 SI1 SJ1
* | SA2 SB2 SC2 SD2 SE2 SF2 SG2 SH2 SI2 SJ2
* | SA3 SB3 SC3 SD3 SE3 SF3 SG3 SH3 SI3 SJ3
* | SA4 SB4 SC4 SD4 SE4 SF4 SG4 SH4 SI4 SJ4
* | SA5 SB5 SC5 SD5 SE5 SF5 SG5 SH5 SI5 SJ5
* | SA6 SB6 SC6 SD6 SE6 SF6 SG6 SH6 SI6 SJ6
* `---------------------------------------------------
*/
[0] = LAYOUT( /* Base */
SEND_A1, SEND_B1, SEND_C1, SEND_D1, SEND_E1,
SEND_A2, SEND_B2, SEND_C2, SEND_D2, SEND_E2,
SEND_A3, SEND_B3, SEND_C3, SEND_D3, SEND_E3
),
[1] = LAYOUT(
RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX,
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, RESET
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SEND_A1: if (record->event.pressed) SEND_STRING("A1"); break;
case SEND_B1: if (record->event.pressed) SEND_STRING("B1"); break;
case SEND_C1: if (record->event.pressed) SEND_STRING("C1"); break;
case SEND_D1: if (record->event.pressed) SEND_STRING("D1"); break;
case SEND_E1: if (record->event.pressed) SEND_STRING("E1"); break;
case SEND_A2: if (record->event.pressed) SEND_STRING("A2"); break;
case SEND_B2: if (record->event.pressed) SEND_STRING("B2"); break;
case SEND_C2: if (record->event.pressed) SEND_STRING("C2"); break;
case SEND_D2: if (record->event.pressed) SEND_STRING("D2"); break;
case SEND_E2: if (record->event.pressed) SEND_STRING("E2"); break;
case SEND_A3: if (record->event.pressed) SEND_STRING("A3"); break;
case SEND_B3: if (record->event.pressed) SEND_STRING("B3"); break;
case SEND_C3: if (record->event.pressed) SEND_STRING("C3"); break;
case SEND_D3: if (record->event.pressed) SEND_STRING("D3"); break;
case SEND_E3: if (record->event.pressed) SEND_STRING("E3"); break;
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
SEND_STRING("ENC0+");
// tap_code(KC_VOLD);
} else {
SEND_STRING("ENC0-");
// tap_code(KC_VOLU);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
SEND_STRING("ENC1+");
} else {
SEND_STRING("ENC1-");
}
}
}

View File

@ -0,0 +1,15 @@
# test_k15r2
![test_k15r2](imgur.com image replace me!)
A short description of the keyboard/project
* Keyboard Maintainer: [Takeshi Nishio](https://github.com/yourusername)
* Hardware Supported: The PCBs, controllers supported
* Hardware Availability: Links to where you can find this hardware
Make example for this keyboard (after setting up your build environment):
make test_k15r2: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).

View File

@ -0,0 +1,43 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Otherwise, delete this section
# 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
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
ENCODER_ENABLE = yes

View File

@ -0,0 +1,50 @@
/* Copyright 2020 Takeshi Nishio
*
* 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 "test_k15r2.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
/*
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
bool led_update_kb(led_t led_state) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
return led_update_user(led_state);
}
*/

View File

@ -0,0 +1,68 @@
/* Copyright 2020 Takeshi Nishio
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
/*
#define LAYOUT( \
l00, l01, l02, l03, l04, l05, l06, l07, l08, l09, \
l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, \
l20, l21, l22, l23, l24, l25, l26, l27, l28, l29, \
l30, l31, l32, l33, l34, l35, l36, l37, l38, l39, \
l40, l41, l42, l43, l44, l45, l46, l47, l48, l49, \
l50, l51, l52, l53, l54, l55, l56, l57, l58, l59, \
r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, \
r30, r31, r32, r33, r34, r35, r36, r37, r38, r39, \
r40, r41, r42, r43, r44, r45, r46, r47, r48, r49, \
r50, r51, r52, r53, r54, r55, r56, r57, r58, r59 \
) \
{ \
{ l00, l01, l02, l03, l04, l05, l06, l07, l08, l09 }, \
{ l10, l11, l12, l13, l14, l15, l16, l17, l18, l19 }, \
{ l20, l21, l22, l23, l24, l25, l26, l27, l28, l29 }, \
{ l30, l31, l32, l33, l34, l35, l36, l37, l38, l39 }, \
{ l40, l41, l42, l43, l44, l45, l46, l47, l48, l49 }, \
{ l50, l51, l52, l53, l54, l55, l56, l57, l58, l59 }, \
{ r00, r01, r02, r03, r04, r05, r06, r07, r08, r09 }, \
{ r10, r11, r12, r13, r14, r15, r16, r17, r18, r19 }, \
{ r20, r21, r22, r23, r24, r25, r26, r27, r28, r29 }, \
{ r30, r31, r32, r33, r34, r35, r36, r37, r38, r39 }, \
{ r40, r41, r42, r43, r44, r45, r46, r47, r48, r49 }, \
{ r50, r51, r52, r53, r54, r55, r56, r57, r58, r59 } \
}
*/
#define LAYOUT( \
l00, l01, l02, l03, l04, \
l10, l11, l12, l13, l14, \
l20, l21, l22, l23, l24 \
) \
{ \
{ l00, l01, l02, l03, l04, }, \
{ l10, l11, l12, l13, l14, }, \
{ l20, l21, l22, l23, l24 } \
}