Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f0b491fc0 | ||
|
|
6bb479ea45 | ||
|
|
5bdddb7821 | ||
|
|
199458378b | ||
|
|
bfc33a56d7 | ||
|
|
5daa3a8836 | ||
|
|
4163a3819e | ||
|
|
4c05e39a02 | ||
|
|
4586b19be3 | ||
|
|
c6123b2e4a | ||
|
|
513286cf98 | ||
|
|
52e2afe673 | ||
|
|
79de0cd119 | ||
|
|
052f81aaca | ||
|
|
aa69337cf5 | ||
|
|
9fc3afbef4 | ||
|
|
b31ac35441 | ||
|
|
b92515f139 | ||
|
|
fdd06d3fca | ||
|
|
bf31f516e3 | ||
|
|
909fd4ae64 | ||
|
|
835556da91 | ||
|
|
229e38f097 | ||
|
|
5944ab246a | ||
|
|
07879bf66b | ||
|
|
a5b8db52a0 | ||
|
|
c0cfacda98 | ||
|
|
4ffbfe8298 | ||
|
|
0f92d305e2 | ||
|
|
a4a57d47ed | ||
|
|
6c462e0c01 | ||
|
|
27e7eac279 | ||
|
|
dee6a6982c | ||
|
|
97816df7e7 | ||
|
|
af97d6b58e | ||
|
|
92308ed0e5 | ||
|
|
d537120eab | ||
|
|
93ee3bea37 | ||
|
|
2b95f41b91 | ||
|
|
c330872f47 | ||
|
|
986b065654 | ||
|
|
1becbcb013 | ||
|
|
cb590bb37b | ||
|
|
9a64eb8533 | ||
|
|
4be4ed3397 | ||
|
|
3f2c0bfa86 | ||
|
|
0a9fda968d | ||
|
|
ad1327cd00 | ||
|
|
304d84cd08 | ||
|
|
f5c8c5d4c8 | ||
|
|
56d2198b3d | ||
|
|
048ef311dc | ||
|
|
9c02e2ab49 | ||
|
|
b4e30d3929 | ||
|
|
d639bd2021 | ||
|
|
42ea912fde | ||
|
|
13c394fba4 | ||
|
|
c0c69a1a7c | ||
|
|
3c7fa0acc1 | ||
|
|
3dbdd15304 | ||
|
|
a7882b1ffc | ||
|
|
5a1b68d562 | ||
|
|
0e548f8b5d | ||
|
|
06d21009b2 | ||
|
|
8cbf61c919 | ||
|
|
d961c80df2 | ||
|
|
101465b6ed | ||
|
|
3faf06c880 | ||
|
|
e667e9f6da | ||
|
|
a3da586505 | ||
|
|
3835b4bfcc | ||
|
|
011811af68 | ||
|
|
306f43e5ee | ||
|
|
c5ab0b2b61 | ||
|
|
77e54e34e1 | ||
|
|
a3357d078e | ||
|
|
cfc4149712 | ||
|
|
87bc36253d | ||
|
|
f35adb4f37 | ||
|
|
d910b94a3c | ||
|
|
53382d9564 | ||
|
|
a37e924e36 | ||
|
|
11eb3d5491 | ||
|
|
87b675241a | ||
|
|
8c2cc30b0e | ||
|
|
cf0650e3f0 |
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||||
|
|
||||||
Mnemes Swedish Bonaza
|
Mnemes Swedish Bonanza
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout
|
My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout
|
||||||
@@ -33,6 +33,8 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym
|
|||||||
- `LEAD s l` : `λ`.
|
- `LEAD s l` : `λ`.
|
||||||
- `LEAD s s` : `¯\_(ツ)_/¯`
|
- `LEAD s s` : `¯\_(ツ)_/¯`
|
||||||
- `LEAD s f` : `凸(ツ)凸`
|
- `LEAD s f` : `凸(ツ)凸`
|
||||||
|
- `LEAD u l` : Set unicode input mode to linux.
|
||||||
|
- `LEAD s w` : Set unicode input mode to windows.
|
||||||
- `LEAD a *` : Application switching based on position in start menu. Very specific to my computer.
|
- `LEAD a *` : Application switching based on position in start menu. Very specific to my computer.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#define ONESHOT_TIMEOUT 3000
|
#define ONESHOT_TIMEOUT 3000
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
#define FORCE_NKRO
|
||||||
#define LEADER_TIMEOUT 1000
|
#define LEADER_TIMEOUT 1000
|
||||||
|
|
||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 448 KiB After Width: | Height: | Size: 446 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 421 KiB After Width: | Height: | Size: 415 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 423 KiB After Width: | Height: | Size: 423 KiB |
@@ -7,43 +7,47 @@
|
|||||||
/*
|
/*
|
||||||
*WINDOWS SWEDISH
|
*WINDOWS SWEDISH
|
||||||
*/
|
*/
|
||||||
#define KN_HALF KC_GRV // 1/2
|
/*
|
||||||
#define KN_PLUS KC_MINS // +
|
*WINDOWS SWEDISH
|
||||||
#define KN_ACUT KC_EQL // ´
|
*/
|
||||||
#define KN_AO KC_LBRC // Å
|
#define KN_HALF KC_GRV // 1/2
|
||||||
#define KN_UMLA KC_RBRC // ¨
|
#define KN_PLUS KC_MINS // +
|
||||||
#define KN_OE KC_SCLN // Ö
|
#define KN_ACUT KC_EQL // ´
|
||||||
#define KN_AE KC_QUOT // Ä
|
#define KN_AO KC_LBRC // Å
|
||||||
#define KN_QUOT KC_NUHS // '
|
#define KN_UMLA KC_RBRC // ¨
|
||||||
#define KN_LABK KC_NUBS // <
|
#define KN_OE KC_SCLN // Ö
|
||||||
#define KN_MINS KC_SLSH // -
|
#define KN_AE KC_QUOT // Ä
|
||||||
#define KN_EXLM LSFT(KC_1) // !
|
#define KN_QUOT KC_NUHS // '
|
||||||
#define KN_DQT LSFT(KC_2) // "
|
#define KN_LABK KC_NUBS // <
|
||||||
#define KN_AT RALT(KC_2) // @
|
#define KN_MINS KC_SLSH // -
|
||||||
#define KN_HASH LSFT(KC_3) // #
|
#define KN_EXLM LSFT(KC_1) // !
|
||||||
#define KN_DLR RALT(KC_4) // $
|
#define KN_DQT LSFT(KC_2) // "
|
||||||
#define KN_PERC LSFT(KC_5) // %
|
#define KN_AT RALT(KC_2) // @
|
||||||
#define KN_AMPR LSFT(KC_6) // &
|
#define KN_HASH LSFT(KC_3) // #
|
||||||
#define KN_SLSH LSFT(KC_7) // /
|
#define KN_EUR LSFT(KC_4) // €
|
||||||
#define KN_LPRN LSFT(KC_8) // (
|
#define KN_DLR RALT(KC_4) // $
|
||||||
#define KN_RPRN LSFT(KC_9) // )
|
#define KN_PERC LSFT(KC_5) // %
|
||||||
#define KN_EQL LSFT(KC_0) // =
|
#define KN_AMPR LSFT(KC_6) // &
|
||||||
#define KN_UNDS LSFT(KN_MINS) // _
|
#define KN_SLSH LSFT(KC_7) // /
|
||||||
#define KN_QUES LSFT(KN_PLUS) // ?
|
#define KN_LPRN LSFT(KC_8) // (
|
||||||
#define KN_GRAV LSFT(KN_ACUT) // `
|
#define KN_RPRN LSFT(KC_9) // )
|
||||||
#define KN_LCBR RALT(KC_7) // {
|
#define KN_EQL LSFT(KC_0) // =
|
||||||
#define KN_RCBR RALT(KC_0) // }
|
#define KN_UNDS LSFT(KN_MINS) // _
|
||||||
#define KN_LBRC RALT(KC_8) // [
|
#define KN_QUES LSFT(KN_PLUS) // ?
|
||||||
#define KN_RBRC RALT(KC_9) // ]
|
#define KN_GRAV LSFT(KN_ACUT) // `
|
||||||
#define KN_RABK LSFT(KN_LABK) // <
|
#define KN_LCBR RALT(KC_7) // {
|
||||||
#define KN_COLN LSFT(KC_DOT) // :
|
#define KN_RCBR RALT(KC_0) // }
|
||||||
#define KN_SCLN LSFT(KC_COMM) // :
|
#define KN_LBRC RALT(KC_8) // [
|
||||||
#define KN_PIPE RALT(KN_LABK) // |
|
#define KN_RBRC RALT(KC_9) // ]
|
||||||
#define KN_QUES LSFT(KN_PLUS) // ?
|
#define KN_RABK LSFT(KN_LABK) // <
|
||||||
#define KN_CIRC LSFT(KN_UMLA) // ^
|
#define KN_COLN LSFT(KC_DOT) // :
|
||||||
#define KN_ASTR LSFT(KN_QUOT) // *
|
#define KN_SCLN LSFT(KC_COMM) // :
|
||||||
#define KN_TILD RALT(KN_UMLA) // ~
|
#define KN_PIPE RALT(KN_LABK) // |
|
||||||
#define KN_BSLS RALT(KN_PLUS) //
|
#define KN_QUES LSFT(KN_PLUS) // ?
|
||||||
|
#define KN_CIRC LSFT(KN_UMLA) // ^
|
||||||
|
#define KN_ASTR LSFT(KN_QUOT) // *
|
||||||
|
#define KN_TILD RALT(KN_UMLA) // ~
|
||||||
|
#define KN_BSLS RALT(KN_PLUS) //
|
||||||
|
|
||||||
#define OSM_LCTL OSM(MOD_LCTL)
|
#define OSM_LCTL OSM(MOD_LCTL)
|
||||||
#define OSM_LALT OSM(MOD_LALT)
|
#define OSM_LALT OSM(MOD_LALT)
|
||||||
@@ -85,32 +89,26 @@ enum {
|
|||||||
TD_EQ
|
TD_EQ
|
||||||
};
|
};
|
||||||
|
|
||||||
//Custom keycodes
|
|
||||||
enum {
|
|
||||||
PLACEHOLDER = SAFE_RANGE
|
|
||||||
};
|
|
||||||
|
|
||||||
//State and timers
|
//State and timers
|
||||||
uint16_t kf_timers[12];
|
uint16_t kf_timers[12];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[BASE] = {
|
[BASE] = {
|
||||||
|
|
||||||
{ M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) },
|
{ M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) },
|
||||||
{ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO },
|
{ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO },
|
||||||
{ OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE },
|
{ OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE },
|
||||||
{ OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT },
|
{ OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT },
|
||||||
{ MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_HYP ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) }
|
{ MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,MO(SYM) ,KC_BSPC ,KC_ENT ,KC_SPC ,MO(SYM) ,KC_LEAD ,KC_LALT ,KC_LCTRL ,KC_HYP }
|
||||||
|
|
||||||
},
|
},
|
||||||
[NAV] = {
|
[NAV] = {
|
||||||
|
|
||||||
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
|
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
|
||||||
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS },
|
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_HOME ,KC_PGDN ,KC_PGUP ,KC_END ,KC_TRNS ,KC_TRNS },
|
||||||
{ KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS },
|
{ KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS },
|
||||||
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
|
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
|
||||||
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU }
|
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU }
|
||||||
|
|
||||||
@@ -119,8 +117,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
|
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
|
||||||
{ KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS },
|
{ KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS },
|
||||||
{ KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_SCLN ,KN_COLN ,KN_AMPR ,KN_PIPE ,KC_TRNS },
|
{ KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_CIRC ,KN_DLR ,KN_AMPR ,KN_PIPE ,KC_TRNS },
|
||||||
{ KC_TRNS ,KN_DLR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KC_COMM ,KC_DOT ,KN_QUES ,KN_BSLS ,KC_TRNS },
|
{ KC_TRNS ,KN_EUR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KN_SCLN ,KN_COLN ,KN_QUES ,KN_BSLS ,KC_TRNS },
|
||||||
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }
|
{ KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -302,6 +300,15 @@ void matrix_scan_user(void) {
|
|||||||
register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI);
|
register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS (KC_U, KC_L) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS (KC_U, KC_W) {
|
||||||
|
set_unicode_input_mode(UC_WINC);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SEQ_TWO_KEYS (KC_S, KC_S) {
|
SEQ_TWO_KEYS (KC_S, KC_S) {
|
||||||
// ¯\_(ツ)_/¯
|
// ¯\_(ツ)_/¯
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get
|
|||||||
* Easy on beginners. It has everything you need for your day to day usage.
|
* Easy on beginners. It has everything you need for your day to day usage.
|
||||||
|
|
||||||
#### Cons
|
#### Cons
|
||||||
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md)
|
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox/keymaps/default/readme.md)
|
||||||
* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.
|
* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.
|
||||||
|
|
||||||
#### Notes
|
#### Notes
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "ergodox.h"
|
#include "ergodox.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
#include "mousekey.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "action_util.h"
|
#include "action_util.h"
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case RGB_FF0000:
|
case RGB_FF0000:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
EZ_RGB(0xff0000);
|
EZ_RGB(0xff0000UL);
|
||||||
register_code(KC_1); unregister_code(KC_1);
|
register_code(KC_1); unregister_code(KC_1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case RGB_00FF00:
|
case RGB_00FF00:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
EZ_RGB(0x00ff00);
|
EZ_RGB(0x00ff00UL);
|
||||||
register_code(KC_2); unregister_code(KC_2);
|
register_code(KC_2); unregister_code(KC_2);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case RGB_0000FF:
|
case RGB_0000FF:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
EZ_RGB(0x0000ff);
|
EZ_RGB(0x0000ffUL);
|
||||||
register_code(KC_3); unregister_code(KC_3);
|
register_code(KC_3); unregister_code(KC_3);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case RGB_FFFFFF:
|
case RGB_FFFFFF:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
EZ_RGB(0xffffff);
|
EZ_RGB(0xffffffUL);
|
||||||
register_code(KC_4); unregister_code(KC_4);
|
register_code(KC_4); unregister_code(KC_4);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER GON
|
||||||
|
#define PRODUCT NerD
|
||||||
|
#define DESCRIPTION QMK port for the GON Nerd PCB
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 9
|
||||||
|
|
||||||
|
/* backlight */
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 }
|
||||||
|
#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5, D1 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "gonnerd.h"
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef GONNERD_H
|
||||||
|
#define GONNERD_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP_TKL( \
|
||||||
|
K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \
|
||||||
|
K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \
|
||||||
|
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \
|
||||||
|
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||||
|
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \
|
||||||
|
K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \
|
||||||
|
{ K01, K11, K21, K31, K41, K51, K61, K71, K81 }, \
|
||||||
|
{ K02, K12, K22, K32, K42, K52, K62, K72, K82 }, \
|
||||||
|
{ K03, K13, K23, K33, K43, K53, K63, K73, K83 }, \
|
||||||
|
{ K04, K14, K24, K34, K44, K54, K64, K74, K84 }, \
|
||||||
|
{ K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \
|
||||||
|
{ K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \
|
||||||
|
{ K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \
|
||||||
|
{ K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \
|
||||||
|
{ K09, K19, K29, K39, K49, K59, K69, K79, K89 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KEYMAP_60( \
|
||||||
|
K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \
|
||||||
|
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \
|
||||||
|
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||||
|
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \
|
||||||
|
K06, K05, K78, K70, K72, K73, K74, K75 \
|
||||||
|
) KEYMAP_TKL( \
|
||||||
|
K08, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \
|
||||||
|
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \
|
||||||
|
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||||
|
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \
|
||||||
|
K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = 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 = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#include "gonnerd.h"
|
||||||
|
|
||||||
|
// Keymap layers
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = KEYMAP_60( /* 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_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_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT, \
|
||||||
|
KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = 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 = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
#include "gonnerd.h"
|
||||||
|
|
||||||
|
// Keymap layers
|
||||||
|
#define BASE_LAYER 0
|
||||||
|
#define FUNCTION_LAYER 1
|
||||||
|
#define SYSTEM_LAYER 2
|
||||||
|
|
||||||
|
// Key aliases
|
||||||
|
#define __x__ KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Layer 0: Default Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | BSp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Funct | A| S| D| F| G| H| J| K| L| ;| '|Enter |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |
|
||||||
|
* |-----------------------------------------------------------'
|
||||||
|
* | Ctl|Alt|Gui | Space |Gui |Alt| F2| Ctl |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[BASE_LAYER] = KEYMAP_60(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||||
|
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 1: Function Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11| F12| Del |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Prv|Ply|Nxt| | |Pg^|Hme|Up |End| |Br-|Br+| |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Hold |Mte|Vl-|Vl+| | |Pgv|Lft|Dwn|Rgt| | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------'
|
||||||
|
* | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[FUNCTION_LAYER] = KEYMAP_60(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||||
|
__x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
|
||||||
|
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
|
||||||
|
KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 2: System Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Reset| | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------'
|
||||||
|
* | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[SYSTEM_LAYER] = KEYMAP_60(
|
||||||
|
RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||||
|
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Mauin's keymap for the GON NerD
|
||||||
|
|
||||||
|
This layout is based on a Pok3r style layout with a standard base layer.
|
||||||
|
|
||||||
|
Function layers provide access to navigation and media keys.
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
GON NerD keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
## Changing Bootloader
|
||||||
|
|
||||||
|
It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections.
|
||||||
|
|
||||||
|
It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here:
|
||||||
|
[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard.
|
||||||
|
|
||||||
|
_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
|
||||||
|
not work anymore. You will lose your warranty and official support from GON!_
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||||
|
|
||||||
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
|
### Default
|
||||||
|
|
||||||
|
To build with the default keymap, simply run `make default`.
|
||||||
|
|
||||||
|
### Other Keymaps
|
||||||
|
|
||||||
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make [default|jack|<name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 8000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
@@ -43,38 +43,107 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 }
|
#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
/* number of backlight levels */
|
||||||
#define BACKLIGHT_LEVELS 3
|
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
|
||||||
#define DEBOUNCING_DELAY 5
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
// #define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
// #define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
/* key combination for command */
|
/* key combination for command */
|
||||||
#define IS_COMMAND() ( \
|
#define IS_COMMAND() ( \
|
||||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* disable debug print */
|
/* disable debug print */
|
||||||
//#define NO_DEBUG
|
// #define NO_DEBUG
|
||||||
|
|
||||||
/* disable print */
|
/* disable print */
|
||||||
//#define NO_PRINT
|
// #define NO_PRINT
|
||||||
|
|
||||||
/* disable action features */
|
/* disable action features */
|
||||||
//#define NO_ACTION_LAYER
|
//#define NO_ACTION_LAYER
|
||||||
|
|||||||
@@ -14,4 +14,11 @@
|
|||||||
#define RGB_DI_PIN B5
|
#define RGB_DI_PIN B5
|
||||||
#define RGBSPS_NUM 57
|
#define RGBSPS_NUM 57
|
||||||
|
|
||||||
|
#define LAYOUT_DVORAK
|
||||||
|
#define LAYOUT_COLEMAK
|
||||||
|
#define LAYOUT_NORMAN
|
||||||
|
#define LAYOUT_WORKMAN
|
||||||
|
|
||||||
|
#define DOUBLESPACE_LAYER_ENABLE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,38 @@
|
|||||||
#include "promethium.h"
|
#include "promethium.h"
|
||||||
|
#include "analog.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100}
|
||||||
|
|
||||||
|
uint8_t battery_level(void) {
|
||||||
|
float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024;
|
||||||
|
if (voltage < MIN_VOLTAGE) return 0;
|
||||||
|
if (voltage > MAX_VOLTAGE) return 255;
|
||||||
|
return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void battery_poll(uint8_t level) {
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
static uint16_t counter = BATTERY_POLL;
|
||||||
|
counter++;
|
||||||
|
|
||||||
|
if (counter > BATTERY_POLL) {
|
||||||
|
counter = 0;
|
||||||
|
battery_poll(battery_level());
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -4,6 +4,11 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define PS2_INIT_DELAY 2000
|
#define PS2_INIT_DELAY 2000
|
||||||
|
#define UNICODE_TYPE_DELAY 0
|
||||||
|
#define BATTERY_PIN 9
|
||||||
|
#define BATTERY_POLL 30000
|
||||||
|
#define MAX_VOLTAGE 4.2
|
||||||
|
#define MIN_VOLTAGE 3.2
|
||||||
|
|
||||||
#define KEYMAP( \
|
#define KEYMAP( \
|
||||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
||||||
@@ -22,6 +27,8 @@
|
|||||||
{k47, k48, k49, k4a, k4b, k4c} \
|
{k47, k48, k49, k4a, k4b, k4c} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum led_sequence {
|
enum led_sequence {
|
||||||
LED_IND_BLUETOOTH,
|
LED_IND_BLUETOOTH,
|
||||||
LED_IND_USB,
|
LED_IND_USB,
|
||||||
@@ -98,4 +105,4 @@ enum led_sequence {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void battery_poll(uint8_t level);
|
||||||
@@ -22,3 +22,52 @@ void rgbsps_turnoff(void) {
|
|||||||
void rgbsps_send(void) {
|
void rgbsps_send(void) {
|
||||||
ws2812_setleds(led, RGBSPS_NUM);
|
ws2812_setleds(led, RGBSPS_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val) {
|
||||||
|
uint8_t r = 0, g = 0, b = 0, base, color;
|
||||||
|
|
||||||
|
if (sat == 0) { // Acromatic color (gray). Hue doesn't mind.
|
||||||
|
r = val;
|
||||||
|
g = val;
|
||||||
|
b = val;
|
||||||
|
} else {
|
||||||
|
base = ((255 - sat) * val) >> 8;
|
||||||
|
color = (val - base) * (hue % 60) / 60;
|
||||||
|
|
||||||
|
switch (hue / 60) {
|
||||||
|
case 0:
|
||||||
|
r = val;
|
||||||
|
g = base + color;
|
||||||
|
b = base;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
r = val - color;
|
||||||
|
g = val;
|
||||||
|
b = base;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
r = base;
|
||||||
|
g = val;
|
||||||
|
b = base + color;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
r = base;
|
||||||
|
g = val - color;
|
||||||
|
b = val;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
r = base + color;
|
||||||
|
g = base;
|
||||||
|
b = val;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
r = val;
|
||||||
|
g = base;
|
||||||
|
b = val - color;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rgbsps_set(index, r, g, b);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,3 +2,4 @@ void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
|
|||||||
void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b);
|
void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b);
|
||||||
void rgbsps_turnoff(void);
|
void rgbsps_turnoff(void);
|
||||||
void rgbsps_send(void);
|
void rgbsps_send(void);
|
||||||
|
void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val);
|
||||||
@@ -73,3 +73,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
|||||||
|
|
||||||
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
||||||
SRC += rgbsps.c
|
SRC += rgbsps.c
|
||||||
|
SRC += $(QUANTUM_DIR)/analog.c
|
||||||
@@ -1 +1,16 @@
|
|||||||
#include "kc60.h"
|
#include "kc60.h"
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led)
|
||||||
|
{
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// output low
|
||||||
|
DDRB |= (1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
DDRB &= ~(1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2012 Jun Wako <[email protected]>
|
|
||||||
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 <avr/io.h>
|
|
||||||
#include "stdint.h"
|
|
||||||
#include "led.h"
|
|
||||||
|
|
||||||
|
|
||||||
void led_set(uint8_t usb_led)
|
|
||||||
{
|
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
|
||||||
// output low
|
|
||||||
DDRB |= (1<<2);
|
|
||||||
PORTB &= ~(1<<2);
|
|
||||||
} else {
|
|
||||||
// Hi-Z
|
|
||||||
DDRB &= ~(1<<2);
|
|
||||||
PORTB &= ~(1<<2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
# project specific files
|
|
||||||
SRC = led.c
|
|
||||||
|
|
||||||
# MCU name
|
# MCU name
|
||||||
#MCU = at90usb1287
|
#MCU = at90usb1287
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
SUBPROJECT_DEFAULT = rev2
|
||||||
|
|
||||||
ifndef MAKEFILE_INCLUDED
|
ifndef MAKEFILE_INCLUDED
|
||||||
include ../../Makefile
|
include ../../Makefile
|
||||||
endif
|
endif
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
:080000000000000000000001F7
|
:0B0000000000000000000000000001F4
|
||||||
:00000001FF
|
:00000001FF
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
:080000000000000000000000F8
|
:0B0000000000000000000000000000F5
|
||||||
:00000001FF
|
:00000001FF
|
||||||
@@ -16,8 +16,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
|
|
||||||
#define I2C_MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
// #define I2C_MASTER_RIGHT
|
// #define _MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
#ifdef SUBPROJECT_rev1
|
#ifdef SUBPROJECT_rev1
|
||||||
#include "../../rev1/config.h"
|
#include "../../rev1/config.h"
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
|
|
||||||
#define EE_HANDS
|
#define MASTER_LEFT
|
||||||
|
// #define _MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
|
||||||
#ifdef SUBPROJECT_rev1
|
#ifdef SUBPROJECT_rev1
|
||||||
|
|||||||
@@ -6,9 +6,45 @@ This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/
|
|||||||
Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
|
Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
|
||||||
based boards.
|
based boards.
|
||||||
|
|
||||||
|
|
||||||
|
## First Time Setup
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make rev2
|
||||||
|
```
|
||||||
|
|
||||||
|
You will see a lot of output and if everything worked correctly you will see the built hex files:
|
||||||
|
|
||||||
|
```
|
||||||
|
lets_split_rev2_serial.hex
|
||||||
|
lets_split_rev2_i2c.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make rev2-YOUR_KEYMAP_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
If everything worked correctly you will see a file:
|
||||||
|
|
||||||
|
```
|
||||||
|
lets_split_rev2_YOUR_KEYMAP_NAME.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
|
||||||
|
|
||||||
|
### Let's split 1.0
|
||||||
|
If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
|
||||||
|
|
||||||
Some features supported by the firmware:
|
Some features supported by the firmware:
|
||||||
|
|
||||||
* Either half can connect to the computer via USB, or both halves can be used
|
* Either half can connect to the computer via USB, or both halves can be used
|
||||||
@@ -62,7 +98,7 @@ unnecessary in simple use cases.
|
|||||||
Notes on Software Configuration
|
Notes on Software Configuration
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
Configuring the firmware is similar to any other TMK project. One thing
|
Configuring the firmware is similar to any other QMK project. One thing
|
||||||
to note is that `MATIX_ROWS` in `config.h` is the total number of rows between
|
to note is that `MATIX_ROWS` in `config.h` is the total number of rows between
|
||||||
the two halves, i.e. if your split keyboard has 4 rows in each half, then
|
the two halves, i.e. if your split keyboard has 4 rows in each half, then
|
||||||
`MATRIX_ROWS=8`.
|
`MATRIX_ROWS=8`.
|
||||||
@@ -70,37 +106,59 @@ the two halves, i.e. if your split keyboard has 4 rows in each half, then
|
|||||||
Also the current implementation assumes a maximum of 8 columns, but it would
|
Also the current implementation assumes a maximum of 8 columns, but it would
|
||||||
not be very difficult to adapt it to support more if required.
|
not be very difficult to adapt it to support more if required.
|
||||||
|
|
||||||
|
|
||||||
Flashing
|
Flashing
|
||||||
--------
|
-------
|
||||||
|
|
||||||
From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
|
From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
|
||||||
|
|
||||||
Example: `make rev2-serial-avrdude`
|
Example: `make rev2-serial-avrdude`
|
||||||
|
|
||||||
|
|
||||||
|
Choosing which board to plug the USB cable into (choosing Master)
|
||||||
|
--------
|
||||||
|
Because the two boards are identical, the firmware has logic to differentiate the left and right board.
|
||||||
|
|
||||||
|
It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
|
||||||
|
|
||||||
|
The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
|
||||||
|
|
||||||
|
The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
|
||||||
|
|
||||||
|
### Setting the left hand as master
|
||||||
|
If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
|
||||||
|
|
||||||
|
### Setting the right hand as master
|
||||||
|
If you always plug the usb cable into the right board, add an extra flag to your `config.h`
|
||||||
|
```
|
||||||
|
#define MASTER_RIGHT
|
||||||
|
```
|
||||||
|
|
||||||
|
### Setting EE_hands to use either hands as master
|
||||||
If you define `EE_HANDS` in your `config.h`, you will need to set the
|
If you define `EE_HANDS` in your `config.h`, you will need to set the
|
||||||
EEPROM for the left and right halves. The EEPROM is used to store whether the
|
EEPROM for the left and right halves.
|
||||||
|
|
||||||
|
The EEPROM is used to store whether the
|
||||||
half is left handed or right handed. This makes it so that the same firmware
|
half is left handed or right handed. This makes it so that the same firmware
|
||||||
file will run on both hands instead of having to flash left and right handed
|
file will run on both hands instead of having to flash left and right handed
|
||||||
versions of the firmware to each half. To flash the EEPROM file for the left
|
versions of the firmware to each half. To flash the EEPROM file for the left
|
||||||
half run:
|
half run:
|
||||||
```
|
```
|
||||||
make eeprom-left
|
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
|
||||||
|
// or the equivalent in dfu-programmer
|
||||||
|
|
||||||
```
|
```
|
||||||
and similarly for right half
|
and similarly for right half
|
||||||
```
|
```
|
||||||
make eeprom-right
|
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
|
||||||
|
// or the equivalent in dfu-programmer
|
||||||
```
|
```
|
||||||
|
|
||||||
After you have flashed the EEPROM for the first time, you then need to program
|
NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
|
||||||
the flash memory:
|
|
||||||
```
|
After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
|
||||||
make program
|
|
||||||
```
|
|
||||||
Note that you need to program both halves, but you have the option of using
|
Note that you need to program both halves, but you have the option of using
|
||||||
different keymaps for each half. You could program the left half with a QWERTY
|
different keymaps for each half. You could program the left half with a QWERTY
|
||||||
layout and the right half with a Colemak layout. Then if you connect the left
|
layout and the right half with a Colemak layout using bootmagic's default layout option.
|
||||||
half to a computer by USB the keyboard will use QWERTY and Colemak when the
|
Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
|
||||||
right half is connected.
|
right half is connected.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,12 @@ CUSTOM_MATRIX = yes
|
|||||||
|
|
||||||
avrdude: build
|
avrdude: build
|
||||||
ls /dev/tty* > /tmp/1; \
|
ls /dev/tty* > /tmp/1; \
|
||||||
echo "Reset your Pro Micro then hit any key to continue..."; \
|
echo "Reset your Pro Micro now"; \
|
||||||
read -n 1 -s; \
|
while [[ -z $$USB ]]; do \
|
||||||
ls /dev/tty* > /tmp/2; \
|
sleep 1; \
|
||||||
USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \
|
ls /dev/tty* > /tmp/2; \
|
||||||
|
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
|
||||||
|
done; \
|
||||||
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
|
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
|
||||||
|
|
||||||
.PHONY: avrdude
|
.PHONY: avrdude
|
||||||
@@ -21,7 +21,8 @@ static void setup_handedness(void) {
|
|||||||
#ifdef EE_HANDS
|
#ifdef EE_HANDS
|
||||||
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||||
#else
|
#else
|
||||||
#ifdef I2C_MASTER_RIGHT
|
// I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c
|
||||||
|
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
||||||
isLeftHand = !has_usb();
|
isLeftHand = !has_usb();
|
||||||
#else
|
#else
|
||||||
isLeftHand = has_usb();
|
isLeftHand = has_usb();
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
# Please remove if no longer applicable
|
|
||||||
$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD)
|
|
||||||
$(warning Please disable some options in the Makefile to resolve)
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
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
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
MIDI_ENABLE = no # MIDI controls
|
MIDI_ENABLE = no # MIDI controls
|
||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -7,11 +7,12 @@
|
|||||||
// for intellisense, has to be commented for building
|
// for intellisense, has to be commented for building
|
||||||
/*
|
/*
|
||||||
#include "..\..\..\..\quantum\keymap_extras\keymap_german.h"
|
#include "..\..\..\..\quantum\keymap_extras\keymap_german.h"
|
||||||
#include "..\..\..\..\quantum\keymap_common.h"
|
|
||||||
#include "..\..\..\..\tmk_core\common\keycode.h"
|
#include "..\..\..\..\tmk_core\common\keycode.h"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
|
/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
|
||||||
It has "üäöß" as it is optimized for a mix of German & English.
|
It has "üäöß" as it is optimized for a mix of German & English.
|
||||||
@@ -23,11 +24,11 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Bone2
|
/* Bone2 (adapted)
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Q | J | D | U | A | X | P | H | L | M | W | ẞ |
|
* | ß | J | D | U | A | X | P | H | L | M | W | Q |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter
|
* | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Enter
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift |
|
* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -35,20 +36,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[0] = {
|
[0] = {
|
||||||
{ DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS },
|
{ DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q },
|
||||||
{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
|
//{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
|
||||||
|
{ MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
|
||||||
{ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
|
{ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
|
||||||
{ KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
|
{ KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
|
||||||
},
|
},
|
||||||
|
|
||||||
/* M1 Special Characters
|
/* M1 Special Characters
|
||||||
very ergonomic placement for coding
|
* very ergonomic placement for coding
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ |
|
* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter
|
* | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Enter
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift |
|
* | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
|
* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
@@ -56,56 +58,55 @@ very ergonomic placement for coding
|
|||||||
[1] = {
|
[1] = {
|
||||||
{ DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT },
|
{ DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT },
|
||||||
{ _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ },
|
{ _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ },
|
||||||
{ _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
|
{ _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
|
||||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Navigation & Number Blocks
|
/* M2 Navigation & Number Blocks
|
||||||
very easy to get used to & intuituve placement
|
* very easy to get used to & intuituve placement
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins |
|
* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter|
|
* | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift |
|
* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
|
* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[2] = {
|
[2] = {
|
||||||
{ KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_INS },
|
{ XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS },
|
||||||
{ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_ENT },
|
{ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT },
|
||||||
{ _______, KC_NO, KC_TAB, KC_NO, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ },
|
{ _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ },
|
||||||
{ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
|
{ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Flipped Navigation & Number Blocks for one handed use
|
/* M3 Switched Navigation & Number Blocks for one handed use
|
||||||
accessed by sliding from M2 to M3 with thumb
|
* accessed by sliding from M2 to M3 with thumb
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
|
* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter|
|
* | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift |
|
* | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl |
|
* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[3] = {
|
[3] = {
|
||||||
{ KC_INS, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO },
|
{ KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX },
|
||||||
{ _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
|
{ _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
|
||||||
{ _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ },
|
{ _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ },
|
||||||
{ _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ }
|
{ _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/* Function & Media Keys
|
/* M4 Function & Media Keys
|
||||||
slide from m4 to m5 to access flipped version
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | |
|
* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | |
|
* | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift |
|
* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -113,18 +114,19 @@ slide from m4 to m5 to access flipped version
|
|||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[4] = {
|
[4] = {
|
||||||
{ KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO },
|
{ XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX },
|
||||||
{ KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO },
|
{ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT },
|
||||||
{ _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
|
{ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
|
||||||
{ _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
|
{ _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/* flipped Function & Media Keys
|
/* M5 Switched Function & Media Keys|
|
||||||
|
* accessed by sliding from M4 to M5 with thumb
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | |
|
* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | |
|
* | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift |
|
* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -132,13 +134,14 @@ slide from m4 to m5 to access flipped version
|
|||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[5] = {
|
[5] = {
|
||||||
{ KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO },
|
{ XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX },
|
||||||
{ KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO },
|
{ _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ },
|
||||||
{ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ },
|
{ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ },
|
||||||
{ _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ }
|
{ _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,96 @@
|
|||||||
check keymap.c to the layers
|
Bone2Planck
|
||||||
|
=====================================
|
||||||
|
|
||||||
This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
|
This layout tries to emulate the Bone2 variant of Neo2, and is intended to be used with a German QWERTZ softwarelayout.
|
||||||
It has "üäöß" as it is optimized for a mix of German & English.
|
It has "üäöß" as it is optimized for a mix of German & English.
|
||||||
My favourite features are the placement of the special characters often used for programming right on the home row
|
The special character layer and the navigation & number block layer are inspired by the Neo2 layers,
|
||||||
and the number & navigation block combo, so you never have to move your hands from their home position.
|
designed to keep the fingers near the home row.
|
||||||
|
|
||||||
Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
|
Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
|
||||||
|
|
||||||
|
To build, run "make" from within the \bone2planck folder.
|
||||||
|
|
||||||
|
## Bone2 (adapted) Base Layer
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| ß | J | D | U | A | X | P | H | L | M | W | Q |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold: M1, tap: Enter
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## M1 Special Characters
|
||||||
|
very ergonomic placement for coding
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold: M1, tap: Enter
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## M2 Navigation & Number Blocks
|
||||||
|
very easy to get used to & intuituve placement
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter|
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## M4 Function & Media Keys
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter|
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
##Switched layers for one handed access:
|
||||||
|
|
||||||
|
### M3 Switched Navigation & Number Blocks
|
||||||
|
accessed by sliding from M2 to M3 with thumb
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter|
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
### M5 Switched Function & Media Keys
|
||||||
|
accessed by sliding from M4 to M5 with thumb
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter|
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,355 @@
|
|||||||
|
/*
|
||||||
|
* A keyboard layout for the gridded planck.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2017 Luke Silva
|
||||||
|
*
|
||||||
|
* 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, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*
|
||||||
|
* This layout uses colemak by default, and is designed for programming, with easy access to symbols
|
||||||
|
* through either double purpose modifiers or colemak style rolling for commonly used symbol clusters
|
||||||
|
* Eg: compare colemak 'this' to '(){\n}' on the symbol layer.
|
||||||
|
*
|
||||||
|
* The layout also supports a range of multilingual characters, covering those
|
||||||
|
* needed for French, German, Swedish and likely some other European Languages.
|
||||||
|
* In the future full support for Colemak's multilingual deadkeys may be introduced.
|
||||||
|
*
|
||||||
|
* The multilingual characters are inputted through QMK's unicode engine, using
|
||||||
|
* the Linux input method by default, however this can be changed at runtime.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "planck.h"
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
|
||||||
|
// Layers
|
||||||
|
#define _COLEMAK 0
|
||||||
|
#define _QWERTY 1
|
||||||
|
#define _SYM 2
|
||||||
|
#define _NUM 3
|
||||||
|
#define _GR 4
|
||||||
|
#define _GR_S 5
|
||||||
|
#define _ADJ 6
|
||||||
|
#define _NAV 7
|
||||||
|
#define _PLOVER 8
|
||||||
|
|
||||||
|
// Macro ID numbers
|
||||||
|
#define M_ALT_HASH 1
|
||||||
|
#define M_GR_DASH 2
|
||||||
|
#define M_SYM_LPRN 3
|
||||||
|
#define M_NAV_UNDS 4
|
||||||
|
#define M_NUM_RPRN 5
|
||||||
|
#define M_CTRL_DLR 6
|
||||||
|
#define M_LCBR_ENT 7
|
||||||
|
#define M_PLOVER 8
|
||||||
|
#define M_EXT_PLV 9
|
||||||
|
#define M_WINDOWS 10
|
||||||
|
#define M_LINUX 11
|
||||||
|
#define M_OSX 12
|
||||||
|
#define M_FUNCTION 13
|
||||||
|
#define M_THEN 14
|
||||||
|
#define M_CATCH 15
|
||||||
|
|
||||||
|
// Macro keys
|
||||||
|
#define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt
|
||||||
|
#define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name
|
||||||
|
#define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if()
|
||||||
|
#define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable
|
||||||
|
#define NUM_RPRN MACROTAP(M_NUM_RPRN) // tap for ), hold for numbers layer else if()
|
||||||
|
#define CTRL_DLR MACROTAP(M_CTRL_DLR) // tap for $, hold for ctrl $php_is_really_weird
|
||||||
|
#define LCBR_ENT M(M_LCBR_ENT) // {\n easier code formatting
|
||||||
|
#define PLOVER M(M_PLOVER) // PHROPB (plover) or ERFVIK(qwerty) starts plover
|
||||||
|
#define EXT_PLV M(M_EXT_PLV) // PHRO*F (plover) or ERFVYU(qwerty) stops plover
|
||||||
|
#define WINDOWS M(M_WINDOWS) // Sets Unicode handler to windows
|
||||||
|
#define LINUX M(M_LINUX) // Sets Unicode handler to linux
|
||||||
|
#define OSX M(M_OSX) // Sets Unicode handler to OSX
|
||||||
|
#define FUNCTION M(M_FUNCTION)
|
||||||
|
#define THEN M(M_THEN)
|
||||||
|
#define CATCH M(M_CATCH)
|
||||||
|
|
||||||
|
|
||||||
|
// Renames of QMK keys... (would have otherwise been a macro)
|
||||||
|
#define QWERTY DF(_QWERTY)
|
||||||
|
#define COLEMAK DF(_COLEMAK)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ;: | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Bksp | A | R | S | T | D | H | N | E | I | O | '" |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------`---.
|
||||||
|
* |Shift=| Z | X | C | V | B | K | M | ,< | .> | /? |Shift/Ent |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+----------|
|
||||||
|
* |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle|
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_COLEMAK] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
|
||||||
|
{CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Bksp | A | S | D | F | G | H | J | K | L | ;: | '" |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------`---.
|
||||||
|
* |Shift=| Z | X | C | V | B | N | M | ,< | .> | /? |Shift/Ent |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+----------|
|
||||||
|
* |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle|
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QWERTY] = {
|
||||||
|
{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_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
|
||||||
|
{CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/* Symbols
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | ` | @ | / | * | ^ | % | : | + | - | Del | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | [ | ; | } | ( | " | ' | ) | {\n | ! | ] | \ |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |Shift | . | { | < | > | ~ | X2 | = | & | | | ? |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | Sym | _ |Space | NUM | X2 | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_SYM] = {
|
||||||
|
{KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC},
|
||||||
|
{FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS},
|
||||||
|
{KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT },
|
||||||
|
{THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/* Numbers
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Bksp | x | D | E | F | + | - | 4 | 5 | 6 | 0 |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |Shift | ( | A | B | C | * | / | 1 | 2 | 3 | ) |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | GR | SYM | _ |Space | NUM | 0 | . | f | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_NUM] = {
|
||||||
|
{KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT },
|
||||||
|
{KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT },
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/* Gr layer / international keys
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | ä | å | | ¢£ | €¥ | | ë | ê | ü | ù | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | â | à | ß | | | | è | é | ï | ö | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | æ | ô | ç | œ | | | û | « | » | î | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_GR] = {
|
||||||
|
{_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______},
|
||||||
|
{_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______},
|
||||||
|
{MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Shifted layer of the above
|
||||||
|
[_GR_S] = {
|
||||||
|
{_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______},
|
||||||
|
{_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______},
|
||||||
|
{MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/* Adjust Layer (Gr + Num)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+-------------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | |Prntscr| ESC |VOLUP | PLAY | PREV |QWERTY|COLEMAK|PLOVER| | |
|
||||||
|
* |------+-------------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | |BACKLIT| INS |VOLDWN| MUTE | NEXT | WIND |LINUX | OSX | | |
|
||||||
|
* |------+-------------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_ADJ] = {
|
||||||
|
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
|
||||||
|
{XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX},
|
||||||
|
{XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/* Navigation
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | BTN3 | BTN2 | BTN1 | | ACL0 | HOME | PGDN | PGUP | END | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | |MSLEFT| MSDN | MSUP |MSRGHT| | ACL1 | LEFT | DOWN | UP | RGHT |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | |WHLEFT| WHDN | WHUP |WHRGHT| | ACL2 |C-LEFT|C-PGDN|C-PGUP|C-RGHT|Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_NAV] = {
|
||||||
|
{XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC},
|
||||||
|
{XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT },
|
||||||
|
{XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT },
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Plover Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Exit | | | # | A | O | E | U | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_PLOVER] = {
|
||||||
|
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||||
|
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||||
|
{EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(){
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case M_ALT_HASH:
|
||||||
|
return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 3, LALT);
|
||||||
|
case M_GR_DASH:
|
||||||
|
{
|
||||||
|
const macro_t* macro = MACRO_TAP_HOLD_LAYER(record, MACRO(T(MINS)), _GR);
|
||||||
|
update_tri_layer(_NUM, _GR, _ADJ);
|
||||||
|
return macro;
|
||||||
|
}
|
||||||
|
case M_SYM_LPRN:
|
||||||
|
return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 9, _SYM);
|
||||||
|
case M_NAV_UNDS:
|
||||||
|
return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, MINS, _NAV);
|
||||||
|
case M_NUM_RPRN:
|
||||||
|
{
|
||||||
|
const macro_t* macro = MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 0, _NUM);
|
||||||
|
update_tri_layer(_NUM, _GR, _ADJ);
|
||||||
|
return macro;
|
||||||
|
}
|
||||||
|
case M_CTRL_DLR:
|
||||||
|
return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 4, LCTL);
|
||||||
|
case M_LCBR_ENT:
|
||||||
|
return MACRODOWN(I(10), D(LSFT), T(LBRC), U(LSFT), T(ENT), END);
|
||||||
|
case M_PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_and(0);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
default_layer_set(_PLOVER);
|
||||||
|
|
||||||
|
// Starts plover
|
||||||
|
return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case M_EXT_PLV:
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
default_layer_set(_COLEMAK);
|
||||||
|
|
||||||
|
//Pauses plover
|
||||||
|
return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case M_WINDOWS:
|
||||||
|
set_unicode_input_mode(UC_WIN);
|
||||||
|
break;
|
||||||
|
case M_LINUX:
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
break;
|
||||||
|
case M_OSX:
|
||||||
|
set_unicode_input_mode(UC_OSX);
|
||||||
|
break;
|
||||||
|
case M_FUNCTION:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("function");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case M_THEN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("then");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case M_CATCH:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("catch");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# A more basic Planck Layout for copying
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
|
|||||||
* [Bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard.
|
* [Bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard.
|
||||||
* [Ergodox Infinity](/keyboards/ergodox) - Ergonomic Split Keyboard by Input Club.
|
* [Ergodox Infinity](/keyboards/ergodox) - Ergonomic Split Keyboard by Input Club.
|
||||||
* [GH60](/keyboards/gh60) — A 60% Geekhack community-driven project.
|
* [GH60](/keyboards/gh60) — A 60% Geekhack community-driven project.
|
||||||
|
* [GON NerD](/keyboards/gonnerd) — Korean custom 60% PCB
|
||||||
* [Happy Hacking Keyboard](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK.
|
* [Happy Hacking Keyboard](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK.
|
||||||
* [Infinity 60%](/keyboards/infinity60) - — Compact community keyboard by Input Club.
|
* [Infinity 60%](/keyboards/infinity60) - — Compact community keyboard by Input Club.
|
||||||
* [JD45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe.
|
* [JD45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe.
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
#define CONFIG_DEFINITIONS_H
|
#define CONFIG_DEFINITIONS_H
|
||||||
|
|
||||||
/* diode directions */
|
/* diode directions */
|
||||||
#define COL2ROW 0
|
#define COL2ROW 0
|
||||||
#define ROW2COL 1
|
#define ROW2COL 1
|
||||||
|
#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
|
||||||
|
|
||||||
/* I/O pins */
|
/* I/O pins */
|
||||||
#ifndef F0
|
#ifndef F0
|
||||||
#define B0 0x30
|
#define B0 0x30
|
||||||
|
|||||||
@@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key)
|
|||||||
action.code = keymap_function_id_to_action( (int)keycode & 0xFFF );
|
action.code = keymap_function_id_to_action( (int)keycode & 0xFFF );
|
||||||
break;
|
break;
|
||||||
case QK_MACRO ... QK_MACRO_MAX:
|
case QK_MACRO ... QK_MACRO_MAX:
|
||||||
action.code = ACTION_MACRO(keycode & 0xFF);
|
if (keycode & 0x800) // tap macros have upper bit set
|
||||||
|
action.code = ACTION_MACRO_TAP(keycode & 0xFF);
|
||||||
|
else
|
||||||
|
action.code = ACTION_MACRO(keycode & 0xFF);
|
||||||
break;
|
break;
|
||||||
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
||||||
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
|
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
|
||||||
@@ -117,7 +120,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
|
|||||||
action.code = ACTION_MODS_ONESHOT(mod);
|
action.code = ACTION_MODS_ONESHOT(mod);
|
||||||
break;
|
break;
|
||||||
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
|
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
|
||||||
action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
|
action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF);
|
||||||
break;
|
break;
|
||||||
#ifdef BACKLIGHT_ENABLE
|
#ifdef BACKLIGHT_ENABLE
|
||||||
case BL_0 ... BL_15:
|
case BL_0 ... BL_15:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ void I2C_WriteBit(unsigned char c)
|
|||||||
|
|
||||||
// Inits bitbanging port, must be called before using the functions below
|
// Inits bitbanging port, must be called before using the functions below
|
||||||
//
|
//
|
||||||
void I2C_Init()
|
void I2C_Init(void)
|
||||||
{
|
{
|
||||||
I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
|
I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ void I2C_Init()
|
|||||||
|
|
||||||
// Send a START Condition
|
// Send a START Condition
|
||||||
//
|
//
|
||||||
void I2C_Start()
|
void I2C_Start(void)
|
||||||
{
|
{
|
||||||
// set both to high at the same time
|
// set both to high at the same time
|
||||||
I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
|
I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
|
||||||
@@ -97,7 +97,7 @@ void I2C_Start()
|
|||||||
|
|
||||||
// Send a STOP Condition
|
// Send a STOP Condition
|
||||||
//
|
//
|
||||||
void I2C_Stop()
|
void I2C_Stop(void)
|
||||||
{
|
{
|
||||||
I2C_CLOCK_HI();
|
I2C_CLOCK_HI();
|
||||||
_delay_us(I2C_DELAY);
|
_delay_us(I2C_DELAY);
|
||||||
|
|||||||
+7
-7
@@ -60,13 +60,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
extern const matrix_row_t matrix_mask[];
|
extern const matrix_row_t matrix_mask[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
|
||||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* matrix state(1:on, 0:off) */
|
/* matrix state(1:on, 0:off) */
|
||||||
static matrix_row_t matrix[MATRIX_ROWS];
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
|
||||||
static matrix_row_t matrix_raw[MATRIX_ROWS];
|
|
||||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
|
||||||
@@ -76,7 +77,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
|||||||
static void unselect_rows(void);
|
static void unselect_rows(void);
|
||||||
static void select_row(uint8_t row);
|
static void select_row(uint8_t row);
|
||||||
static void unselect_row(uint8_t row);
|
static void unselect_row(uint8_t row);
|
||||||
#else // ROW2COL
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
static void init_rows(void);
|
static void init_rows(void);
|
||||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||||
static void unselect_cols(void);
|
static void unselect_cols(void);
|
||||||
@@ -133,7 +134,7 @@ uint8_t matrix_cols(void) {
|
|||||||
// /* PORTxn */
|
// /* PORTxn */
|
||||||
// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF);
|
// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF);
|
||||||
// }
|
// }
|
||||||
// #else
|
// #elif (DIODE_DIRECTION == ROW2COL)
|
||||||
// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
|
// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
|
||||||
// /* DDRxn */
|
// /* DDRxn */
|
||||||
// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF);
|
// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF);
|
||||||
@@ -158,7 +159,7 @@ void matrix_init(void) {
|
|||||||
#if (DIODE_DIRECTION == COL2ROW)
|
#if (DIODE_DIRECTION == COL2ROW)
|
||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
#else // ROW2COL
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
unselect_cols();
|
unselect_cols();
|
||||||
init_rows();
|
init_rows();
|
||||||
#endif
|
#endif
|
||||||
@@ -166,7 +167,6 @@ void matrix_init(void) {
|
|||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
matrix[i] = 0;
|
matrix[i] = 0;
|
||||||
matrix_raw[i] = 0;
|
|
||||||
matrix_debouncing[i] = 0;
|
matrix_debouncing[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ uint8_t matrix_scan(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // ROW2COL
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
// Set col, read rows
|
// Set col, read rows
|
||||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||||
@@ -336,7 +336,7 @@ static void unselect_rows(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // ROW2COL
|
#elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
static void init_rows(void)
|
static void init_rows(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ void unicode_map_input_error() {}
|
|||||||
bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
|
bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
|
||||||
if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
|
if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
|
||||||
const uint32_t* map = unicode_map;
|
const uint32_t* map = unicode_map;
|
||||||
uint16_t index = keycode & 0x7FF;
|
uint16_t index = keycode - QK_UNICODE_MAP;
|
||||||
uint32_t code = pgm_read_dword_far(&map[index]);
|
uint32_t code = pgm_read_dword_far(&map[index]);
|
||||||
if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) {
|
if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) {
|
||||||
// Convert to UTF-16 surrogate pair
|
// Convert to UTF-16 surrogate pair
|
||||||
|
|||||||
+61
-31
@@ -594,34 +594,45 @@ static const uint8_t backlight_pin = BACKLIGHT_PIN;
|
|||||||
# define COM1x1 COM1A1
|
# define COM1x1 COM1A1
|
||||||
# define OCR1x OCR1A
|
# define OCR1x OCR1A
|
||||||
#else
|
#else
|
||||||
# error "Backlight pin not supported - use B5, B6, or B7"
|
# define NO_BACKLIGHT_CLOCK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BACKLIGHT_ON_STATE
|
||||||
|
#define BACKLIGHT_ON_STATE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
void backlight_init_ports(void)
|
void backlight_init_ports(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Setup backlight pin as output and output low.
|
// Setup backlight pin as output and output to on state.
|
||||||
// DDRx |= n
|
// DDRx |= n
|
||||||
_SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF);
|
_SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF);
|
||||||
// PORTx &= ~n
|
#if BACKLIGHT_ON_STATE == 0
|
||||||
_SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
|
// PORTx &= ~n
|
||||||
|
_SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
|
||||||
|
#else
|
||||||
|
// PORTx |= n
|
||||||
|
_SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Use full 16-bit resolution.
|
#ifndef NO_BACKLIGHT_CLOCK
|
||||||
ICR1 = 0xFFFF;
|
// Use full 16-bit resolution.
|
||||||
|
ICR1 = 0xFFFF;
|
||||||
|
|
||||||
// I could write a wall of text here to explain... but TL;DW
|
// I could write a wall of text here to explain... but TL;DW
|
||||||
// Go read the ATmega32u4 datasheet.
|
// Go read the ATmega32u4 datasheet.
|
||||||
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
|
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
|
||||||
|
|
||||||
// Pin PB7 = OCR1C (Timer 1, Channel C)
|
// Pin PB7 = OCR1C (Timer 1, Channel C)
|
||||||
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
|
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
|
||||||
// (i.e. start high, go low when counter matches.)
|
// (i.e. start high, go low when counter matches.)
|
||||||
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
|
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
|
||||||
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
|
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
|
||||||
|
|
||||||
TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010;
|
TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010;
|
||||||
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||||
|
#endif
|
||||||
|
|
||||||
backlight_init();
|
backlight_init();
|
||||||
#ifdef BACKLIGHT_BREATHING
|
#ifdef BACKLIGHT_BREATHING
|
||||||
@@ -633,24 +644,43 @@ __attribute__ ((weak))
|
|||||||
void backlight_set(uint8_t level)
|
void backlight_set(uint8_t level)
|
||||||
{
|
{
|
||||||
// Prevent backlight blink on lowest level
|
// Prevent backlight blink on lowest level
|
||||||
// PORTx &= ~n
|
#if BACKLIGHT_ON_STATE == 0
|
||||||
_SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
|
// PORTx &= ~n
|
||||||
|
_SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
|
||||||
|
#else
|
||||||
|
// PORTx |= n
|
||||||
|
_SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( level == 0 ) {
|
if ( level == 0 ) {
|
||||||
// Turn off PWM control on backlight pin, revert to output low.
|
#ifndef NO_BACKLIGHT_CLOCK
|
||||||
TCCR1A &= ~(_BV(COM1x1));
|
// Turn off PWM control on backlight pin, revert to output low.
|
||||||
OCR1x = 0x0;
|
TCCR1A &= ~(_BV(COM1x1));
|
||||||
} else if ( level == BACKLIGHT_LEVELS ) {
|
OCR1x = 0x0;
|
||||||
// Turn on PWM control of backlight pin
|
#else
|
||||||
TCCR1A |= _BV(COM1x1);
|
#if BACKLIGHT_ON_STATE == 0
|
||||||
// Set the brightness
|
// PORTx |= n
|
||||||
OCR1x = 0xFFFF;
|
_SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
|
||||||
} else {
|
#else
|
||||||
// Turn on PWM control of backlight pin
|
// PORTx &= ~n
|
||||||
TCCR1A |= _BV(COM1x1);
|
_SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
|
||||||
// Set the brightness
|
#endif
|
||||||
OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifndef NO_BACKLIGHT_CLOCK
|
||||||
|
else if ( level == BACKLIGHT_LEVELS ) {
|
||||||
|
// Turn on PWM control of backlight pin
|
||||||
|
TCCR1A |= _BV(COM1x1);
|
||||||
|
// Set the brightness
|
||||||
|
OCR1x = 0xFFFF;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Turn on PWM control of backlight pin
|
||||||
|
TCCR1A |= _BV(COM1x1);
|
||||||
|
// Set the brightness
|
||||||
|
OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BACKLIGHT_BREATHING
|
#ifdef BACKLIGHT_BREATHING
|
||||||
breathing_intensity_default();
|
breathing_intensity_default();
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ enum quantum_keycodes {
|
|||||||
QK_CHORDING = 0x5600,
|
QK_CHORDING = 0x5600,
|
||||||
QK_CHORDING_MAX = 0x56FF,
|
QK_CHORDING_MAX = 0x56FF,
|
||||||
#endif
|
#endif
|
||||||
QK_MOD_TAP = 0x6000,
|
QK_TAP_DANCE = 0x5700,
|
||||||
QK_MOD_TAP_MAX = 0x6FFF,
|
QK_TAP_DANCE_MAX = 0x57FF,
|
||||||
QK_TAP_DANCE = 0x7100,
|
|
||||||
QK_TAP_DANCE_MAX = 0x71FF,
|
|
||||||
#ifdef UNICODEMAP_ENABLE
|
#ifdef UNICODEMAP_ENABLE
|
||||||
QK_UNICODE_MAP = 0x7800,
|
QK_UNICODE_MAP = 0x5800,
|
||||||
QK_UNICODE_MAP_MAX = 0x7FFF,
|
QK_UNICODE_MAP_MAX = 0x5BFF,
|
||||||
#endif
|
#endif
|
||||||
|
QK_MOD_TAP = 0x6000,
|
||||||
|
QK_MOD_TAP_MAX = 0x7FFF,
|
||||||
#ifdef UNICODE_ENABLE
|
#ifdef UNICODE_ENABLE
|
||||||
QK_UNICODE = 0x8000,
|
QK_UNICODE = 0x8000,
|
||||||
QK_UNICODE_MAX = 0xFFFF,
|
QK_UNICODE_MAX = 0xFFFF,
|
||||||
@@ -54,7 +54,7 @@ enum quantum_keycodes {
|
|||||||
|
|
||||||
// Loose keycodes - to be used directly
|
// Loose keycodes - to be used directly
|
||||||
|
|
||||||
RESET = 0x7000,
|
RESET = 0x5C00,
|
||||||
DEBUG,
|
DEBUG,
|
||||||
MAGIC_SWAP_CONTROL_CAPSLOCK,
|
MAGIC_SWAP_CONTROL_CAPSLOCK,
|
||||||
MAGIC_CAPSLOCK_TO_CONTROL,
|
MAGIC_CAPSLOCK_TO_CONTROL,
|
||||||
@@ -256,8 +256,10 @@ enum quantum_keycodes {
|
|||||||
|
|
||||||
#define M(kc) (kc | QK_MACRO)
|
#define M(kc) (kc | QK_MACRO)
|
||||||
|
|
||||||
|
#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8)
|
||||||
#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
|
#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
|
||||||
|
|
||||||
|
|
||||||
// L-ayer, T-ap - 256 keycode max, 16 layer max
|
// L-ayer, T-ap - 256 keycode max, 16 layer max
|
||||||
#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8))
|
#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8))
|
||||||
|
|
||||||
@@ -296,15 +298,29 @@ enum quantum_keycodes {
|
|||||||
#define OSM(mod) (mod | QK_ONE_SHOT_MOD)
|
#define OSM(mod) (mod | QK_ONE_SHOT_MOD)
|
||||||
|
|
||||||
// M-od, T-ap - 256 keycode max
|
// M-od, T-ap - 256 keycode max
|
||||||
#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8))
|
#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0x1F) << 8))
|
||||||
|
|
||||||
#define CTL_T(kc) MT(MOD_LCTL, kc)
|
#define CTL_T(kc) MT(MOD_LCTL, kc)
|
||||||
|
#define LCTL_T(kc) MT(MOD_LCTL, kc)
|
||||||
|
#define RCTL_T(kc) MT(MOD_RCTL, kc)
|
||||||
|
|
||||||
#define SFT_T(kc) MT(MOD_LSFT, kc)
|
#define SFT_T(kc) MT(MOD_LSFT, kc)
|
||||||
|
#define LSFT_T(kc) MT(MOD_LSFT, kc)
|
||||||
|
#define RSFT_T(kc) MT(MOD_RSFT, kc)
|
||||||
|
|
||||||
#define ALT_T(kc) MT(MOD_LALT, kc)
|
#define ALT_T(kc) MT(MOD_LALT, kc)
|
||||||
|
#define LALT_T(kc) MT(MOD_LALT, kc)
|
||||||
|
#define RALT_T(kc) MT(MOD_RALT, kc)
|
||||||
#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR
|
#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR
|
||||||
|
|
||||||
#define GUI_T(kc) MT(MOD_LGUI, kc)
|
#define GUI_T(kc) MT(MOD_LGUI, kc)
|
||||||
|
#define LGUI_T(kc) MT(MOD_LGUI, kc)
|
||||||
|
#define RGUI_T(kc) MT(MOD_RGUI, kc)
|
||||||
|
|
||||||
#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal
|
#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal
|
||||||
#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
|
#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
|
||||||
#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui
|
#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui
|
||||||
|
#define RCAG_T(kc) MT((MOD_RCTL | MOD_RALT | MOD_RGUI), kc) // Right control alt and gui
|
||||||
#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
|
#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
|
||||||
#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
|
#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
|
||||||
#define SWIN_T(kc) SCMD_T(kc)
|
#define SWIN_T(kc) SCMD_T(kc)
|
||||||
|
|||||||
+31
-4
@@ -66,6 +66,8 @@ __attribute__ ((weak))
|
|||||||
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20};
|
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||||
|
__attribute__ ((weak))
|
||||||
|
const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
|
||||||
|
|
||||||
rgblight_config_t rgblight_config;
|
rgblight_config_t rgblight_config;
|
||||||
rgblight_config_t inmem_config;
|
rgblight_config_t inmem_config;
|
||||||
@@ -219,6 +221,14 @@ void rgblight_step(void) {
|
|||||||
}
|
}
|
||||||
rgblight_mode(mode);
|
rgblight_mode(mode);
|
||||||
}
|
}
|
||||||
|
void rgblight_step_reverse(void) {
|
||||||
|
uint8_t mode = 0;
|
||||||
|
mode = rgblight_config.mode - 1;
|
||||||
|
if (mode < 1) {
|
||||||
|
mode = RGBLIGHT_MODES;
|
||||||
|
}
|
||||||
|
rgblight_mode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
void rgblight_mode(uint8_t mode) {
|
void rgblight_mode(uint8_t mode) {
|
||||||
if (!rgblight_config.enable) {
|
if (!rgblight_config.enable) {
|
||||||
@@ -237,7 +247,7 @@ void rgblight_mode(uint8_t mode) {
|
|||||||
#ifdef RGBLIGHT_ANIMATIONS
|
#ifdef RGBLIGHT_ANIMATIONS
|
||||||
rgblight_timer_disable();
|
rgblight_timer_disable();
|
||||||
#endif
|
#endif
|
||||||
} else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) {
|
} else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) {
|
||||||
// MODE 2-5, breathing
|
// MODE 2-5, breathing
|
||||||
// MODE 6-8, rainbow mood
|
// MODE 6-8, rainbow mood
|
||||||
// MODE 9-14, rainbow swirl
|
// MODE 9-14, rainbow swirl
|
||||||
@@ -247,6 +257,12 @@ void rgblight_mode(uint8_t mode) {
|
|||||||
#ifdef RGBLIGHT_ANIMATIONS
|
#ifdef RGBLIGHT_ANIMATIONS
|
||||||
rgblight_timer_enable();
|
rgblight_timer_enable();
|
||||||
#endif
|
#endif
|
||||||
|
} else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) {
|
||||||
|
// MODE 25-34, static gradient
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ANIMATIONS
|
||||||
|
rgblight_timer_disable();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
|
rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
|
||||||
}
|
}
|
||||||
@@ -350,6 +366,17 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
|
|||||||
} else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) {
|
} else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) {
|
||||||
// rainbow mood and rainbow swirl, ignore the change of hue
|
// rainbow mood and rainbow swirl, ignore the change of hue
|
||||||
hue = rgblight_config.hue;
|
hue = rgblight_config.hue;
|
||||||
|
} else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) {
|
||||||
|
// static gradient
|
||||||
|
uint16_t _hue;
|
||||||
|
int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1;
|
||||||
|
uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]);
|
||||||
|
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||||
|
_hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360;
|
||||||
|
dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range);
|
||||||
|
sethsv(_hue, sat, val, (LED_TYPE *)&led[i]);
|
||||||
|
}
|
||||||
|
rgblight_set();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rgblight_config.hue = hue;
|
rgblight_config.hue = hue;
|
||||||
@@ -450,7 +477,7 @@ void rgblight_task(void) {
|
|||||||
} else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) {
|
} else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) {
|
||||||
// mode = 21 to 23, knight mode
|
// mode = 21 to 23, knight mode
|
||||||
rgblight_effect_knight(rgblight_config.mode - 21);
|
rgblight_effect_knight(rgblight_config.mode - 21);
|
||||||
} else {
|
} else if (rgblight_config.mode == 24) {
|
||||||
// mode = 24, christmas mode
|
// mode = 24, christmas mode
|
||||||
rgblight_effect_christmas();
|
rgblight_effect_christmas();
|
||||||
}
|
}
|
||||||
@@ -604,13 +631,13 @@ void rgblight_effect_christmas(void) {
|
|||||||
static uint16_t last_timer = 0;
|
static uint16_t last_timer = 0;
|
||||||
uint16_t hue;
|
uint16_t hue;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
if (timer_elapsed(last_timer) < 1000) {
|
if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
last_timer = timer_read();
|
last_timer = timer_read();
|
||||||
current_offset = (current_offset + 1) % 2;
|
current_offset = (current_offset + 1) % 2;
|
||||||
for (i = 0; i < RGBLED_NUM; i++) {
|
for (i = 0; i < RGBLED_NUM; i++) {
|
||||||
hue = 0 + ((RGBLED_NUM * (i + current_offset)) % 2) * 80;
|
hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120;
|
||||||
sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
|
|||||||
+10
-1
@@ -2,7 +2,7 @@
|
|||||||
#define RGBLIGHT_H
|
#define RGBLIGHT_H
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ANIMATIONS
|
#ifdef RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLIGHT_MODES 24
|
#define RGBLIGHT_MODES 34
|
||||||
#else
|
#else
|
||||||
#define RGBLIGHT_MODES 1
|
#define RGBLIGHT_MODES 1
|
||||||
#endif
|
#endif
|
||||||
@@ -22,6 +22,14 @@
|
|||||||
#define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4
|
#define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
|
||||||
|
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
|
||||||
|
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef RGBLIGHT_HUE_STEP
|
#ifndef RGBLIGHT_HUE_STEP
|
||||||
#define RGBLIGHT_HUE_STEP 10
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
#endif
|
#endif
|
||||||
@@ -65,6 +73,7 @@ void rgblight_decrease(void);
|
|||||||
void rgblight_toggle(void);
|
void rgblight_toggle(void);
|
||||||
void rgblight_enable(void);
|
void rgblight_enable(void);
|
||||||
void rgblight_step(void);
|
void rgblight_step(void);
|
||||||
|
void rgblight_step_reverse(void);
|
||||||
void rgblight_mode(uint8_t mode);
|
void rgblight_mode(uint8_t mode);
|
||||||
void rgblight_set(void);
|
void rgblight_set(void);
|
||||||
void rgblight_update_dword(uint32_t dword);
|
void rgblight_update_dword(uint32_t dword);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F1, F0, B0 }
|
#define MATRIX_COL_PINS { F1, F0, B0 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
// #define BACKLIGHT_PIN B7
|
||||||
|
|||||||
@@ -47,10 +47,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* 0100|10| usage(10) (reserved)
|
* 0100|10| usage(10) (reserved)
|
||||||
* 0100|11| usage(10) (reserved)
|
* 0100|11| usage(10) (reserved)
|
||||||
*
|
*
|
||||||
* ACT_MOUSEKEY(0110): TODO: Not needed?
|
*
|
||||||
|
* ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space?
|
||||||
* 0101|xxxx| keycode Mouse key
|
* 0101|xxxx| keycode Mouse key
|
||||||
*
|
*
|
||||||
* 011x|xxxx xxxx xxxx (reseved)
|
* ACT_SWAP_HANDS(0110):
|
||||||
|
* 0110|xxxx| keycode Swap hands (keycode on tap, or options)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* 0111|xxxx xxxx xxxx (reserved)
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Layer Actions(10xx)
|
* Layer Actions(10xx)
|
||||||
@@ -67,7 +72,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* ee: on event(01:press, 10:release, 11:both)
|
* ee: on event(01:press, 10:release, 11:both)
|
||||||
*
|
*
|
||||||
* 1001|xxxx|xxxx xxxx (reserved)
|
* 1001|xxxx|xxxx xxxx (reserved)
|
||||||
* 1001|oopp|BBBB BBBB 8-bit Bitwise Operation???
|
|
||||||
*
|
*
|
||||||
* ACT_LAYER_TAP(101x):
|
* ACT_LAYER_TAP(101x):
|
||||||
* 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP]
|
* 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP]
|
||||||
|
|||||||
@@ -20,11 +20,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "progmem.h"
|
#include "progmem.h"
|
||||||
|
|
||||||
|
|
||||||
#define MACRO_NONE 0
|
|
||||||
|
typedef uint8_t macro_t;
|
||||||
|
|
||||||
|
#define MACRO_NONE (macro_t*)0
|
||||||
#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
|
#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
|
||||||
#define MACRO_GET(p) pgm_read_byte(p)
|
#define MACRO_GET(p) pgm_read_byte(p)
|
||||||
|
|
||||||
typedef uint8_t macro_t;
|
// Sends press when the macro key is pressed, release when release, or tap_macro when the key has been tapped
|
||||||
|
#define MACRO_TAP_HOLD(record, press, release, tap_macro) ( ((record)->event.pressed) ? \
|
||||||
|
( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? (press) : MACRO_NONE ) : \
|
||||||
|
( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (tap_macro) : (release) ) )
|
||||||
|
|
||||||
|
// Holds down the modifier mod when the macro key is held, or sends macro instead when tapped
|
||||||
|
#define MACRO_TAP_HOLD_MOD(record, macro, mod) MACRO_TAP_HOLD(record, (MACRO(D(mod), END)), MACRO(U(mod), END), macro)
|
||||||
|
|
||||||
|
// Holds down the modifier mod when the macro key is held, or pressed a shifted key when tapped (eg: shift+3 for #)
|
||||||
|
#define MACRO_TAP_SHFT_KEY_HOLD_MOD(record, key, mod) MACRO_TAP_HOLD_MOD(record, (MACRO(I(10), D(LSFT), T(key), U(LSFT), END)), mod)
|
||||||
|
|
||||||
|
|
||||||
|
// Momentary switch layer when held, sends macro if tapped
|
||||||
|
#define MACRO_TAP_HOLD_LAYER(record, macro, layer) ( ((record)->event.pressed) ? \
|
||||||
|
( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? ({layer_on((layer)); MACRO_NONE; }) : MACRO_NONE ) : \
|
||||||
|
( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : ({layer_off((layer)); MACRO_NONE; }) ) )
|
||||||
|
|
||||||
|
// Momentary switch layer when held, presses a shifted key when tapped (eg: shift+3 for #)
|
||||||
|
#define MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, key, layer) MACRO_TAP_HOLD_LAYER(record, MACRO(I(10), D(LSFT), T(key), U(LSFT), END), layer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_ACTION_MACRO
|
#ifndef NO_ACTION_MACRO
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ GNU General Public License for more details.
|
|||||||
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/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void matrix_init(void);
|
|||||||
uint8_t matrix_scan(void);
|
uint8_t matrix_scan(void);
|
||||||
/* whether modified from previous scan. used after matrix_scan. */
|
/* whether modified from previous scan. used after matrix_scan. */
|
||||||
bool matrix_is_modified(void) __attribute__ ((deprecated));
|
bool matrix_is_modified(void) __attribute__ ((deprecated));
|
||||||
/* whether a swtich is on */
|
/* whether a switch is on */
|
||||||
bool matrix_is_on(uint8_t row, uint8_t col);
|
bool matrix_is_on(uint8_t row, uint8_t col);
|
||||||
/* matrix state on row */
|
/* matrix state on row */
|
||||||
matrix_row_t matrix_get_row(uint8_t row);
|
matrix_row_t matrix_get_row(uint8_t row);
|
||||||
|
|||||||
@@ -134,13 +134,6 @@ typedef union {
|
|||||||
} nkro;
|
} nkro;
|
||||||
#endif
|
#endif
|
||||||
} __attribute__ ((packed)) report_keyboard_t;
|
} __attribute__ ((packed)) report_keyboard_t;
|
||||||
/*
|
|
||||||
typedef struct {
|
|
||||||
uint8_t mods;
|
|
||||||
uint8_t reserved;
|
|
||||||
uint8_t keys[REPORT_KEYS];
|
|
||||||
} __attribute__ ((packed)) report_keyboard_t;
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t buttons;
|
uint8_t buttons;
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = {
|
|||||||
0x95, 0x06, // Report Count (6),
|
0x95, 0x06, // Report Count (6),
|
||||||
0x75, 0x08, // Report Size (8),
|
0x75, 0x08, // Report Size (8),
|
||||||
0x15, 0x00, // Logical Minimum (0),
|
0x15, 0x00, // Logical Minimum (0),
|
||||||
0x25, 0xFF, 0x00, // Logical Maximum(255),
|
0x26, 0xFF, 0x00, // Logical Maximum(255),
|
||||||
0x05, 0x07, // Usage Page (Key Codes),
|
0x05, 0x07, // Usage Page (Key Codes),
|
||||||
0x19, 0x00, // Usage Minimum (0),
|
0x19, 0x00, // Usage Minimum (0),
|
||||||
0x29, 0xFF, // Usage Maximum (255),
|
0x29, 0xFF, // Usage Maximum (255),
|
||||||
@@ -350,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = {
|
|||||||
0xa1, 0x01, // COLLECTION (Application)
|
0xa1, 0x01, // COLLECTION (Application)
|
||||||
0x85, REPORT_ID_SYSTEM, // REPORT_ID (2)
|
0x85, REPORT_ID_SYSTEM, // REPORT_ID (2)
|
||||||
0x15, 0x01, // LOGICAL_MINIMUM (0x1)
|
0x15, 0x01, // LOGICAL_MINIMUM (0x1)
|
||||||
0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
|
0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
|
||||||
0x19, 0x01, // USAGE_MINIMUM (0x1)
|
0x19, 0x01, // USAGE_MINIMUM (0x1)
|
||||||
0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
|
0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
|
||||||
0x75, 0x10, // REPORT_SIZE (16)
|
0x75, 0x10, // REPORT_SIZE (16)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
|
|||||||
make all-keyboards AUTOGEN="true"
|
make all-keyboards AUTOGEN="true"
|
||||||
: $((exit_code = $exit_code + $?))
|
: $((exit_code = $exit_code + $?))
|
||||||
else
|
else
|
||||||
MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u)
|
MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)(?=\/)' | sort -u)
|
||||||
for KB in $MKB ; do
|
for KB in $MKB ; do
|
||||||
echo "Making all keymaps for $KB"
|
echo "Making all keymaps for $KB"
|
||||||
make "$KB" AUTOGEN=true
|
make "$KB" AUTOGEN=true
|
||||||
|
|||||||
Reference in new issue
Block a user