1
0
Fork 0

[Keyboard] Add JNAO keyboard (#6598)

* Add JNAO keyboard

* Use layout macro for default_4x12

* Add bakingpy keymap

* Add info.json data

* Remove bakingpy keymap from jnao, add ortho_4x12 layout fetching

* Clear up default keymaps
This commit is contained in:
Danny 2019-08-24 12:06:27 -04:00 committed by Drashna Jaelre
parent 70329b4fbb
commit 2c8d8be718
10 changed files with 605 additions and 17 deletions

52
keyboards/jnao/config.h Normal file
View file

@ -0,0 +1,52 @@
/*
Copyright 2012 Jun Wako <wakojun@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/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0x1337
#define PRODUCT_ID 0x6017
#define DEVICE_VER 0x0001
#define MANUFACTURER Maple Computing
#define PRODUCT JNAO Keyboard
#define DESCRIPTION A no-frills ortholinear keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 12
#define MATRIX_ROW_PINS { E6, F0, F5, F6, F7 }
#define MATRIX_COL_PINS { F1, F4, B1, B2, B3, B7, D1, D2, D4, D6, D7, B4 }
#define UNUSED_PINS
#define BACKLIGHT_PIN D0
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 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

125
keyboards/jnao/info.json Normal file
View file

@ -0,0 +1,125 @@
{
"keyboard_name": "JNAO",
"url": "",
"maintainer": "That-Canadian",
"width": 12,
"height": 5,
"layouts": {
"LAYOUT_ortho_5x12": {
"layout": [
{"label":"`", "x":0, "y":0},
{"label":"1", "x":1, "y":0},
{"label":"2", "x":2, "y":0},
{"label":"3", "x":3, "y":0},
{"label":"4", "x":4, "y":0},
{"label":"5", "x":5, "y":0},
{"label":"6", "x":6, "y":0},
{"label":"7", "x":7, "y":0},
{"label":"8", "x":8, "y":0},
{"label":"9", "x":9, "y":0},
{"label":"0", "x":10, "y":0},
{"label":"Backspace", "x":11, "y":0},
{"label":"Tab", "x":0, "y":1},
{"label":"Q", "x":1, "y":1},
{"label":"W", "x":2, "y":1},
{"label":"E", "x":3, "y":1},
{"label":"R", "x":4, "y":1},
{"label":"T", "x":5, "y":1},
{"label":"Y", "x":6, "y":1},
{"label":"U", "x":7, "y":1},
{"label":"I", "x":8, "y":1},
{"label":"O", "x":9, "y":1},
{"label":"P", "x":10, "y":1},
{"label":"Delete", "x":11, "y":1},
{"label":"Esc", "x":0, "y":2},
{"label":"A", "x":1, "y":2},
{"label":"S", "x":2, "y":2},
{"label":"D", "x":3, "y":2},
{"label":"F", "x":4, "y":2},
{"label":"G", "x":5, "y":2},
{"label":"H", "x":6, "y":2},
{"label":"J", "x":7, "y":2},
{"label":"K", "x":8, "y":2},
{"label":"L", "x":9, "y":2},
{"label":";", "x":10, "y":2},
{"label":"'", "x":11, "y":2},
{"label":"Shift", "x":0, "y":3},
{"label":"Z", "x":1, "y":3},
{"label":"X", "x":2, "y":3},
{"label":"C", "x":3, "y":3},
{"label":"V", "x":4, "y":3},
{"label":"B", "x":5, "y":3},
{"label":"N", "x":6, "y":3},
{"label":"M", "x":7, "y":3},
{"label":",", "x":8, "y":3},
{"label":".", "x":9, "y":3},
{"label":"/", "x":10, "y":3},
{"label":"Enter", "x":11, "y":3},
{"label":"Fn", "x":0, "y":4},
{"label":"Ctrl", "x":1, "y":4},
{"label":"Alt", "x":2, "y":4},
{"label":"Meta", "x":3, "y":4},
{"label":"Lower", "x":4, "y":4},
{"label":"Space", "x":5, "y":4},
{"label":"Space", "x":6, "y":4},
{"label":"Raise", "x":7, "y":4},
{"label":"Left", "x":8, "y":4},
{"label":"Down", "x":9, "y":4},
{"label":"Up", "x":10, "y":4},
{"label":"Right", "x":11, "y":4}
]
},
"LAYOUT_ortho_4x12": {
"layout": [
{"label":"Tab", "x":0, "y":0},
{"label":"Q", "x":1, "y":0},
{"label":"W", "x":2, "y":0},
{"label":"E", "x":3, "y":0},
{"label":"R", "x":4, "y":0},
{"label":"T", "x":5, "y":0},
{"label":"Y", "x":6, "y":0},
{"label":"U", "x":7, "y":0},
{"label":"I", "x":8, "y":0},
{"label":"O", "x":9, "y":0},
{"label":"P", "x":10, "y":0},
{"label":"Delete", "x":11, "y":0},
{"label":"Esc", "x":0, "y":1},
{"label":"A", "x":1, "y":1},
{"label":"S", "x":2, "y":1},
{"label":"D", "x":3, "y":1},
{"label":"F", "x":4, "y":1},
{"label":"G", "x":5, "y":1},
{"label":"H", "x":6, "y":1},
{"label":"J", "x":7, "y":1},
{"label":"K", "x":8, "y":1},
{"label":"L", "x":9, "y":1},
{"label":";", "x":10, "y":1},
{"label":"'", "x":11, "y":1},
{"label":"Shift", "x":0, "y":2},
{"label":"Z", "x":1, "y":2},
{"label":"X", "x":2, "y":2},
{"label":"C", "x":3, "y":2},
{"label":"V", "x":4, "y":2},
{"label":"B", "x":5, "y":2},
{"label":"N", "x":6, "y":2},
{"label":"M", "x":7, "y":2},
{"label":",", "x":8, "y":2},
{"label":".", "x":9, "y":2},
{"label":"/", "x":10, "y":2},
{"label":"Enter", "x":11, "y":2},
{"label":"Fn", "x":0, "y":3},
{"label":"Ctrl", "x":1, "y":3},
{"label":"Alt", "x":2, "y":3},
{"label":"Meta", "x":3, "y":3},
{"label":"Lower", "x":4, "y":3},
{"label":"Space", "x":5, "y":3},
{"label":"Space", "x":6, "y":3},
{"label":"Raise", "x":7, "y":3},
{"label":"Left", "x":8, "y":3},
{"label":"Down", "x":9, "y":3},
{"label":"Up", "x":10, "y":3},
{"label":"Right", "x":11, "y":3}
]
}
}
}

1
keyboards/jnao/jnao.c Normal file
View file

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

32
keyboards/jnao/jnao.h Normal file
View file

@ -0,0 +1,32 @@
#pragma once
#include "quantum.h"
#define LAYOUT_ortho_5x12( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \
k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, \
k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412 \
) \
{ \
{ k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012 }, \
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112 }, \
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212 }, \
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 }, \
{ k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412 } \
}
#define LAYOUT_ortho_4x12( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \
k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 \
) \
{ \
{k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012}, \
{k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112}, \
{k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212}, \
{k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312}, \
{KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \
}

View file

@ -0,0 +1,155 @@
#include QMK_KEYBOARD_H
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_FUNCTION,
_ADJUST,
};
enum jnao_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
};
// Defines for task manager and such
#define CALTDEL LCTL(LALT(KC_DEL))
#define TSKMGR LCTL(LSFT(KC_ESC))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Func | A | S | D | F | G | H | J | K | L | ; | Enter|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | ` | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_5x12( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_5x12( \
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, \
_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | , | 0 | . |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_5x12( \
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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
_______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \
KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, \
_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | ESC | F1 | F2 | F3 |ALTF4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Taskmg| | | | | | | | | | |caltde|
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |RESET |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_5x12( \
KC_ESC, KC_F1, KC_F2, KC_F3, LALT(KC_F4), KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \
),
/* Function
* ,-----------------------------------------------------------------------------------.
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | up | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | | Left | Down |Right | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Caps | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_FUNCTION] = LAYOUT_ortho_5x12( \
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_UP, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
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;
}
return true;
};

View file

@ -0,0 +1,150 @@
#include QMK_KEYBOARD_H
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_FUNCTION,
_ADJUST,
};
enum planck_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE
};
// Defines for task manager and such
#define CALTDEL LCTL(LALT(KC_DEL))
#define TSKMGR LCTL(LSFT(KC_ESC))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Func | A | S | D | F | G | H | J | K | L | ; | Enter|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_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,
MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE,
_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS,
_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* |Taskmg| | | | | | | | | | |caltde|
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | RESET|
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
),
/* Function
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | Up | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | | Left | Down |Right | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Caps | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_FUNCTION] = LAYOUT_ortho_4x12(
_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
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;
}
return true;
}

14
keyboards/jnao/readme.md Normal file
View file

@ -0,0 +1,14 @@
JNAO
====
An no-frills 5x12 or 4x12 ortholinear keyboard
Keyboard Maintainer: [That-Canadian](https://github.com/that-canadian)
Hardware Supported: JNAO PCB
Hardware Availability: [SpaceCat](https://spacecat.design) and [Keebio](https://keeb.io/)
Make example for this keyboard (after setting up your build environment):
make jnao: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).

47
keyboards/jnao/rules.mk Normal file
View file

@ -0,0 +1,47 @@
# 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
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
# 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 = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
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 = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
LAYOUTS = ortho_5x12 ortho_4x12
LAYOUTS_HAS_RGB = no

View file

@ -2,13 +2,15 @@
extern keymap_config_t keymap_config;
#define _MAC 0
#define _WINDOWS 1
#define _TESTMODE 2
#define _LOWER 3
#define _RAISE 4
#define _FKEYS 5
#define _ADJUST 16
enum layer_names {
_MAC,
_WINDOWS,
_TESTMODE,
_LOWER,
_RAISE,
_FKEYS,
_ADJUST,
};
enum custom_keycodes {
MAC = SAFE_RANGE,
@ -17,7 +19,6 @@ enum custom_keycodes {
LOWER,
RAISE,
ADJUST,
PLAY_ALLSTAR,
};
#define KC_ KC_TRNS
@ -35,6 +36,22 @@ enum custom_keycodes {
#define KC_BL_T BL_TOGG
#define KC_RMOD RGB_MOD
#ifndef LAYOUT_kc_ortho_4x12
#define LAYOUT_kc_ortho_4x12( \
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, L35, R30, R31, R32, R33, R34, R35 \
) \
LAYOUT_ortho_4x12( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
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_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
)
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MAC] = LAYOUT_kc_ortho_4x12(
@ -130,28 +147,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
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 MAC:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_MAC);
set_single_persistent_default_layer(_MAC);
}
return false;
break;
case WINDOWS:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_WINDOWS);
set_single_persistent_default_layer(_WINDOWS);
}
return false;
break;
case TESTMODE:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_TESTMODE);
set_single_persistent_default_layer(_TESTMODE);
}
return false;
break;

View file

@ -1,5 +1,5 @@
ifneq ($(LAYOUTS_HAS_RGB), no)
RGBLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
endif
AUDIO_ENABLE = no
ifeq ($(strip $(KEYBOARD)), zlant)