1
0
Fork 0

Merge branch 'master' into develop

This commit is contained in:
Joshua Diamond 2021-02-15 20:55:54 -05:00
commit d36dbe66e1
60 changed files with 979 additions and 968 deletions

View file

@ -1 +1,17 @@
/* Copyright 2017 Fabian Topfstedt
*
* 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 "amj40.h" #include "amj40.h"

View file

@ -1,22 +1,48 @@
#ifndef AMJ40_H /* Copyright 2017 Fabian Topfstedt
#define AMJ40_H * Copyright 2021 James Young (@noroadsleft)
*
* 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" #include "quantum.h"
// readability
#define XXX KC_NO #define XXX KC_NO
/* AMJ40 ver2.0 layout1 配列一 /* AMJ40 ver2.0 staggered layouts
* ,-----------------------------------------------------------. * ,-----------------------------------------------.
* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0a |0b |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1B | * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1b |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | * |20 |22 |23 |24 |25 |26 |27 |28 |29 |2a |2b |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | 30 | 31 | 32 | 34 | 35 | 39 | 3A | 3B | * |30 |31 |32 | 34 |35 |39 |3a |3b | Layout 1 Bottom Row
* `-----------------------------------------------------------' * `-----------------------------------------------'
* ,-----------------------------------------------.
* |30 |31 |32 | 35 |3a |3b | Layout 2
* `-----------------------------------------------'
* ,-----------------------------------------------.
* |30 |31 |32 | 34 | 35 |39 |3a |3b | Layout 3
* `-----------------------------------------------'
* ,-----------------------------------------------.
* |30 |31 |32 | 35 |3a |3b | Layout 4
* `-----------------------------------------------'
*/ */
// a.k.a. Layout 1 or Layout 3 (matrix is the same for both)
#define LAYOUT( \ #define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b, \
@ -29,10 +55,55 @@
{k30, k31, k32, XXX, k34, k35, XXX, XXX, XXX, k39, k3a, k3b} \ {k30, k31, k32, XXX, k34, k35, XXX, XXX, XXX, k39, k3a, k3b} \
} }
// a.k.a. Layout 2 or Layout 4 (matrix is the same for both)
#define LAYOUT_625u_space( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b, \
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k35, k3a, k3b \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1b }, \
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, XXX, XXX, k35, XXX, XXX, XXX, XXX, k3a, k3b } \
}
/* AMJ40 ver2.0 ortholinear layouts
* ,-----------------------------------------------.
* |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0a |0b |
* |-----------------------------------------------|
* |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1a |1b |
* |-----------------------------------------------|
* |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2a |2b |
* |-----------------------------------------------|
* |30 |31 |32 |33 |34 | 35 |38 |39 |3a |3b | 2.75u Spacebar
* `-----------------------------------------------'
* ,-----------------------------------------------.
* |30 |31 |32 | 35 |39 |3a |3b | 6u Spacebar
* `-----------------------------------------------'
*/
// equivalent to LAYOUT_all
#define LAYOUT_ortho_275u_space( \
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, k38, k39, k3a, k3b \
) { \
{ 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, XXX, XXX, k38, k39, k3a, k3b } \
}
void matrix_init_user(void); #define LAYOUT_ortho_600u_space( \
void matrix_scan_user(void); k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
#endif k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k35, k39, k3a, k3b \
) { \
{ 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, XXX, XXX, k35, XXX, XXX, XXX, k39, k3a, k3b } \
}

View file

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #pragma once
#define CONFIG_H
#include "config_common.h" #include "config_common.h"
@ -87,5 +86,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
#endif

View file

@ -1,11 +1,208 @@
{ {
"keyboard_name": "AMJ40", "keyboard_name": "AMJ40",
"url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 12, "width": 12,
"height": 4, "height": 4,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2, "w":1.25}, {"x":11, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"x":8.5, "y":3, "w":1.25}, {"x":9.75, "y":3}, {"x":10.75, "y":3, "w":1.25}] "layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":0, "y":1, "w":1.25},
{"x":1.25, "y":1},
{"x":2.25, "y":1},
{"x":3.25, "y":1},
{"x":4.25, "y":1},
{"x":5.25, "y":1},
{"x":6.25, "y":1},
{"x":7.25, "y":1},
{"x":8.25, "y":1},
{"x":9.25, "y":1},
{"x":10.25, "y":1, "w":1.75},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2, "w":1.25},
{"x":11, "y":2},
{"x":0, "y":3, "w":1.25},
{"x":1.25, "y":3},
{"x":2.25, "y":3, "w":1.25},
{"x":3.5, "y":3, "w":2.25},
{"x":5.75, "y":3, "w":2.75},
{"x":8.5, "y":3, "w":1.25},
{"x":9.75, "y":3},
{"x":10.75, "y":3, "w":1.25}
]
},
"LAYOUT_625u_space": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":0, "y":1, "w":1.25},
{"x":1.25, "y":1},
{"x":2.25, "y":1},
{"x":3.25, "y":1},
{"x":4.25, "y":1},
{"x":5.25, "y":1},
{"x":6.25, "y":1},
{"x":7.25, "y":1},
{"x":8.25, "y":1},
{"x":9.25, "y":1},
{"x":10.25, "y":1, "w":1.75},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2, "w":1.25},
{"x":11, "y":2},
{"x":0, "y":3, "w":1.25},
{"x":1.25, "y":3},
{"x":2.25, "y":3},
{"x":3.25, "y":3, "w":6.25},
{"x":9.5, "y":3, "w":1.25},
{"x":10.75, "y":3, "w":1.25}
]
},
"LAYOUT_ortho_600u_space": {
"layout": [
{"label":"K00 (F4,F1)", "x":0, "y":0},
{"label":"K01 (F4,F0)", "x":1, "y":0},
{"label":"K02 (F4,E6)", "x":2, "y":0},
{"label":"K03 (F4,C7)", "x":3, "y":0},
{"label":"K04 (F4,C6)", "x":4, "y":0},
{"label":"K05 (F4,B0)", "x":5, "y":0},
{"label":"K06 (F4,D4)", "x":6, "y":0},
{"label":"K07 (F4,B1)", "x":7, "y":0},
{"label":"K08 (F4,B7)", "x":8, "y":0},
{"label":"K09 (F4,B5)", "x":9, "y":0},
{"label":"K0A (F4,B4)", "x":10, "y":0},
{"label":"K0B (F4,D7)", "x":11, "y":0},
{"label":"K10 (F5,F1)", "x":0, "y":1},
{"label":"K11 (F5,F0)", "x":1, "y":1},
{"label":"K12 (F5,E6)", "x":2, "y":1},
{"label":"K13 (F5,C7)", "x":3, "y":1},
{"label":"K14 (F5,C6)", "x":4, "y":1},
{"label":"K15 (F5,B0)", "x":5, "y":1},
{"label":"K16 (F5,D4)", "x":6, "y":1},
{"label":"K17 (F5,B1)", "x":7, "y":1},
{"label":"K18 (F5,B7)", "x":8, "y":1},
{"label":"K19 (F5,B5)", "x":9, "y":1},
{"label":"K1A (F5,B4)", "x":10, "y":1},
{"label":"K1B (F5,D7)", "x":11, "y":1},
{"label":"K20 (F6,F1)", "x":0, "y":2},
{"label":"K21 (F6,F0)", "x":1, "y":2},
{"label":"K22 (F6,E6)", "x":2, "y":2},
{"label":"K23 (F6,C7)", "x":3, "y":2},
{"label":"K24 (F6,C6)", "x":4, "y":2},
{"label":"K25 (F6,B0)", "x":5, "y":2},
{"label":"K26 (F6,D4)", "x":6, "y":2},
{"label":"K27 (F6,B1)", "x":7, "y":2},
{"label":"K28 (F6,B7)", "x":8, "y":2},
{"label":"K29 (F6,B5)", "x":9, "y":2},
{"label":"K2A (F6,B4)", "x":10, "y":2},
{"label":"K2B (F6,D7)", "x":11, "y":2},
{"label":"K30 (F7,F1)", "x":0, "y":3},
{"label":"K31 (F7,F0)", "x":1, "y":3},
{"label":"K32 (F7,E6)", "x":2, "y":3},
{"label":"K35 (F7,B0)", "x":3, "y":3, "w":6},
{"label":"K39 (F7,B5)", "x":9, "y":3},
{"label":"K3A (F7,B4)", "x":10, "y":3},
{"label":"K3B (F7,D7)", "x":11, "y":3}
]
},
"LAYOUT_ortho_275u_space": {
"layout": [
{"label":"K00 (F4,F1)", "x":0, "y":0},
{"label":"K01 (F4,F0)", "x":1, "y":0},
{"label":"K02 (F4,E6)", "x":2, "y":0},
{"label":"K03 (F4,C7)", "x":3, "y":0},
{"label":"K04 (F4,C6)", "x":4, "y":0},
{"label":"K05 (F4,B0)", "x":5, "y":0},
{"label":"K06 (F4,D4)", "x":6, "y":0},
{"label":"K07 (F4,B1)", "x":7, "y":0},
{"label":"K08 (F4,B7)", "x":8, "y":0},
{"label":"K09 (F4,B5)", "x":9, "y":0},
{"label":"K0A (F4,B4)", "x":10, "y":0},
{"label":"K0B (F4,D7)", "x":11, "y":0},
{"label":"K10 (F5,F1)", "x":0, "y":1},
{"label":"K11 (F5,F0)", "x":1, "y":1},
{"label":"K12 (F5,E6)", "x":2, "y":1},
{"label":"K13 (F5,C7)", "x":3, "y":1},
{"label":"K14 (F5,C6)", "x":4, "y":1},
{"label":"K15 (F5,B0)", "x":5, "y":1},
{"label":"K16 (F5,D4)", "x":6, "y":1},
{"label":"K17 (F5,B1)", "x":7, "y":1},
{"label":"K18 (F5,B7)", "x":8, "y":1},
{"label":"K19 (F5,B5)", "x":9, "y":1},
{"label":"K1A (F5,B4)", "x":10, "y":1},
{"label":"K1B (F5,D7)", "x":11, "y":1},
{"label":"K20 (F6,F1)", "x":0, "y":2},
{"label":"K21 (F6,F0)", "x":1, "y":2},
{"label":"K22 (F6,E6)", "x":2, "y":2},
{"label":"K23 (F6,C7)", "x":3, "y":2},
{"label":"K24 (F6,C6)", "x":4, "y":2},
{"label":"K25 (F6,B0)", "x":5, "y":2},
{"label":"K26 (F6,D4)", "x":6, "y":2},
{"label":"K27 (F6,B1)", "x":7, "y":2},
{"label":"K28 (F6,B7)", "x":8, "y":2},
{"label":"K29 (F6,B5)", "x":9, "y":2},
{"label":"K2A (F6,B4)", "x":10, "y":2},
{"label":"K2B (F6,D7)", "x":11, "y":2},
{"label":"K30 (F7,F1)", "x":0, "y":3},
{"label":"K31 (F7,F0)", "x":1, "y":3},
{"label":"K32 (F7,E6)", "x":2, "y":3},
{"label":"K33 (F7,C7)", "x":3, "y":3},
{"label":"K34 (F7,C6)", "x":4, "y":3},
{"label":"K35 (F7,B0)", "x":5, "y":3, "w":2.75},
{"label":"K38 (F7,B7)", "x":7.75, "y":3, "w":1.25},
{"label":"K39 (F7,B5)", "x":9, "y":3},
{"label":"K3A (F7,B4)", "x":10, "y":3},
{"label":"K3B (F7,D7)", "x":11, "y":3}
]
} }
} }
} }

View file

@ -1,42 +0,0 @@
#!/bin/bash
# adjust for cpu
# -j 16 gave best result on a hyperthreaded quad core core i7
LIMIT=10
THREADS="-j 16"
KMAP=iso_split_rshift
echo "We need sudo later"
sudo ls 2>&1 /dev/null
function wait_bootloader {
echo "Waiting for Bootloader..."
local STARTTIME=$(date +"%s")
local REMIND=0
local EXEC=dfu-programmer
local TARGET=atmega32u4
while true
do
sudo $EXEC $TARGET get > /dev/null 2>&1
[ $? -eq 0 ] && break
ENDTIME=$(date +"%s")
DURATION=$(($ENDTIME-$STARTTIME))
if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ]
then
echo "Did you forget to press the reset button?"
REMIND=1
fi
sleep 1
done
}
make clean
make KEYMAP=${KMAP} ${THREADS}
if [[ $? -eq 0 ]]
then
echo "please trigger flashing!"
wait_bootloader
sudo make KEYMAP=${KMAP} dfu ${THREADS}
else
echo "make failed"
exit 77
fi

View file

@ -1,18 +1,27 @@
/* Copyright 2017 Fabian Topfstedt
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below. enum layer_names {
// The underscores don't mean anything - you can have a layer called STUFF or any other name. _QWERTY,
// Layer names don't all need to be of the same length, obviously, and you can also skip them _LOWER,
// entirely and just use numbers. _RAISE,
#define _QWERTY 0 _ADJUST,
#define _LOWER 1 };
#define _RAISE 2
#define _ADJUST 3
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
@ -21,87 +30,86 @@ enum custom_keycodes {
ADJUST, ADJUST,
}; };
#define LT1_SPC LT(_LOWER,KC_SPC)
#define LT2_SPC LT(_RAISE,KC_SPC)
#define LT3_LGU LT(_ADJUST,KC_LGUI)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default Layer /* Default Layer
* ,-----------------------------------------------------------. * ,-----------------------------------------------.
* | Esc| Q | W | E | R | T | Y | U | I | O | P | BS | * |Esc| Q | W | E | R | T | Y | U | I | O | P |BS |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | Tab | A | S | D | F | G | H | J | K | L | Ent | * |Tab | A | S | D | F | G | H | J | K | L |Enter |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | LSft | Z | X | C | V | B | N | M | , | . | /? | * | LSft | Z | X | C | V | B | N | M | , | . |/? |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | * |LCtl|GUI|LAlt|Spc/Fn0 | Spc/Fn1 |Fn2 |Alt|RCtl|
* `-----------------------------------------------------------' * `-----------------------------------------------'
*/ */
[_QWERTY] = LAYOUT( \ [_QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTL, KC_LGUI, KC_LALT, LT(_LOWER, KC_SPC),LT(_RAISE, KC_SPC),LT(_ADJUST, KC_LGUI), KC_RALT, KC_RCTL \ KC_LCTL, KC_LGUI, KC_LALT, LT1_SPC, LT2_SPC, LT3_LGU, KC_RALT, KC_RCTL
), ),
/* Function Layer 1 HHKB style /* Function Layer 1 HHKB style
* ,-----------------------------------------------------------. * ,-----------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bkspc| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |BS |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | [ | ] | Pipe | * | F1 |F2 |F3 |F4 |F5 |F6 | _ | + | { | } | Pipe |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | F7 | F8 | F9 | F10 | F11 | F12 | End|PgDn| | | | * | F7 |F8 |F9 |F10|F11|F12| ~ | | |BL±|BL+ |BL-|
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | | | | | Stop| App| | * | | | | | Left |Down|Up |Rght|
* `-----------------------------------------------------------' * `-----------------------------------------------'
*/ */
[_LOWER] = LAYOUT( \ [_LOWER] = LAYOUT(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),BL_TOGG, BL_INC, BL_DEC, \ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), BL_TOGG, BL_INC, BL_DEC,
_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
), ),
/* Function Layer 1 HHKB style /* Function Layer 1 HHKB style
* ,-----------------------------------------------------------. * ,-----------------------------------------------.
* |Caps| |MSel| | | |PSCR|SkLk|Paus| | Ins| Del| * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BS |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | 🔇 | | | * | / |Hone|PgUp| | | | * | F1 |F2 |F3 |F4 |F5 |F6 | - | = | [ | ] | \ |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | 🔉 | 🔊 | | + | - | End|PgDn| | | | * | F7 |F8 |F9 |F10|F11|F12| # | \ | | |Del|
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | | | | | Stop| App| | * | | | | | | | |RGB±|
* `-----------------------------------------------------------' * `-----------------------------------------------'
*/ */
[_RAISE] = LAYOUT( \ [_RAISE] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_DEL, \ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_DEL,
_______, KC_TRNS, _______, KC_TRNS, KC_TRNS, _______, _______, RGB_TOG \ _______, _______, _______, _______, _______, _______, _______, RGB_TOG
), ),
/* Function Layer 1 HHKB style /* Function Layer 1 HHKB style
* ,-----------------------------------------------------------. * ,-----------------------------------------------.
* |Caps| |MSel| | | |PSCR|SkLk|Paus| | Ins| Del| * | |RST| | | | | | | | | |Del|
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | 🔇 | | | * | / |Hone|PgUp| | | | * | | | |Au1|Au0|AGN|AGS| | | | |
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | 🔉 | 🔊 | | + | - | End|PgDn| | | | * | | | |RTg|RMd|RH+|RH-|RS+|RS-|RV+ |RV-|
* |-----------------------------------------------------------| * |-----------------------------------------------|
* | | | | | | Stop| App| | * |SLP | | | | | | |RTg |
* `-----------------------------------------------------------' * `-----------------------------------------------'
*/ */
[_ADJUST] = LAYOUT( \ [_ADJUST] = LAYOUT(
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______,
_______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD,
KC_SYSTEM_SLEEP, _______, _______, _______, _______, _______, _______, _______ \ KC_SLEP, _______, _______, _______, _______, _______, _______, _______
), ),
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View file

@ -1,20 +0,0 @@
# 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
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
# 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

@ -1,4 +0,0 @@
#!/bin/bash
git checkout amj60 # gets you on branch amj60
git fetch origin # gets you up to date with origin
git merge origin/master

View file

@ -0,0 +1,41 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* 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
#define LT1_SCL LT(1, KC_SCLN)
#define LT2_QUO LT(2, KC_QUOT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_625u_space(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT1_SCL, LT2_QUO
),
[1] = LAYOUT_625u_space(
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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, KC_INS,
_______, KC_SCLN, KC_QUOT, KC_COLN, KC_DQUO, KC_TILD, KC_LABK, KC_RABK, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_625u_space(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
RESET, KC_PWR, _______, _______, KC_PSCR, KC_PAUS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______,
KC_UP, KC_MINS, KC_EQL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LPRN, KC_RPRN, _______,
KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______
),
};

View file

@ -0,0 +1,40 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* 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
#define LT2_SLS LT(2,KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_275u_space(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT,
KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, LT2_SLS, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_ortho_275u_space(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_QUES, KC_UP, _______,
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT
),
[2] = LAYOUT_ortho_275u_space(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

View file

@ -0,0 +1,38 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* 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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_600u_space(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_A, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTL, KC_LGUI, MO(1), KC_SPC, MO(2), KC_BSLS, KC_B
),
[1] = LAYOUT_ortho_600u_space(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC,
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UP, _______,
KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_GRV, _______, KC_LEFT, KC_DOWN, KC_RGHT,
_______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_ortho_600u_space(
RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______,
_______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______
),
};

View file

@ -1,14 +1,23 @@
AMJ40 # AMJ40
===
![AMJ40](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/amj40/AMJ40-Keyboard-Side-scaled_640.jpg)\
[PCB photo](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/amj40/DSC_1718-768x512_640)
DIY/Assembled compact 40% keyboard. DIY/Assembled compact 40% keyboard.
Keyboard Maintainer: QMK Community * Keyboard Maintainer: QMK Community
Hardware Supported: AMJ40 PCB * Hardware Supported: AMJ40 PCB
Hardware Availability: https://geekhack.org/index.php?topic=87961.0 * Hardware Availability: no longer available
* References: [Flashquark](https://flashquark.com/product/amj40-40-mechanical-keyboard-kit/), [geekhack](https://geekhack.org/index.php?topic=87961.0)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make amj40:default make amj40:default
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Flashing example for this keyboard:
make amj40:default:flash
To reset the board into bootloader mode, hold the key at the top left of the keyboard while connecting the USB cable (also erases persistent settings).
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

@ -2,27 +2,21 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # 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 BOOTLOADER = atmel-dfu
# Build Options # Build Options
# comment out to disable the options. # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no BLUETOOTH_ENABLE = no # Enable Bluetooth
UNICODE_ENABLE = no # Unicode AUDIO_ENABLE = no # Audio output
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID

View file

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "arrow.h" #include "arrow.h"
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);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

View file

@ -13,29 +13,22 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ARROW_H #pragma once
#define ARROW_H
#include "quantum.h" #include "quantum.h"
#define XXX KC_NO #define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_all( \ #define LAYOUT_all( \
K00, K01, K02, \ K00, K01, K02, \
K10, K11, K12, \ K10, K11, K12, \
\ \
K31, \ K31, \
K40, K41, K42 \ K40, K41, K42 \
) \ ) { \
{ \
{ K00, K01, K02 }, \ { K00, K01, K02 }, \
{ K10, K11, K12 }, \ { K10, K11, K12 }, \
{ XXX, XXX, XXX }, \ { XXX, XXX, XXX }, \
{ XXX, K31, XXX }, \ { XXX, K31, XXX }, \
{ K40, K41, K42 } \ { K40, K41, K42 } \
} }
#endif

View file

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1012 #define PRODUCT_ID 0x1012
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards #define MANUFACTURER Mechboards
@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
//#define FORCE_NKRO //#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.
*
*/
/*
* 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
/*
* MIDI options
*/
/* 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

View file

@ -1,7 +1,7 @@
{ {
"keyboard_name": "DC01 Arrow Cluster", "keyboard_name": "DC01 Arrow Cluster",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "Yiancar-Designs",
"width": 3, "width": 3,
"height": 5, "height": 5,
"layouts": { "layouts": {

View file

@ -17,26 +17,9 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */ [0] = LAYOUT_all( /* Base */
KC_INS, KC_HOME, KC_PGUP, \ KC_INS, KC_HOME, KC_PGUP,
KC_DEL, KC_END, KC_PGDN, \ KC_DEL, KC_END, KC_PGDN,
\
KC_UP, \ KC_UP,
KC_LEFT, KC_DOWN, KC_RIGHT \ KC_LEFT, KC_DOWN, KC_RIGHT)
),
}; };
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

View file

@ -16,23 +16,31 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso( /* Base */ [0] = LAYOUT_all( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_INS, KC_HOME, KC_PGUP,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \ KC_DEL, KC_END, KC_PGDN,
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS,KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ KC_UP,
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \ KC_LEFT, KC_DOWN, KC_RIGHT),
),
[1] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS)
}; };
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

View file

@ -0,0 +1,3 @@
# The default VIA keymap for DC01 Arrow cluster
When using the arrow module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

View file

@ -0,0 +1 @@
VIA_ENABLE = yes

View file

@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c_slave.h" #include "i2c_slave.h"
#include "lufa.h" #include "lufa.h"
#define SLAVE_I2C_ADDRESS 0x23 #define SLAVE_I2C_ADDRESS 0x40
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
@ -196,12 +196,10 @@ uint8_t matrix_scan(void)
} }
# endif # endif
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_reg[1] = 0x55; i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){ for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
} }
}
matrix_scan_quantum(); matrix_scan_quantum();
return 1; return 1;
@ -396,9 +394,6 @@ static void unselect_cols(void)
//this replases tmk code //this replases tmk code
void matrix_setup(void){ void matrix_setup(void){
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts sei(); //enable interupts
}
} }

View file

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = no # Console for debug

View file

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1010 #define PRODUCT_ID 0x1010
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards #define MANUFACTURER Mechboards
@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5 } #define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5 }
#define UNUSED_PINS #define UNUSED_PINS
#define F_SCL 300000UL #define F_SCL 350000UL
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW

View file

@ -1,12 +1,15 @@
{ {
"keyboard_name": "DC01 Left Half", "keyboard_name": "DC01 Left Half",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "Yiancar-Designs",
"width": 22.5, "width": 22.5,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT_ansi": { "LAYOUT_ansi": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Home", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"Num Lock", "x":18.5, "y":0}, {"label":"/", "x":19.5, "y":0}, {"label":"*", "x":20.5, "y":0}, {"label":"-", "x":21.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"End", "x":16.25, "y":1}, {"label":"PgDn", "x":17.25, "y":1}, {"label":"7", "x":18.5, "y":1}, {"label":"8", "x":19.5, "y":1}, {"label":"9", "x":20.5, "y":1}, {"label":"+", "x":21.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":18.5, "y":2}, {"label":"5", "x":19.5, "y":2}, {"label":"6", "x":20.5, "y":2}, {"label":"KC_NO", "x":21.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"1", "x":18.5, "y":3}, {"label":"2", "x":19.5, "y":3}, {"label":"3", "x":20.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"GUI", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}, {"label":"0", "x":18.5, "y":4}, {"label":"KC_NO", "x":19.5, "y":4}, {"label":".", "x":20.5, "y":4}, {"label":"Enter", "x":21.5, "y":3, "h":2}] "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Back", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Home", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"Num Lock", "x":18.5, "y":0}, {"label":"/", "x":19.5, "y":0}, {"label":"*", "x":20.5, "y":0}, {"label":"-", "x":21.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"End", "x":16.25, "y":1}, {"label":"PgDn", "x":17.25, "y":1}, {"label":"7", "x":18.5, "y":1}, {"label":"8", "x":19.5, "y":1}, {"label":"9", "x":20.5, "y":1}, {"label":"+", "x":21.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":18.5, "y":2}, {"label":"5", "x":19.5, "y":2}, {"label":"6", "x":20.5, "y":2}, {"label":"+", "x":21.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":14, "y":3}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"1", "x":18.5, "y":3}, {"label":"2", "x":19.5, "y":3}, {"label":"3", "x":20.5, "y":3}, {"label":"Enter", "x":21.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"label":"Fn", "x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}, {"label":"0", "x":18.5, "y":4}, {"label":"00", "x":19.5, "y":4}, {"label":".", "x":20.5, "y":4}, {"label":"Enter", "x":21.5, "y":4}]
},
"LAYOUT_all": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Back", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Home", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"Num Lock", "x":18.5, "y":0}, {"label":"/", "x":19.5, "y":0}, {"label":"*", "x":20.5, "y":0}, {"label":"-", "x":21.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"End", "x":16.25, "y":1}, {"label":"PgDn", "x":17.25, "y":1}, {"label":"7", "x":18.5, "y":1}, {"label":"8", "x":19.5, "y":1}, {"label":"9", "x":20.5, "y":1}, {"label":"+", "x":21.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"4", "x":18.5, "y":2}, {"label":"5", "x":19.5, "y":2}, {"label":"6", "x":20.5, "y":2}, {"label":"+", "x":21.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":14, "y":3}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"1", "x":18.5, "y":3}, {"label":"2", "x":19.5, "y":3}, {"label":"3", "x":20.5, "y":3}, {"label":"Enter", "x":21.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"label":"Fn", "x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}, {"label":"0", "x":18.5, "y":4}, {"label":"00", "x":19.5, "y":4}, {"label":".", "x":20.5, "y":4}, {"label":"Enter", "x":21.5, "y":4}]
} }
} }
} }

View file

@ -17,22 +17,9 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ansi( /* Base */ [0] = LAYOUT_ansi( /* Base */
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_NO, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_NO,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_NO,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_PENT \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_PENT)
),
}; };
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

View file

@ -0,0 +1,46 @@
/* Copyright 2018 Yiancar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_P0, KC_PDOT, KC_PENT),
[1] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

View file

@ -0,0 +1,11 @@
# The default VIA keymap for DC01 Left
Please use this for ISO as well.
The keymap looks like a full layout keymap.
This is because the left part of the keyboard acts as the masterm coordinating all four part.
When using the keyboard to connect the other three parts, this keymap overwrites the individual keymaps of the single modules.
When using a module individually, the keymap of that module will take effect.

View file

@ -0,0 +1 @@
VIA_ENABLE = yes

View file

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "left.h" #include "left.h"
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);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

View file

@ -13,29 +13,36 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef LEFT_H #pragma once
#define LEFT_H
#include "quantum.h" #include "quantum.h"
#define XXX KC_NO #define XXX KC_NO
// This a shortcut to help you visually see your layout. #define LAYOUT_all( \
// The first section contains all of the arguments K00, K01, K02, K03, K04, K05, K45, K07, K08, K09, K0A, K0B, K0C, K0D, K06, K0E, K0F, K0G, K0H, K0J, K0K, K0L, \
// The second converts the arguments into a two-dimensional array
#define LAYOUT_ansi( \
K00, K01, K02, K03, K04, K05, K45, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2H, K2J, K2K, K2L, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2H, K2J, K2K, K2L, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, K3F, K3H, K3J, K3K, \ K30, K44, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3F, K3H, K3J, K3K, K3L, \
K40, K41, K42, K43, K46, K47, K48, K49, K4A, K4B, K4E, K4F, K4G, K4H, K4J, K4K, K4L \ K40, K41, K42, K43, K46, K47, K48, K49, K4A, K4B, K4E, K4F, K4G, K4H, K4J, K4K, K4L \
) \ ) { \
{ \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L }, \
{ K00, K01, K02, K03, K04, K05, XXX, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, XXX, XXX, K2H, K2J, K2K, K2L }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, XXX, XXX, XXX, K2H, K2J, K2K, K2L }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, XXX, K3D, XXX, K3F, XXX, K3H, K3J, K3K, XXX }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, XXX, K3F, XXX, K3H, K3J, K3K, K3L }, \
{ K40, K41, K42, K43, XXX, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, K4F, K4G, K4H, K4J, K4K, K4L } \ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, K4F, K4G, K4H, K4J, K4K, K4L } \
} }
#endif #define LAYOUT_ansi( \
K00, K01, K02, K03, K04, K05, K45, K07, K08, K09, K0A, K0B, K0C, K0D, K06, K0E, K0F, K0G, K0H, K0J, K0K, K0L, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2H, K2J, K2K, K2L, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3F, K3H, K3J, K3K, K3L, \
K40, K41, K42, K43, K46, K47, K48, K49, K4A, K4B, K4E, K4F, K4G, K4H, K4J, K4K, K4L \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, XXX, XXX, K2H, K2J, K2K, K2L }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, XXX, K3F, XXX, K3H, K3J, K3K, K3L }, \
{ K40, K41, K42, K43, XXX, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, K4F, K4G, K4H, K4J, K4K, K4L } \
}

View file

@ -31,14 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "timer.h" #include "timer.h"
#include "i2c_master.h" #include "i2c_master.h"
#define SLAVE_I2C_ADDRESS_RIGHT 0x19 #define SLAVE_I2C_ADDRESS_RIGHT 0x32
#define SLAVE_I2C_ADDRESS_NUMPAD 0x21 #define SLAVE_I2C_ADDRESS_NUMPAD 0x36
#define SLAVE_I2C_ADDRESS_ARROW 0x23 #define SLAVE_I2C_ADDRESS_ARROW 0x40
#define ERROR_DISCONNECT_COUNT 5 #define ERROR_DISCONNECT_COUNT 5
static uint8_t error_count_right = 0;
static uint8_t error_count_numpad = 0;
static uint8_t error_count_arrow = 0;
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
@ -210,38 +207,23 @@ uint8_t matrix_scan(void)
} }
# endif # endif
if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)){ //error has occured for main right half if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)) {
error_count_right++;
if (error_count_right > ERROR_DISCONNECT_COUNT){ //disconnect half
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) { for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x3F; //mask bits to keep matrix[i] &= 0x3F; //mask bits to keep
} }
} }
}else{ //no error
error_count_right = 0;
}
if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)){ //error has occured for arrow cluster if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)) {
error_count_arrow++;
if (error_count_arrow > ERROR_DISCONNECT_COUNT){ //disconnect arrow cluster
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) { for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x3FFF; //mask bits to keep matrix[i] &= 0x3FFF; //mask bits to keep
} }
} }
}else{ //no error
error_count_arrow = 0;
}
if (i2c_transaction(SLAVE_I2C_ADDRESS_NUMPAD, 0x1FFFF, 11)){ //error has occured for numpad if (i2c_transaction(SLAVE_I2C_ADDRESS_NUMPAD, 0x1FFFF, 11)) {
error_count_numpad++;
if (error_count_numpad > ERROR_DISCONNECT_COUNT){ //disconnect numpad
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) { for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x1FFFF; //mask bits to keep matrix[i] &= 0x1FFFF; //mask bits to keep
} }
} }
}else{ //no error
error_count_numpad = 0;
}
matrix_scan_quantum(); matrix_scan_quantum();
return 1; return 1;
@ -436,29 +418,37 @@ static void unselect_cols(void)
// Complete rows from other modules over i2c // Complete rows from other modules over i2c
i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset) { i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset) {
i2c_status_t err = i2c_start((address << 1) | I2C_WRITE, 10); i2c_status_t status = i2c_start(address, 50);
i2c_write(0x01, 10); //request data in address 1 if (status < 0) {
goto error;
}
i2c_start((address << 1) | I2C_READ, 5); status = i2c_write(0x01, 50);
if (status < 0) {
goto error;
}
err = i2c_read_ack(10); status = i2c_start(address | I2C_READ, 50);
if (err == 0x55) { //synchronization byte
for (uint8_t i = 0; i < MATRIX_ROWS-1 ; i++) { //assemble slave matrix in main matrix status = i2c_read_ack(50);
if (status != 0x55) { //synchronization byte
goto error;
}
for (uint8_t i = 0; i < MATRIX_ROWS-1 && status >= 0; i++) { //assemble slave matrix in main matrix
matrix[i] &= mask; //mask bits to keep matrix[i] &= mask; //mask bits to keep
err = i2c_read_ack(10); status = i2c_read_ack(50);
matrix[i] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end matrix[i] |= ((uint32_t)status << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
} }
//last read request must be followed by a NACK //last read request must be followed by a NACK
if (status >= 0) {
matrix[MATRIX_ROWS - 1] &= mask; //mask bits to keep matrix[MATRIX_ROWS - 1] &= mask; //mask bits to keep
err = i2c_read_nack(10); status = i2c_read_nack(50);
matrix[MATRIX_ROWS - 1] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end matrix[MATRIX_ROWS - 1] |= ((uint32_t)status << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
} else {
i2c_stop();
return 1;
} }
error:
i2c_stop(); i2c_stop();
return 0;
return (status < 0) ? status : I2C_STATUS_SUCCESS;
} }

View file

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = no # Console for debug

View file

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1013 #define PRODUCT_ID 0x1013
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards #define MANUFACTURER Mechboards
@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
//#define FORCE_NKRO //#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.
*
*/
/*
* 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
/*
* MIDI options
*/
/* 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

View file

@ -1,7 +1,7 @@
{ {
"keyboard_name": "DC01 Numpad", "keyboard_name": "DC01 Numpad",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "Yiancar-Designs",
"width": 4, "width": 4,
"height": 5, "height": 5,
"layouts": { "layouts": {

View file

@ -16,35 +16,17 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_5x4( [0] = LAYOUT_numpad_5x4(
TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ TG(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, \ KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS, \ KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, \ KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT \ KC_P0, KC_PDOT, KC_PENT ),
),
[1] = LAYOUT_numpad_5x4( [1] = LAYOUT_numpad_5x4(
_______, _______, _______, _______, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_HOME, KC_UP, KC_PGUP, \ KC_HOME, KC_UP, KC_PGUP,
KC_LEFT, XXXXXXX, KC_RGHT, _______, \ KC_LEFT, KC_NO, KC_RGHT, KC_TRNS,
KC_END, KC_DOWN, KC_PGDN, \ KC_END, KC_DOWN, KC_PGDN,
KC_INS, KC_DEL, _______ \ KC_INS, KC_DEL, KC_TRNS),
),
}; };
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

View file

@ -21,30 +21,20 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_5x4( [0] = LAYOUT_ortho_5x4(
TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ TG(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS, \ KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PPLS, \ KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PENT, \ KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_P00, KC_PDOT, KC_PENT \ KC_P0, KC_P00, KC_PDOT, KC_PENT),
),
[1] = LAYOUT_ortho_5x4( [1] = LAYOUT_ortho_5x4(
_______, _______, _______, _______, \ _______, _______, _______, _______,
KC_HOME, KC_UP, KC_PGUP, _______, \ KC_HOME, KC_UP, KC_PGUP, _______,
KC_LEFT, XXXXXXX, KC_RGHT, _______, \ KC_LEFT, XXXXXXX, KC_RGHT, _______,
KC_END, KC_DOWN, KC_PGDN, _______, \ KC_END, KC_DOWN, KC_PGDN, _______,
KC_INS, XXXXXXX, KC_DEL, _______ \ KC_INS, XXXXXXX, KC_DEL, _______)
),
}; };
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) { if (record->event.pressed) {
switch(keycode) { switch(keycode) {
@ -56,7 +46,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
return true; return true;
}; };
void led_set_user(uint8_t usb_led) {
}

View file

@ -0,0 +1,46 @@
/* Copyright 2018 Yiancar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_5x4( /* Base */
KC_NLCK, 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_P0, KC_PDOT, KC_PENT),
[1] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

View file

@ -0,0 +1,3 @@
# The default VIA keymap for DC01 Arrow cluster
When using the arrow module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

View file

@ -0,0 +1 @@
VIA_ENABLE = yes

View file

@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c_slave.h" #include "i2c_slave.h"
#include "lufa.h" #include "lufa.h"
#define SLAVE_I2C_ADDRESS 0x21 #define SLAVE_I2C_ADDRESS 0x36
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
@ -196,12 +196,10 @@ uint8_t matrix_scan(void)
} }
# endif # endif
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_reg[1] = 0x55; i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){ for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
} }
}
matrix_scan_quantum(); matrix_scan_quantum();
return 1; return 1;
@ -396,9 +394,6 @@ static void unselect_cols(void)
//this replases tmk code //this replases tmk code
void matrix_setup(void){ void matrix_setup(void){
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts sei(); //enable interupts
}
} }

View file

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "numpad.h" #include "numpad.h"
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);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

View file

@ -13,24 +13,19 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef NUMPAD_H #pragma once
#define NUMPAD_H
#include "quantum.h" #include "quantum.h"
#define XXX KC_NO #define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_numpad_5x4( \ #define LAYOUT_numpad_5x4( \
K00, K01, K02, K03, \ K00, K01, K02, K03, \
K10, K11, K12, \ K10, K11, K12, \
K20, K21, K22, K13, \ K20, K21, K22, K13, \
K30, K31, K32, \ K30, K31, K32, \
K40, K42, K43 \ K40, K42, K43 \
) \ ) { \
{ \
{ K00, K01, K02, K03 }, \ { K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \ { K10, K11, K12, K13 }, \
{ K20, K21, K22, XXX }, \ { K20, K21, K22, XXX }, \
@ -44,13 +39,10 @@
K20, K21, K22, K23, \ K20, K21, K22, K23, \
K30, K31, K32, K33, \ K30, K31, K32, K33, \
K40, K41, K42, K43 \ K40, K41, K42, K43 \
) \ ) { \
{ \
{ K00, K01, K02, K03 }, \ { K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \ { K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \ { K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 }, \ { K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 } \ { K40, K41, K42, K43 } \
} }
#endif

View file

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = no # Console for debug

View file

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1011 #define PRODUCT_ID 0x1011
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards #define MANUFACTURER Mechboards
@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
//#define FORCE_NKRO //#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.
*
*/
/*
* 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
/*
* MIDI options
*/
/* 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

View file

@ -1,21 +1,15 @@
{ {
"keyboard_name": "DC01 Right Half", "keyboard_name": "DC01 Right Half",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "Yiancar-Designs",
"width": 8.5, "width": 8.5,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT_all": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Back", "x":6.5, "y":0}, {"label":"Del", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"~", "x":6.25, "y":2}, {"label":"Enter", "x":7.25, "y":2, "w":1.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Shift", "x":7.5, "y":3}, {"label":"Fn", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"Win", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_ansi": { "LAYOUT_ansi": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Backspace", "x":6.5, "y":0, "w":2}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"\"", "x":5.25, "y":2}, {"label":"Enter", "x":6.25, "y":2, "w":2.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"Alt", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}] "layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Back", "x":6.5, "y":0}, {"label":"Del", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"Enter", "x":6.25, "y":2, "w":2.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Shift", "x":7.5, "y":3}, {"label":"Fn", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"Win", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_iso": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Backspace", "x":6.5, "y":0, "w":2}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"~", "x":6.25, "y":2}, {"label":"Enter", "x":7.25, "y":1, "w":1.25, "h":2}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_hhkb_ansi": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Backspace", "x":6.5, "y":0}, {"label":"~", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"\"", "x":5.25, "y":2}, {"label":"Enter", "x":6.25, "y":2, "w":2.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Fn", "x":7.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"Alt", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_hhkb_iso": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"|", "x":6.5, "y":0}, {"label":"Backspace", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"~", "x":6.25, "y":2}, {"label":"Enter", "x":7.25, "y":1, "w":1.25, "h":2}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Fn", "x":7.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
} }
} }
} }

View file

@ -17,22 +17,16 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ansi( /* Base */ [0] = LAYOUT_ansi( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC,
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,MO(1),
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \ KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
),
[1] = LAYOUT_ansi( /* Empty for Dynamic keymap */
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
}; };
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

View file

@ -1,46 +0,0 @@
/* Copyright 2018 Yiancar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_hhkb_ansi( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(1), \
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \
),
[1] = LAYOUT_hhkb_ansi(
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
KC_TRNS,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
KC_PAST,KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
KC_PPLS,KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

View file

@ -1,3 +0,0 @@
# The default HHKB ANSI keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

View file

@ -1,46 +0,0 @@
/* Copyright 2018 Yiancar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_hhkb_iso( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS,KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(1), \
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \
),
[1] = LAYOUT_hhkb_iso(
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
KC_TRNS,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, \
KC_PAST,KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_PENT, \
KC_PPLS,KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

View file

@ -1,3 +0,0 @@
# The default HHKB ISO keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

View file

@ -1,3 +0,0 @@
# The default ISO keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

View file

@ -0,0 +1,46 @@
/* Copyright 2018 Yiancar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
[1] = LAYOUT_all( /* FN */
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_PENT,
KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

View file

@ -0,0 +1,11 @@
# The default VIA keymap for DC01 Left
Please use this for ISO as well.
The keymap looks like a full layout keymap.
This is because the left part of the keyboard acts as the masterm coordinating all four part.
When using the keyboard to connect the other three parts, this keymap overwrites the individual keymaps of the single modules.
When using a module individually, the keymap of that module will take effect.

View file

@ -0,0 +1 @@
VIA_ENABLE = yes

View file

@ -31,8 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "timer.h" #include "timer.h"
#include "i2c_slave.h" #include "i2c_slave.h"
#include "lufa.h" #include "lufa.h"
#include "quantum.h"
#define SLAVE_I2C_ADDRESS 0x19 #define SLAVE_I2C_ADDRESS 0x32
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
@ -196,12 +197,10 @@ uint8_t matrix_scan(void)
} }
# endif # endif
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_reg[1] = 0x55; i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){ for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
} }
}
matrix_scan_quantum(); matrix_scan_quantum();
return 1; return 1;
@ -396,9 +395,6 @@ static void unselect_cols(void)
//this replases tmk code //this replases tmk code
void matrix_setup(void){ void matrix_setup(void){
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts sei(); //enable interupts
}
} }

View file

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "right.h" #include "right.h"
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);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

View file

@ -13,74 +13,36 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef RIGHT_H #pragma once
#define RIGHT_H
#include "quantum.h" #include "quantum.h"
#define XXX KC_NO #define XXX KC_NO
// This a shortcut to help you visually see your layout. #define LAYOUT_all( \
// The first section contains all of the arguments K01, K02, K03, K04, K05, K06, K07, K00, \
// The second converts the arguments into a two-dimensional array K10, K11, K12, K13, K14, K15, K16, K17, \
K20, K21, K22, K23, K24, K25, K26, K27, \
K30, K31, K32, K33, K34, K36, K37, \
K40, K41, K42, K43, K44, K45 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, XXX, K36, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#define LAYOUT_ansi( \ #define LAYOUT_ansi( \
K01, K02, K03, K04, K05, K06, K07, \
K10, K11, K12, K13, K14, K15, K16, K17, \
K20, K21, K22, K23, K24, K25, K27, \
K30, K31, K32, K33, K34, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
{ XXX, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, XXX, K27 }, \
{ K30, K31, K32, K33, K34, XXX, XXX, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#define LAYOUT_iso( \
K01, K02, K03, K04, K05, K06, K07, \
K10, K11, K12, K13, K14, K15, K16, \
K20, K21, K22, K23, K24, K25, K26, K27, \
K30, K31, K32, K33, K34, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
{ XXX, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, XXX }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, XXX, XXX, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#define LAYOUT_hhkb_ansi( \
K01, K02, K03, K04, K05, K06, K07, K00, \ K01, K02, K03, K04, K05, K06, K07, K00, \
K10, K11, K12, K13, K14, K15, K16, K17, \ K10, K11, K12, K13, K14, K15, K16, K17, \
K20, K21, K22, K23, K24, K25, K27, \ K20, K21, K22, K23, K24, K25, K27, \
K30, K31, K32, K33, K34, K36, K37, \ K30, K31, K32, K33, K34, K36, K37, \
K40, K41, K42, K43, K44, K45 \ K40, K41, K42, K43, K44, K45 \
) \ ) { \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \ { K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, XXX, K27 }, \ { K20, K21, K22, K23, K24, K25, XXX, K27 }, \
{ K30, K31, K32, K33, K34, XXX, K36, K37 }, \ { K30, K31, K32, K33, K34, XXX, K36, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \ { K40, K41, K42, K43, K44, K45, XXX, XXX } \
} }
#define LAYOUT_hhkb_iso( \
K01, K02, K03, K04, K05, K06, K07, K00, \
K10, K11, K12, K13, K14, K15, K16, \
K20, K21, K22, K23, K24, K25, K26, K27, \
K30, K31, K32, K33, K34, K36, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, XXX }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, XXX, K36, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#endif

View file

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug CONSOLE_ENABLE = no # Console for debug