Merge remote-tracking branch 'jackhumbert/master'

This commit is contained in:
xyverz 2016-09-30 23:16:50 -07:00
commit e69e4c1ef2
91 changed files with 4249 additions and 1467 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@ CMakeLists.txt
.idea .idea
.browse.VC.db* .browse.VC.db*
*.stackdump *.stackdump
util/Win_Check_Output.txt

View File

@ -6,7 +6,8 @@ This project includes a Vagrantfile that will allow you to build a new firmware
Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion). Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. *COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest`
Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.

View File

@ -1,13 +1,120 @@
arrow_pad keyboard firmware arrow_pad keyboard firmware
====================== ======================
## Keyboard Info
The ArrowPad is a wired conversion that can be made to any stand-alone keypad. It uses two main layers - a standard numpad, and a more advanced arrow cluster navigator.
The first 24-key ArrowPad was handwired, but the PCB was wired as listed below.
```
<Chip Ref Des> pin <Pin #>
<Keycap Name> (Silkscreen Name if different) - <Switch Pin #>
Note:
U2 pin 2 is the Num Lock LED and is active low.
U2 pin 1
Clear (Num Lock) - 1
Enter - 2
Esc (ESC) - 2
U2 pin 3
- - 1
U2 pin 4
7 - 2
8 - 2
9 - 2
U2 pin 5
* - 2
Delete (BACK SPACE) - 2
U2 pin 6
1 - 2
0 - 2
. - 2
, - 2
U2 pin 7
4 - 2
5 - 2
6 - 2
U2 pin 8
Tab - 2
= (/) - 2
U2 pin 13
Delete (BACK SPACE) - 1
9 - 1
6 - 1
3 - 1
. - 1
U2 pin 14
Tab - 1
8 - 1
5 - 1
2 - 1
0 - 1
U2 pin 15
Esc (ESC) - 1
= (/) - 1
/ (*) - 1
7 - 1
4 - 1
1 - 1
+ - 1
U2 pin 16
Enter - 1
* (<--) - 1
, - 1
U2 pin 17
Fn (#NAME?) - 1
- - 2
Clear (Num Lock) - 2
U2 pin 18
Fn (#NAME?) - 2
* (<--) - 2
+ - 2
3 - 2
2 - 2
```
More info can be found on [GeekHack](https://geekhack.org/index.php?topic=73632.msg1802497#msg1802497)
The second ArrowPad was a conversion from a 21-key Genovation keypad. It used a 2 row x 11 column matrix.
```
#define KEYMAP( \
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
KM___7, KM___8, KM___9, ___PLS, \
KM___4, KM___5, KM___6, KM_PLS, \
KM___1, KM___2, KM___3, ___ENT, \
KM___0, _____0, KM_DOT, KM_ENT \
) { \
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
{ KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
}
```
## Quantum MK Firmware ## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme.md](/readme.md). For the full Quantum feature list, see [the parent readme.md](/readme.md).
## Building ## Building
Download or clone the whole firmware and navigate to the keyboards/arrow_pad 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. Download or clone the whole firmware and navigate to the keyboards/arrow_pad 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. Depending on which keymap you would like to use, you will have to compile slightly differently.
@ -20,7 +127,7 @@ Several version of keymap are available in advance but you are recommended to de
To build the firmware binary hex file with a keymap just do `make` with a keymap like this: To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
``` ```
$ make [default|jack|<name>] $ make [default|pad_21|pad_24|<name>]
``` ```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

View File

@ -1,7 +1,7 @@
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # 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 = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration 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 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 = yes # Enable keyboard backlight functionality

View File

@ -150,10 +150,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* disable debug print */ /* disable debug print */
//#define NO_DEBUG #ifndef NO_DEBUG
# define NO_DEBUG
#endif
/* disable print */ /* disable print */
//#define NO_PRINT // #ifndef NO_PRINT
// # define NO_PRINT
// #endif
/* Only print user print statements */
#define USER_PRINT
/* disable action features */ /* disable action features */
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER

View File

@ -2,48 +2,59 @@
#include "action_layer.h" #include "action_layer.h"
#include "eeconfig.h" #include "eeconfig.h"
#include "led.h" #include "led.h"
#include "mousekey.h"
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
#include "audio.h" #include "audio.h"
#include "song_list.h" #include "song_list.h"
#endif #endif
#define LAYER_QWERTY 0 enum keyboard_layers {
#define LAYER_COLEMAK 1 LAYER_QWERTY = 0,
#define LAYER_DVORAK 2 LAYER_UPPER,
#define LAYER_UPPER 3 LAYER_LOWER,
#define LAYER_LOWER 4 LAYER_FUNCTION,
#define LAYER_FUNCTION 5 LAYER_MOUSE,
#define LAYER_MOUSE 6 LAYER_ADJUST,
#define LAYER_ADJUST 7 };
enum keyboard_macros {
#define MACRO_QWERTY 0 MACRO_QWERTY = 0,
#define MACRO_COLEMAK 1 MACRO_UPPER,
#define MACRO_DVORAK 2 MACRO_LOWER,
#define MACRO_UPPER 3 MACRO_FUNCTION,
#define MACRO_LOWER 4 MACRO_MOUSE,
#define MACRO_FUNCTION 5 MACRO_TIMBRE_1,
#define MACRO_MOUSE 6 MACRO_TIMBRE_2,
#define MACRO_TIMBRE_1 7 MACRO_TIMBRE_3,
#define MACRO_TIMBRE_2 8 MACRO_TIMBRE_4,
#define MACRO_TIMBRE_3 9 MACRO_TEMPO_U,
#define MACRO_TIMBRE_4 10 MACRO_TEMPO_D,
#define MACRO_TEMPO_U 11 MACRO_TONE_DEFAULT,
#define MACRO_TEMPO_D 12 MACRO_MUSIC_TOGGLE,
#define MACRO_TONE_DEFAULT 13 MACRO_AUDIO_TOGGLE,
#define MACRO_MUSIC_TOGGLE 14 MACRO_INC_VOICE,
#define MACRO_AUDIO_TOGGLE 16 MACRO_DEC_VOICE,
#define MACRO_INC_VOICE 18 MACRO_BACKLIGHT,
#define MACRO_DEC_VOICE 19 MACRO_BREATH_TOGGLE,
#define MACRO_BACKLIGHT 20 MACRO_BREATH_SPEED_INC,
#define MACRO_BREATH_TOGGLE 21 MACRO_BREATH_SPEED_DEC,
#define MACRO_BREATH_SPEED_INC 23 MACRO_BREATH_DEFAULT,
#define MACRO_BREATH_SPEED_DEC 24 MACRO_MOUSE_MOVE_UL,
#define MACRO_BREATH_DEFAULT 25 MACRO_MOUSE_MOVE_UR,
MACRO_MOUSE_MOVE_DL,
MACRO_MOUSE_MOVE_DR,
MACRO_HELP_1,
MACRO_HELP_2,
MACRO_HELP_3,
MACRO_HELP_4,
MACRO_HELP_5,
MACRO_HELP_6,
MACRO_HELP_7,
MACRO_HELP_8,
MACRO_HELP_9,
};
#define M_QWRTY M(MACRO_QWERTY) #define M_QWRTY M(MACRO_QWERTY)
#define M_COLMK M(MACRO_COLEMAK)
#define M_DVORK M(MACRO_DVORAK)
#define M_UPPER M(MACRO_UPPER) #define M_UPPER M(MACRO_UPPER)
#define M_LOWER M(MACRO_LOWER) #define M_LOWER M(MACRO_LOWER)
#define M_FUNCT M(MACRO_FUNCTION) #define M_FUNCT M(MACRO_FUNCTION)
@ -60,6 +71,19 @@
#define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDU M(MACRO_BREATH_SPEED_INC)
#define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC)
#define M_BDFLT M(MACRO_BREATH_DEFAULT) #define M_BDFLT M(MACRO_BREATH_DEFAULT)
#define M_MS_UL M(MACRO_MOUSE_MOVE_UL)
#define M_MS_UR M(MACRO_MOUSE_MOVE_UR)
#define M_MS_DL M(MACRO_MOUSE_MOVE_DL)
#define M_MS_DR M(MACRO_MOUSE_MOVE_DR)
#define M_HELP1 M(MACRO_HELP_1)
#define M_HELP2 M(MACRO_HELP_2)
#define M_HELP3 M(MACRO_HELP_3)
#define M_HELP4 M(MACRO_HELP_4)
#define M_HELP5 M(MACRO_HELP_5)
#define M_HELP6 M(MACRO_HELP_6)
#define M_HELP7 M(MACRO_HELP_7)
#define M_HELP8 M(MACRO_HELP_8)
#define M_HELP9 M(MACRO_HELP_9)
#define VC_UP M(MACRO_INC_VOICE) #define VC_UP M(MACRO_INC_VOICE)
@ -77,6 +101,7 @@
#define SC_ACLS LALT(KC_F4) #define SC_ACLS LALT(KC_F4)
#define SC_CCLS LCTL(KC_F4) #define SC_CCLS LCTL(KC_F4)
#define TG_NKRO MAGIC_TOGGLE_NKRO
#define OS_SHFT KC_FN0 #define OS_SHFT KC_FN0
#define _______ KC_TRNS #define _______ KC_TRNS
@ -86,169 +111,126 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY /* LAYER = LAYER_QWERTY
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. .--------------------------------------------------------------------------------------------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------' '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_QWERTY] = { // QWERTY
{ 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_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_DEL },
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
/* COLEMAK
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_COLEMAK] = { // COLEMAK
{ 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_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
/* DVORAK
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAPS | A | O | E | U | I | D | H | T | N | S | - | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_DVORAK] = { // DVORAK
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL },
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
/* UPPER
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | PRINT | BR TOG | BR SP+ | BR SP- | BR RST | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | 0 | | RALT | . | ENTER | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_UPPER] = { // UPPER
{ KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS },
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS },
{ KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME },
{ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END },
{ _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ },
},
/* LOWER
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | ^ | * | + | - | / | \ | _ | ' | " | ` | | XXXXXX . | HOME |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | | | & | ! | ~ | ; | : | = | < | > | ? | XXXXXX . | | END |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_LOWER] = { // LOWER
{ _______, 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_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS },
{ _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME },
{ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ },
},
/* FUNCTION
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | NUM LK | | | | | | | | | | | | | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | SCR LK | F13 | F14 | F15 | F16 | | | | | | | | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAP LK | F17 | F18 | F19 | F20 | | | | | | | | XXXXXX . | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F21 | F22 | F23 | F24 | | | | | | | XXXXXX . | VOL UP | MUTE |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | PLAY/PAUSE | | | | | | PTRACK | VOL DN | NTRACK |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_FUNCTION] = { // FUNCTION
{ KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX },
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXX },
{ _______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_VOLU, KC_MUTE },
{ _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT },
},
#ifdef MOUSEKEY_ENABLE
[LAYER_MOUSE] = { // MOUSE
{ _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U },
{ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D },
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R },
},
#endif
[LAYER_ADJUST] = { // ADJUST
{ _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ },
{ _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ },
{ _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ },
},
/*
[LAYER_EMPTY] = { // LAYER
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ },
},
*/ */
[LAYER_QWERTY] = {
{ 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_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_DEL },
{ KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_PGUP },
{ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, KC_UP , KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
},
/* LAYER = LAYER_UPPER
.--------------------------------------------------------------------------------------------------------------------------------------.
| PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ |
'--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_UPPER] = {
{ KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______ },
{ KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS },
{ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME },
{ _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END },
{ _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ }
},
/* LAYER = LAYER_LOWER
.--------------------------------------------------------------------------------------------------------------------------------------.
| PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ |
'--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_LOWER] = {
{ KC_PSCR, 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_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS },
{ _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME },
{ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END },
{ _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ }
},
/* LAYER = LAYER_FUNCTION
.--------------------------------------------------------------------------------------------------------------------------------------.
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT |
'--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_FUNCTION] = {
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE },
{ _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }
},
/* LAYER = LAYER_MOUSE
.--------------------------------------------------------------------------------------------------------------------------------------.
| ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R |
'--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_MOUSE] = {
{ KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R },
{ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U },
{ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D },
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }
},
/* LAYER = LAYER_ADJUST
.--------------------------------------------------------------------------------------------------------------------------------------.
| XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ |
'--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_ADJUST] = {
{ XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX },
{ XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP }
},
}; };
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
@ -290,6 +272,69 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) switch(id)
{ {
case MACRO_HELP_1:
if (record->event.pressed)
{
uprintf("1");
}
break;
case MACRO_HELP_2:
if (record->event.pressed)
{
uprintf("2");
}
break;
case MACRO_HELP_3:
if (record->event.pressed)
{
uprintf("3");
}
break;
case MACRO_HELP_4:
if (record->event.pressed)
{
uprintf("4");
}
break;
case MACRO_HELP_5:
if (record->event.pressed)
{
uprintf("5");
}
break;
case MACRO_HELP_6:
if (record->event.pressed)
{
uprintf("6");
}
break;
case MACRO_HELP_7:
if (record->event.pressed)
{
uprintf("7");
}
break;
case MACRO_HELP_8:
if (record->event.pressed)
{
uprintf("8");
}
break;
case MACRO_HELP_9:
if (record->event.pressed)
{
uprintf("9");
}
break;
case MACRO_BREATH_TOGGLE: case MACRO_BREATH_TOGGLE:
if (record->event.pressed) if (record->event.pressed)
{ {
@ -322,29 +367,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_QWERTY); persistant_default_layer_set(1UL<<LAYER_QWERTY);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, STACCATO);
#endif /* AUDIO_ENABLE */
}
break;
case MACRO_COLEMAK:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_COLEMAK);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, STACCATO);
#endif /* AUDIO_ENABLE */
}
break;
case MACRO_DVORAK:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_DVORAK);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, STACCATO);
#endif /* AUDIO_ENABLE */
} }
break; break;

View File

@ -0,0 +1,96 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* Make Overloaded Keys switch faster */
#define TAPPING_TERM 150
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Technomancy
#define PRODUCT Atreus
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 11
// Change this to how you wired your keyboard
// COLS: Left to right, ROWS: Top to bottom
#if defined(ATREUS_ASTAR)
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
#if defined(PCBDOWN)
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
#else
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
#endif
# define UNUSED_PINS
#elif defined(ATREUS_TEENSY2)
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
# define UNUSED_PINS
#endif
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
//#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

View File

@ -0,0 +1,61 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include "atreus.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define BASE 0
#define NUMS 1
#define MOUS 2
// Some quick aliases, just to make it look pretty
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP( /* Qwerty */
KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,
KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN ,
SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT),
KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ),
[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC,
KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC,
_______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______,
_______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______),
[MOUS] = KEYMAP( /* Mouse and Media Keys */
KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4,
KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3,
KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2,
_______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1)
};
// I prefer this layer switching strategy to the TG and MO functions.
// so that I can get out of mouse mode just by tapping/holding my base layer FN key.
const uint16_t PROGMEM fn_actions[] = {
[BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0
[NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
[MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};

View File

@ -0,0 +1,66 @@
// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer.
#include "atreus.h"
#include "action_layer.h"
#include "keymap_colemak.h"
#define PREVENT_STUCK_MODIFIERS
// Each layer gets a name for readability, which is then used in the keymap matrix below.
#define ALPH 0
#define NUMS 1
#define CURS 2
#define SYMB 3
#define FKEY 4
// Some handy macros to keep the keymaps clean and easier to maintain
#define KM_SAVE LGUI(CM_S)
#define KM_CLSE LGUI(CM_W)
#define KM_OPEN LGUI(CM_O)
#define KM_COPY LGUI(KC_C)
#define KM_CUT LGUI(KC_X)
#define KM_PAST LGUI(KC_V)
#define KM_UNDO LGUI(KC_Z)
#define KM_REDO LGUI(LSFT(KC_Z))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[ALPH] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P},
{KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN},
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
{KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL}
},
[NUMS] = {
{KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH},
{KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR},
{KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS}
},
[CURS] = {
{KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS},
{KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS},
{KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
},
[SYMB] = {
{KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC},
{KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD},
{KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC},
{KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
},
[FKEY] = {
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
}};
const uint16_t PROGMEM fn_actions[] = {};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {}
return MACRO_NONE;
};

View File

@ -0,0 +1,45 @@
Jeremy's Atreus Key Mapping
===========================
I am a programmer by trade that suffers from the beginning stages of RSI. As a programmer I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, for me. I made heavy use of momentary layer toggling.
My layout is also geared toward a software based Colemak mapping. I would like it to be hardware, but I use my Laptop on the go frequently and thus my laptop keyboard. I have moved the keycaps to reflect the Colemak layout. My laptop is a MacBook Pro (2015).
## Main Layers
1. [Letters](http://www.keyboard-layout-editor.com/#/gists/6861cb9df09ce78efaddf8aa7471e3ac)
2. [Symbols](http://www.keyboard-layout-editor.com/#/gists/8956a18b508a78e93b9c38ec3fcccaa5)
3. [Navigation](http://www.keyboard-layout-editor.com/#/gists/6ed492b714a7f54eb1c5de09b87fd8c4)
4. [Numbers](http://www.keyboard-layout-editor.com/#/gists/399ceb5624e8388e48a3a5eacac8e973)
5. [Function Keys](http://www.keyboard-layout-editor.com/#/gists/7fd7dc24c7048316f3724b1893c64e89)
## Notes
### General
Some characters can be accessed multiple ways. This was done because you may be in a given layer, such as numbers, where when doing math, you may need quick access to the parentheses characters for grouping. This prevents some layer switching.
I own an ErgoDox and plan on porting this as a base layer, then using the extra keys the ErgoDox provides accordingly. My goal, though, is to be fully functional on this base setup and build everything into muscle memory.
### Symbol Layer
1. I placed characters that deal with an if statement close together, such as !, & and |.
2. All matching brace/bracket characters are together as well.
### Number Layer
1. Everything I did was a compromise when trying to mimic a ten-key. I did the best I could.
2. Operators are duplicated on the right and left. I do not find it comfortable to use my pinky much, so I tend to use my left hand for +, -, * and / but those were also placed on the right hand to mimic the ten-key.
3. Parentheses were added for typing on the calculator.
### Cursor Layer
1. It includes basic audio controls because they didn't really fit anywhere else
2. It contains basic file manipulation. I'm not sure that was a good idea. I do save all the time, but Cmd+S isn't exactly hard.
3. It contains the backspace and delete keys right on top of the left and right arrows.
4. Cmd and Opt keys are duplicated. This makes for very easy navigation, for example on a Mac, Opt+Left/Right moves word by word. It also backspaces or deletes word by word.
### Function Layer
1. Almost all other layers I saw grouped the F keys into a bunch of three. This only gives nine function keys in order if you attempt to stay as close to the home row as possible. I went with a group of four, which gives all twelve function keys to the right hand, one row below and above the home row.
2. I duplicated the Command and Option keys the same as on the cursor layer. This makes it dead easy to hit modified function keys such as Cmd+Opt+F5. It's also easy to toss in a Shift modifier in there with the right thumb since the bottom row is preserved.

View File

@ -0,0 +1,24 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
// swap-hands action needs a matrix to define the swap
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
/* Left hand, matrix positions */
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
/* Right hand, matrix positions */
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
};

View File

@ -71,6 +71,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
# comment out to disable the options. # comment out to disable the options.
# #
SLEEP_LED_ENABLE = no
ifndef QUANTUM_DIR ifndef QUANTUM_DIR
include ../../../Makefile include ../../../Makefile
endif endif

View File

@ -7,7 +7,7 @@ CONSOLE_ENABLE = no
TAP_DANCE_ENABLE = yes TAP_DANCE_ENABLE = yes
KEYLOGGER_ENABLE ?= yes KEYLOGGER_ENABLE ?= yes
UCIS_ENABLE = yes UCIS_ENABLE = yes
MOUSEKEY_ENABLE ?= yes MOUSEKEY_ENABLE = no
AUTOLOG_ENABLE ?= no AUTOLOG_ENABLE ?= no
@ -25,6 +25,8 @@ OPT_DEFS += -DKEYLOGGER_ENABLE
CONSOLE_ENABLE = yes CONSOLE_ENABLE = yes
endif endif
OPT_DEFS += -DUSER_PRINT
KEYMAP_VERSION = $(shell \ KEYMAP_VERSION = $(shell \
if [ -d "${KEYMAP_PATH}/.git" ]; then \ if [ -d "${KEYMAP_PATH}/.git" ]; then \
cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -8,7 +8,6 @@
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "action_util.h" #include "action_util.h"
#include "mousekey.h"
#include "timer.h" #include "timer.h"
#include "keymap_plover.h" #include "keymap_plover.h"
#include "eeconfig.h" #include "eeconfig.h"
@ -36,18 +35,6 @@ enum {
A_PLVR, A_PLVR,
A_MPN, A_MPN,
// Function / number keys
KF_1, // 1, F1
KF_2, // 2, F2
KF_3, // ...
KF_4,
KF_5,
KF_6,
KF_7,
KF_8,
KF_9,
KF_10,
// Application select keys // Application select keys
APP_SLK, // Slack APP_SLK, // Slack
APP_EMCS, // Emacs APP_EMCS, // Emacs
@ -55,17 +42,6 @@ enum {
APP_CHRM, // Chrome APP_CHRM, // Chrome
APP_MSIC, // Music APP_MSIC, // Music
// Diagonal mouse movement
A_MUL,
A_MUR,
A_MDL,
A_MDR,
// Mouse acceleration
A_ACL0,
A_ACL1,
A_ACL2,
// Hungarian layer keys // Hungarian layer keys
HU_AA, // Á HU_AA, // Á
HU_OO, // Ó HU_OO, // Ó
@ -76,6 +52,18 @@ enum {
HU_UE, // Ü HU_UE, // Ü
HU_OEE, // Ő HU_OEE, // Ő
HU_UEE, // Ű HU_UEE, // Ű
// number/symbol keys
A_1, // 1
A_2, // 2
A_3, // ...
A_4,
A_5,
A_6,
A_7,
A_8,
A_9,
A_0,
}; };
/* Fn keys */ /* Fn keys */
@ -95,7 +83,9 @@ enum {
CT_CLN = 0, CT_CLN = 0,
CT_TA, CT_TA,
CT_LBP, CT_LBP,
CT_RBP CT_RBP,
CT_TMUX,
CT_TPS,
}; };
/* States & timers */ /* States & timers */
@ -114,6 +104,8 @@ bool log_enable = false;
bool time_travel = false; bool time_travel = false;
static uint8_t is_adore = 0;
/* The Keymap */ /* The Keymap */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -121,13 +113,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base Layer /* Keymap 0: Base Layer
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ |
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
* | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow |
* |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
* | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | : | | - | | | | | * | | | | | : | | - | | | | |
* `-----------------------------------' `-----------------------------------' * `-----------------------------------' `-----------------------------------'
@ -141,22 +133,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[BASE] = KEYMAP( [BASE] = KEYMAP(
// left hand // left hand
M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) ,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP)
,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I ,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN) ,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX)
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
,F(F_ALT),F(F_GUI) ,F(F_ALT),F(F_GUI)
,F(F_CTRL) ,F(F_CTRL)
,KC_BSPC,F(F_SFT),KC_ESC ,KC_BSPC,F(F_SFT),KC_ESC
// right hand // right hand
,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,OSL(NMDIA),KC_DEL ,OSL(NMDIA),KC_DEL
,KC_LEAD ,KC_LEAD
@ -166,15 +158,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 1: Adore layer /* Keymap 1: Adore layer
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ | * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ |
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
* | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
* | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | | * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | | * | | | | | : | | - | | | | |
* `-----------------------------------' `-----------------------------------' * `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | LAlt | GUI | | MDIA | Del | * | LAlt | GUI | | MDIA | Del |
@ -186,22 +178,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[ADORE] = KEYMAP( [ADORE] = KEYMAP(
// left hand // left hand
KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) ,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP)
,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U ,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U
,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN) ,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX)
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
,F(F_ALT),F(F_GUI) ,F(F_ALT),F(F_GUI)
,F(F_CTRL) ,F(F_CTRL)
,KC_BSPC,F(F_SFT),KC_ESC ,KC_BSPC,F(F_SFT),KC_ESC
// right hand // right hand
,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS
,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,OSL(NMDIA),KC_DEL ,OSL(NMDIA),KC_DEL
,F(F_HUN) ,F(F_HUN)
@ -350,45 +342,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 5: Navigation & Media layer /* Keymap 5: Navigation & Media layer
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | | * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen| * | | | | | | | | | | | | | | | |
* |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | | * | | | | | | |------| |------| | | | | | |
* |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop | * | | | | | | | | | | | | | | | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | | * | | | | | | | | | | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Mute | VlUp | | BASE | MClk | * | Mute | VlUp | | BASE | |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | VlDn | | Prev |Left |Right | * | | | VlDn | | | | |
* | SPC | Enter|------| |------| Click| Click| * | | |------| |------| | |
* | | | ESC | | Next | | | * | | | | | | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
[NMDIA] = KEYMAP( [NMDIA] = KEYMAP(
// left hand // left hand
M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO
,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,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 ,KC_NO ,KC_NO ,KC_NO
,KC_MUTE ,KC_VOLU ,KC_MUTE ,KC_VOLU
,KC_VOLD ,KC_VOLD
,KC_SPC,KC_ENTER,KC_ESC ,KC_NO ,KC_NO ,KC_TRNS
// right hand // right hand
,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP ,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 ,KC_NO
,KC_TRNS ,KC_MS_BTN3 ,KC_TRNS ,KC_NO
,KC_MPRV ,KC_NO
,KC_MNXT ,KC_BTN1 ,KC_BTN2 ,KC_NO ,KC_NO ,KC_NO
), ),
/* Keymap 6: Steno for Plover /* Keymap 6: Steno for Plover
@ -514,40 +506,62 @@ static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_c
return MACRO_NONE; return MACRO_NONE;
} }
static bool from_appsel; static void ang_handle_num_row(uint8_t id, keyrecord_t *record) {
uint8_t idx = id - A_1;
uint8_t kc;
static bool shifted[10];
static void ang_handle_kf (keyrecord_t *record, uint8_t id) if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
{ ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
uint8_t code = id - KF_1; if (record->event.pressed)
shifted[idx] = true;
}
if (!shifted[idx]) {
kc = idx + KC_1;
} else {
switch (id) {
case A_8:
case A_9:
shifted[idx] = false;
return;
case A_7:
kc = KC_2;
break;
case A_5:
kc = KC_8;
break;
case A_3:
kc = KC_6;
break;
case A_1:
kc = KC_4;
break;
case A_0:
kc = KC_5;
break;
case A_2:
kc = KC_1;
break;
case A_4:
kc = KC_3;
break;
case A_6:
kc = KC_7;
break;
}
}
if (record->event.pressed) { if (record->event.pressed) {
kf_timers[code] = timer_read (); register_code (kc);
} else { } else {
uint8_t kc_base; unregister_code (kc);
shifted[idx] = false;
if (from_appsel) {
from_appsel = false;
return;
}
if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) {
// Long press
kc_base = KC_F1;
} else {
kc_base = KC_1;
}
kf_timers[code] = 0;
code += kc_base;
register_code (code);
unregister_code (code);
} }
} }
static struct {
uint8_t idx;
} m_accel_state;
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
switch(id) { switch(id) {
@ -592,70 +606,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case HU_UEE: case HU_UEE:
return ang_do_hun (record, KC_EQL, KC_U); return ang_do_hun (record, KC_EQL, KC_U);
#if MOUSEKEY_ENABLE
/* Mouse movement */
case A_MUL:
if (record->event.pressed) {
mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_LEFT);
} else {
mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_LEFT);
}
mousekey_send();
break;
case A_MUR:
if (record->event.pressed) {
mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_RIGHT);
} else {
mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_RIGHT);
}
mousekey_send();
break;
case A_MDL:
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_LEFT);
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_LEFT);
}
mousekey_send();
break;
case A_MDR:
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_RIGHT);
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_RIGHT);
}
mousekey_send();
break;
case A_ACL0 ... A_ACL2:
if (record->event.pressed) {
uint8_t idx = id - A_ACL0;
if (m_accel_state.idx == id) {
mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0);
m_accel_state.idx = 0;
} else {
if (m_accel_state.idx) {
mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0);
m_accel_state.idx = 0;
}
mousekey_on(KC_ACL0 + idx);
m_accel_state.idx = id;
}
}
break;
#endif
/* Plover base */ /* Plover base */
case A_PLVR: case A_PLVR:
toggle_steno(record->event.pressed); toggle_steno(record->event.pressed);
@ -667,7 +617,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
register_code (KC_LGUI); register_code (KC_LGUI);
if (record->tap.count && !record->tap.interrupted) { if (record->tap.count && !record->tap.interrupted) {
if (record->tap.count >= 2) { if (record->tap.count >= 2) {
register_code (KC_W);
layer_on (APPSEL); layer_on (APPSEL);
set_oneshot_layer (APPSEL, ONESHOT_START); set_oneshot_layer (APPSEL, ONESHOT_START);
} }
@ -678,7 +627,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} else { } else {
if (record->tap.count >= 2) if (record->tap.count >= 2)
{ {
unregister_code (KC_W);
clear_oneshot_layer_state (ONESHOT_PRESSED); clear_oneshot_layer_state (ONESHOT_PRESSED);
} }
gui_timer = timer_read (); gui_timer = timer_read ();
@ -686,43 +634,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break; break;
case APP_SLK: case APP_SLK:
from_appsel = true; if (record->event.pressed)
return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); uprintf("CMD:appsel_slack\n");
break;
case APP_EMCS: case APP_EMCS:
from_appsel = true; if (record->event.pressed)
return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END); uprintf("CMD:appsel_emacs\n");
break;
case APP_TERM: case APP_TERM:
from_appsel = true; if (record->event.pressed)
if (!record->event.pressed) { uprintf("CMD:appsel_term\n");
register_code(KC_ESC);
unregister_code(KC_ESC);
wait_ms(TAPPING_TERM + 25);
register_code(KC_DEL);
unregister_code(KC_DEL);
}
break; break;
case APP_CHRM: case APP_CHRM:
from_appsel = true; if (record->event.pressed)
return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); uprintf("CMD:appsel_chrome\n");
break;
case APP_MSIC: case APP_MSIC:
from_appsel = true; if (record->event.pressed)
return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); uprintf("CMD:appsel_music\n");
break;
/* Function keys */ // number row and symbols
case KF_1 ... KF_10: case A_1 ... A_0:
ang_handle_kf (record, id); ang_handle_num_row(id, record);
break; break;
} }
return MACRO_NONE; return MACRO_NONE;
}; };
static uint8_t is_adore = 0;
// Runs just one time when the keyboard initializes. // Runs just one time when the keyboard initializes.
void matrix_init_user(void) { void matrix_init_user(void) {
uint8_t dl; uint8_t dl;
@ -805,6 +749,36 @@ static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data
layer_off (ARRW); layer_off (ARRW);
} }
static void ang_tap_dance_tmux_finished (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_code(KC_LALT);
register_code(KC_SPC);
unregister_code(KC_SPC);
unregister_code(KC_LALT);
} else {
register_code(KC_LCTL);
register_code(KC_A);
unregister_code(KC_A);
unregister_code(KC_LCTL);
}
}
static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *user_data) {
uint8_t kc = KC_P;
if (state->count >= 2) {
kc = KC_Z;
}
register_code(KC_LALT);
register_code(KC_SPC);
unregister_code(KC_SPC);
unregister_code(KC_LALT);
register_code(kc);
unregister_code(kc);
}
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
,[CT_TA] = { ,[CT_TA] = {
@ -813,12 +787,23 @@ qk_tap_dance_action_t tap_dance_actions[] = {
} }
,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN) ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN)
,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
}; };
// Runs constantly in the background, in a loop. // Runs constantly in the background, in a loop.
void matrix_scan_user(void) { void matrix_scan_user(void) {
static uint32_t prev_layer_state;
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);
bool is_arrow = false; bool is_arrow = false;
static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
if (layer_state != prev_layer_state) {
prev_layer_state = layer_state;
if (layer_lookup[layer])
uprintf("LAYER: %s\n", layer_lookup[layer]);
}
if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
unregister_code (KC_LGUI); unregister_code (KC_LGUI);
@ -929,18 +914,7 @@ void matrix_scan_user(void) {
} }
SEQ_TWO_KEYS (KC_W, KC_M) { SEQ_TWO_KEYS (KC_W, KC_M) {
register_code (KC_LALT); uprintf("CMD:wm\n");
register_code (KC_F2);
unregister_code (KC_F2);
unregister_code (KC_LALT);
wait_ms (1000);
ang_tap (KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0);
register_code (KC_LGUI);
register_code (KC_UP);
unregister_code (KC_UP);
unregister_code (KC_LGUI);
} }
SEQ_ONE_KEY (KC_A) { SEQ_ONE_KEY (KC_A) {
@ -999,8 +973,11 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
bool process_record_user (uint16_t keycode, keyrecord_t *record) { bool process_record_user (uint16_t keycode, keyrecord_t *record) {
#if KEYLOGGER_ENABLE #if KEYLOGGER_ENABLE
if (log_enable) { if (log_enable) {
xprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, uint8_t layer = biton32(layer_state);
record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak");
if ((layer == ADORE) || (layer == BASE))
uprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col,
record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak");
} }
#endif #endif
@ -1047,8 +1024,8 @@ void qk_ucis_symbol_fallback (void) {
for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
uint8_t code; uint8_t code;
if (qk_ucis_state.codes[i] > KF_1) if ((qk_ucis_state.codes[i] >= M(A_1)) && (qk_ucis_state.codes[i] <= M(A_0)))
code = qk_ucis_state.codes[i] - KF_1 + KC_1; code = qk_ucis_state.codes[i] - M(A_1) + KC_1;
else else
code = qk_ucis_state.codes[i]; code = qk_ucis_state.codes[i];
register_code(code); register_code(code);

View File

@ -18,12 +18,11 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs]
* [Layouts](#layouts) * [Layouts](#layouts)
- [Base layer](#base-layer) - [Base layer](#base-layer)
- [ADORE layer](#adore-layer) - [ADORE layer](#adore-layer)
- [Hungarian layer](#hungarian-layer)
- [Navigation and media layer](#navigation-and-media-layer)
- [Steno layer](#steno-layer) - [Steno layer](#steno-layer)
- [LED states](#led-states) - [LED states](#led-states)
* [Tools](#tools) * [Tools](#tools)
- [Heatmap](#heatmap) - [Heatmap](#heatmap)
- [Layer notification](#layer-notification)
* [Special features](#special-features) * [Special features](#special-features)
- [Unicode Symbol Input](#unicode-symbol-input) - [Unicode Symbol Input](#unicode-symbol-input)
* [Building](#building) * [Building](#building)
@ -39,7 +38,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs]
At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave: At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave:
* The keys on the number row double as function keys, when held for a bit longer than an usual tap. This allows me to use the function keys without having to switch layers. * The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer.
* The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap. * The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap.
* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. * The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout.
* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode.
@ -57,28 +56,16 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
- `LEAD d` toggles logging keypress positions to the HID console. - `LEAD d` toggles logging keypress positions to the HID console.
- `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader.
- `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode.
The symbols on the front in the image above have the same color as the key that activates them, with the exception of the **Arrow** layer, which is just black on the front.
## ADORE layer ## ADORE layer
[![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a) [![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a)
While using the standard Dvorak layout, I encountered a number of inconveniences, and on this layer, I am playing with ideas to make the layout feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, had shortcomings I was not happy with. So now this is something inbetween, with own observations thrown in. How it works out in the long run remains to be seen. My experimental layout, that I keep tweaking. No full description here, because things are very much in flux.
[cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm Note that the **HUN** layer does not work well with ADORE: it still has the same layout as on the [Base](#base-layer) layer. This will remain until ADORE becomes the default.
Based on a week and a half of typing, the keys were rearranged, and the home row neatly spelled out **ADORE**, that gave the layout its name.
## Hungarian layer
[![Hungarian layer](images/hun-layer.png)](http://www.keyboard-layout-editor.com/#/gists/b160f6ec90d58c127c114c89f66e9dc9)
On this layer, the accented characters are at the same position as their base variant. For some, which can have other diatribes, the long one is on top, short's on bottom. Tapping any of the accented characters takes us back to the base layer.
## Navigation and media layer
[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892)
This layer is primarily for navigating with the cursor or the mouse, and some media things.
## Steno layer ## Steno layer
@ -93,8 +80,8 @@ The primary purpose of the LEDs is to show the modifier status, a secondary, to
For the layers, the following rules apply: For the layers, the following rules apply:
* When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. * When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active.
* When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on. * When the **Hungarian** layer is active, the *green* and *blue* LEDs are on.
* When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on. * When the **Media** layer is active, the *red* and *green* ones are on.
* When the **ARROW** layer is active, the *red* and *blue* ones are on. * When the **ARROW** layer is active, the *red* and *blue* ones are on.
* For the [Steno layer](#steno-layer), all LEDs will be turned on. * For the [Steno layer](#steno-layer), all LEDs will be turned on.
@ -129,6 +116,10 @@ The generated heatmap looks somewhat like this:
![Heatmap](images/heatmap.png) ![Heatmap](images/heatmap.png)
## Layer notification
There is a very small tool in `tools/layer-notify`, that listens to the HID console, looking for layer change events, and pops up a notification for every detected change. It is a very simple tool, mainly serving as an example.
# Building # Building
To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this:
@ -156,6 +147,43 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
# Changelog # Changelog
## v1.7
*2016-09-18*
### Overall changes
* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
* The number/function key behavior was changed: function keys are now on the **Media**.
* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers.
* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped.
* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it.
### ADORE
* `Y` and `X` have been swapped again.
### Media/Navigation layer
* The function keys are now on this layer.
* Mouse keys have been removed.
* Media start/stop/prev/next have been removed.
* `Print screen` has been removed.
* There is only one screen lock key now.
### Heatmap
* Fixed a few issues in the finger-stats calculation.
* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool.
* The heatmap tool will now colorize the stats by default.
* The periodic stats are now printed in a more compact format.
### Tools
* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes.
* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator.
* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side.
## v1.6 ## v1.6
*2016-08-24* *2016-08-24*
@ -174,7 +202,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
### Miscellaneous changes ### Miscellaneous changes
* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. * `LEAD u` now starts the symbolic unicode input system, instead of the OS-one.
* The mouse acceleration keys on the [Navigation and Media](#navigation-and-media-layer) layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. * The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off.
* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. * When the **ARROW** layer is on, the *red* and *blue* LEDs light up now.
### Heatmap ### Heatmap
@ -221,7 +249,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. * The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. * The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. * The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
* The **Emacs** layer is gone, replaced by a simplified [navigation and media](#navigation-and-media-layer) layer. * The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
* `LEAD v` types the firmware version, and the keymap version. * `LEAD v` types the firmware version, and the keymap version.
* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. * On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. * The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
@ -240,7 +268,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
- `-` on the left half was replaced by `Tab`. - `-` on the left half was replaced by `Tab`.
- `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
- `:` now inputs `;` when shifted. - `:` now inputs `;` when shifted.
* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers. * `ESC` cancels the **Hungarian** layer too, not just modifiers.
## v1.0 ## v1.0

View File

@ -13,18 +13,15 @@
[ [
{ {
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"fa": [ "fa": [
0, 0,
0, 0,
2 2
] ]
}, },
"#\n3\nF3", "*\n5\nF5",
{ {
"x": 10.5, "x": 10.5,
"c": "#a7d0db",
"t": "#000000",
"a": 4, "a": 4,
"fa": [ "fa": [
0, 0,
@ -32,54 +29,44 @@
2 2
] ]
}, },
"*\n8\nF8" "#\n4\nF4"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"@\n2\nF2", "@\n7\nF7",
{ {
"x": 1, "x": 1
"c": "#7adabd",
"t": "#000000"
}, },
"$\n4\nF4", "^\n3\nF3",
{ {
"x": 8.5 "x": 8.5
}, },
"&\n7\nF7", "!\n2\nF2",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"(\n9\nF9" "&\n6\nF6"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"%\n5\nF5", "$\n1\nF1",
{ {
"c": "#f9cd31",
"a": 7, "a": 7,
"f": 2 "f": 3
}, },
"STENO", "F11",
{ {
"x": 4.5, "x": 4.5,
"f": 3 "f": 3
}, },
"F12", "F12",
{ {
"c": "#7adabd",
"a": 4, "a": 4,
"f": 3, "f": 3,
"fa": [ "fa": [
@ -88,19 +75,17 @@
2 2
] ]
}, },
"^\n6\nF6" "%\n0\nF10"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb2d2",
"f": 9, "f": 9,
"a": 6, "a": 6,
"w": 1.5 "w": 1.5
}, },
"\n\n<i class='kb kb-Multimedia-Play-Pause'></i>", "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
{ {
"t": "#0d0d0b",
"f": 3, "f": 3,
"a": 4, "a": 4,
"fa": [ "fa": [
@ -109,23 +94,21 @@
2 2
] ]
}, },
"!\n1\nF1", " \n9\nF9",
{ {
"x": 14.5 "x": 14.5
}, },
")\n0\nF10", " \n8\nF8",
{ {
"a": 7, "a": 7,
"w": 1.5 "w": 1.5
}, },
"F11" "STENO"
], ],
[ [
{ {
"y": -0.375, "y": -0.375,
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"t": "#000000",
"a": 6 "a": 6
}, },
"G", "G",
@ -138,15 +121,11 @@
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b",
"a": 6 "a": 6
}, },
"W", "W",
{ {
"x": 1, "x": 1,
"c": "#7adabd",
"t": "#000000",
"a": 6 "a": 6
}, },
"L", "L",
@ -155,22 +134,17 @@
}, },
"H", "H",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"P" "P"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"M", "M",
{ {
"c": "#93c9b7",
"a": 4, "a": 4,
"fa": [0, 0, 0], "fa": [0, 0, 0],
"h": 1.5 "h": 1.5
@ -182,7 +156,6 @@
}, },
"}\n)\n]", "}\n)\n]",
{ {
"c": "#7adabd",
"a": 6 "a": 6
}, },
"F" "F"
@ -190,24 +163,21 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb07b",
"t": "#0d0d0b",
"f": 3, "f": 3,
"a": 4, "a": 4,
"w": 1.5 "w": 1.5
}, },
"\n\n~\n`", "\n\n~\n`",
{ {
"c": "#ffb2d2",
"a": 6, "a": 6,
"f": 3 "f": 3
}, },
"Y", "X",
{ {
"x": 14.5, "x": 14.5,
"a": 6 "a": 6
}, },
"X", "Y",
{ {
"a": 4, "a": 4,
"w": 1.5 "w": 1.5
@ -218,8 +188,6 @@
{ {
"y": -0.375, "y": -0.375,
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"t": "#000000",
"a": 6 "a": 6
}, },
"E", "E",
@ -231,15 +199,11 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"O", "O",
{ {
"x": 1, "x": 1,
"c": "#7adabd",
"t": "#000000",
"n": true "n": true
}, },
"I", "I",
@ -249,18 +213,14 @@
}, },
"R", "R",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"N" "N"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"U", "U",
{ {
@ -271,8 +231,6 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb2d2",
"t": "#0d0d0b",
"fa": [ "fa": [
6 6
], ],
@ -308,22 +266,21 @@
{ {
"y": -0.625, "y": -0.625,
"x": 6.5, "x": 6.5,
"c": "#93c9b7", "a": 7,
"t": "#000000", "f": 9,
"h": 1.5 "h": 1.5
}, },
";\n:", "<i class='fa fa-columns'></i>",
{ {
"x": 4.5, "x": 4.5,
"h": 1.5 "h": 1.5
}, },
"_\n-" "<i class='fa fa-table'></i>"
], ],
[ [
{ {
"y": -0.75, "y": -0.75,
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"a": 4, "a": 4,
"f": 3 "f": 3
}, },
@ -339,15 +296,11 @@
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b",
"a": 6 "a": 6
}, },
"Q", "Q",
{ {
"x": 1, "x": 1,
"c": "#7adabd",
"t": "#000000",
"a": 4 "a": 4
}, },
"<\n,", "<\n,",
@ -357,9 +310,7 @@
}, },
"K", "K",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"J" "J"
], ],
@ -367,8 +318,6 @@
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5,
"c": "#7adabd",
"t": "#000000",
"a": 4 "a": 4
}, },
">\n.", ">\n.",
@ -381,15 +330,12 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb07b",
"f": 9, "f": 9,
"w": 1.5, "w": 1.5,
"g": true "g": true
}, },
"", "",
{ {
"c": "#ffb2d2",
"t": "#0d0d0b",
"a": 6, "a": 6,
"f": 3, "f": 3,
"g": false "g": false
@ -401,8 +347,6 @@
}, },
"?\n/", "?\n/",
{ {
"c": "#ffb07b",
"t": "#000000",
"f": 9, "f": 9,
"g": true, "g": true,
"w": 1.5, "w": 1.5,
@ -414,7 +358,6 @@
{ {
"y": -0.375, "y": -0.375,
"x": 3.5, "x": 3.5,
"c": "#d9dae0",
"g": true, "g": true,
"a": 7, "a": 7,
"f": 3 "f": 3
@ -433,18 +376,16 @@
"", "",
{ {
"x": 1, "x": 1,
"c": "#d4872a", "g": false,
"g": true,
"a": 5 "a": 5
}, },
"", ";\n:",
{ {
"x": 8.5 "x": 8.5
}, },
"", "_\n-",
{ {
"x": 1, "x": 1,
"c": "#d9dae0",
"g": true, "g": true,
"a": 7 "a": 7
}, },
@ -472,7 +413,6 @@
"ry": 4.25, "ry": 4.25,
"y": -1, "y": -1,
"x": 1, "x": 1,
"c": "#f9cd31",
"g": false "g": false
}, },
"Alt", "Alt",
@ -489,7 +429,6 @@
], ],
[ [
{ {
"c": "#d4872a",
"a": 7, "a": 7,
"f": 9, "f": 9,
"h": 2 "h": 2
@ -500,15 +439,13 @@
}, },
"<i class='fa fa-angle-double-up'></i>", "<i class='fa fa-angle-double-up'></i>",
{ {
"c": "#f9cd31",
"f": 3 "f": 3
}, },
"Ctrl" "Ctrl"
], ],
[ [
{ {
"x": 2, "x": 2
"c": "#e26757"
}, },
"ESC" "ESC"
], ],
@ -518,7 +455,6 @@
"rx": 13, "rx": 13,
"y": -1, "y": -1,
"x": -3, "x": -3,
"c": "#f9cd31",
"f": 2 "f": 2
}, },
"MEDIA", "MEDIA",
@ -531,7 +467,6 @@
}, },
"HUN", "HUN",
{ {
"c": "#d4872a",
"f": 9, "f": 9,
"h": 2 "h": 2
}, },
@ -545,7 +480,6 @@
[ [
{ {
"x": -3, "x": -3,
"c": "#f9cd31",
"f": 2 "f": 2
}, },
"LEAD" "LEAD"

View File

@ -13,18 +13,15 @@
[ [
{ {
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"fa": [ "fa": [
0, 0,
0, 0,
2 2
] ]
}, },
"#\n3\nF3", "*\n5\nF5",
{ {
"x": 10.5, "x": 10.5,
"c": "#a7d0db",
"t": "#000000",
"a": 4, "a": 4,
"fa": [ "fa": [
0, 0,
@ -32,54 +29,44 @@
2 2
] ]
}, },
"*\n8\nF8" "#\n4\nF4"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"@\n2\nF2", "@\n7\nF7",
{ {
"x": 1, "x": 1
"c": "#7adabd",
"t": "#000000"
}, },
"$\n4\nF4", "^\n3\nF3",
{ {
"x": 8.5 "x": 8.5
}, },
"&\n7\nF7", "!\n2\nF2",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"(\n9\nF9" "&\n6\nF6"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"%\n5\nF5", "$\n1\nF1",
{ {
"c": "#f9cd31",
"a": 7, "a": 7,
"f": 2 "f": 3
}, },
"STENO", "F11",
{ {
"x": 4.5, "x": 4.5,
"f": 3 "f": 3
}, },
"F12", "F12",
{ {
"c": "#7adabd",
"a": 4, "a": 4,
"f": 3, "f": 3,
"fa": [ "fa": [
@ -88,12 +75,11 @@
2 2
] ]
}, },
"^\n6\nF6" "%\n0\nF10"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb2d2",
"f": 6, "f": 6,
"a": 6, "a": 6,
"w": 1.5 "w": 1.5
@ -101,7 +87,6 @@
"<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>", "<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
{ {
"f": 3, "f": 3,
"t": "#0d0d0b",
"a": 4, "a": 4,
"fa": [ "fa": [
0, 0,
@ -110,23 +95,21 @@
] ]
}, },
"!\n1\nF1", " \n9\nF9",
{ {
"x": 14.5 "x": 14.5
}, },
")\n0\nF10", " \n8\nF8",
{ {
"a": 7, "a": 7,
"w": 1.5 "w": 1.5
}, },
"F11" "STENO"
], ],
[ [
{ {
"y": -0.375, "y": -0.375,
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"t": "#000000",
"a": 4 "a": 4
}, },
">\n.", ">\n.",
@ -140,15 +123,11 @@
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b",
"a": 4 "a": 4
}, },
"<\n,", "<\n,",
{ {
"x": 1, "x": 1,
"c": "#7adabd",
"t": "#000000",
"a": 6 "a": 6
}, },
"P", "P",
@ -157,22 +136,17 @@
}, },
"G", "G",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"R" "R"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"Y", "Y",
{ {
"c": "#93c9b7",
"a": 4, "a": 4,
"h": 1.5 "h": 1.5
}, },
@ -183,7 +157,6 @@
}, },
"}\n)\n]", "}\n)\n]",
{ {
"c": "#7adabd",
"a": 6 "a": 6
}, },
"F" "F"
@ -191,14 +164,12 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb07b",
"t": "#0d0d0b",
"f": 3, "f": 3,
"a": 4,
"w": 1.5 "w": 1.5
}, },
"\n\n~\n`", "\n\n~\n`",
{ {
"c": "#ffb2d2",
"a": 4, "a": 4,
"f": 3 "f": 3
}, },
@ -218,8 +189,6 @@
{ {
"y": -0.375, "y": -0.375,
"x": 3.5, "x": 3.5,
"c": "#a7d0db",
"t": "#000000",
"a": 6 "a": 6
}, },
"E", "E",
@ -231,15 +200,11 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"O", "O",
{ {
"x": 1, "x": 1,
"c": "#7adabd",
"t": "#000000",
"n": true "n": true
}, },
"U", "U",
@ -249,18 +214,14 @@
}, },
"H", "H",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"N" "N"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"I", "I",
{ {
@ -271,8 +232,6 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb2d2",
"t": "#0d0d0b",
"fa": [ "fa": [
6 6
], ],
@ -308,23 +267,22 @@
{ {
"y": -0.625, "y": -0.625,
"x": 6.5, "x": 6.5,
"c": "#93c9b7",
"t": "#000000",
"a": 7, "a": 7,
"f": 9,
"h": 1.5 "h": 1.5
}, },
"(", "<i class='fa fa-columns'></i>",
{ {
"x": 4.5, "x": 4.5,
"h": 1.5 "h": 1.5
}, },
")" "<i class='fa fa-table'></i>"
], ],
[ [
{ {
"y": -0.75, "y": -0.75,
"x": 3.5, "x": 3.5,
"c": "#a7d0db", "f": 3,
"a": 6 "a": 6
}, },
"J", "J",
@ -336,15 +294,11 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 2.5, "x": 2.5
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"Q", "Q",
{ {
"x": 1, "x": 1
"c": "#7adabd",
"t": "#000000"
}, },
"K", "K",
{ {
@ -352,18 +306,14 @@
}, },
"M", "M",
{ {
"x": 1, "x": 1
"c": "#bfbad1",
"t": "#0d0d0b"
}, },
"V" "V"
], ],
[ [
{ {
"y": -0.875, "y": -0.875,
"x": 5.5, "x": 5.5
"c": "#7adabd",
"t": "#000000"
}, },
"X", "X",
{ {
@ -374,14 +324,11 @@
[ [
{ {
"y": -0.875, "y": -0.875,
"c": "#ffb07b",
"f": 9, "f": 9,
"w": 1.5 "w": 1.5
}, },
"\n\n<i class='kb kb-Multimedia-Play-Pause'></i>", "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
{ {
"c": "#ffb2d2",
"t": "#0d0d0b",
"a": 4, "a": 4,
"f": 3 "f": 3
}, },
@ -392,8 +339,6 @@
}, },
"Z", "Z",
{ {
"c": "#ffb07b",
"t": "#000000",
"f": 9, "f": 9,
"w": 1.5 "w": 1.5
}, },
@ -403,7 +348,6 @@
{ {
"y": -0.375, "y": -0.375,
"x": 3.5, "x": 3.5,
"c": "#d9dae0",
"g": true, "g": true,
"a": 7, "a": 7,
"f": 3 "f": 3
@ -422,7 +366,6 @@
"", "",
{ {
"x": 1, "x": 1,
"c": "#d4872a",
"g": false, "g": false,
"a": 5 "a": 5
}, },
@ -433,7 +376,6 @@
"_\n-", "_\n-",
{ {
"x": 1, "x": 1,
"c": "#d9dae0",
"g": true, "g": true,
"a": 7 "a": 7
}, },
@ -461,7 +403,6 @@
"ry": 4.25, "ry": 4.25,
"y": -1, "y": -1,
"x": 1, "x": 1,
"c": "#f9cd31",
"g": false "g": false
}, },
"Alt", "Alt",
@ -478,7 +419,6 @@
], ],
[ [
{ {
"c": "#d4872a",
"a": 7, "a": 7,
"f": 9, "f": 9,
"h": 2 "h": 2
@ -489,15 +429,13 @@
}, },
"<i class='fa fa-angle-double-up'></i>", "<i class='fa fa-angle-double-up'></i>",
{ {
"c": "#f9cd31",
"f": 3 "f": 3
}, },
"Ctrl" "Ctrl"
], ],
[ [
{ {
"x": 2, "x": 2
"c": "#e26757"
}, },
"ESC" "ESC"
], ],
@ -507,7 +445,6 @@
"rx": 13, "rx": 13,
"y": -1, "y": -1,
"x": -3, "x": -3,
"c": "#f9cd31",
"f": 2 "f": 2
}, },
"MEDIA", "MEDIA",
@ -520,7 +457,6 @@
}, },
"LEAD", "LEAD",
{ {
"c": "#d4872a",
"f": 9, "f": 9,
"h": 2 "h": 2
}, },
@ -534,7 +470,6 @@
[ [
{ {
"x": -3, "x": -3,
"c": "#f9cd31",
"f": 2 "f": 2
}, },
"HUN" "HUN"

View File

@ -0,0 +1,61 @@
#!/bin/bash
set -e
cmd_wm () {
WIN="$(xdotool getactivewindow)"
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
xdotool windowsize ${WIN} 100% 100%
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
}
_cmd_appsel () {
wmctrl -x -a $1 || true
xdotool key Escape
}
cmd_appsel_music () {
wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
xdotool key Escape
}
cmd_appsel_slack () {
_cmd_appsel slack
}
cmd_appsel_emacs () {
_cmd_appsel emacs24
}
cmd_appsel_term () {
_cmd_appsel gnome-terminal
}
cmd_appsel_chrome () {
_cmd_appsel chromium
}
cmd_help () {
cat <<EOF
Use the source, Luke!
EOF
}
while read l; do
case "$l" in
"CMD:"*)
;;
*)
continue
;;
esac
cmd="$(echo $l | cut -d: -f2-)"
echo "Got command: ${cmd}"
if type cmd_${cmd} >/dev/null 2>&1; then
cmd_${cmd}
fi
done

View File

@ -0,0 +1,12 @@
#!/bin/sh
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
sudo "${HL}" | grep --line-buffered LAYER: | \
(while read line; do
case $line in
LAYER:*)
layer="$(echo $(echo $line | cut -d: -f2-))"
notify-send -i mark-location-symbolic "Switched to layer: $layer"
;;
esac
done)

View File

@ -1,12 +1,15 @@
#! /usr/bin/env python #! /usr/bin/env python3
import json import json
import os import os
import sys import sys
import re import re
import argparse import argparse
import time
from math import floor from math import floor
from os.path import dirname from os.path import dirname
from subprocess import Popen, PIPE, STDOUT
from blessings import Terminal
class Heatmap(object): class Heatmap(object):
coords = [ coords = [
@ -33,7 +36,7 @@ class Heatmap(object):
[ [
# Row 4 # Row 4
[20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [],
[19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [], [], [], []
], ],
[ [
# Row 5 # Row 5
@ -56,11 +59,13 @@ class Heatmap(object):
def set_attr(orig, new): def set_attr(orig, new):
return new return new
def set_bg(self, (block, n), color): def set_bg(self, coords, color):
(block, n) = coords
self.set_attr_at(block, n, "c", self.set_attr, color) self.set_attr_at(block, n, "c", self.set_attr, color)
#self.set_attr_at(block, n, "g", self.set_attr, False) #self.set_attr_at(block, n, "g", self.set_attr, False)
def set_tap_info(self, (block, n), count, cap): def set_tap_info(self, coords, count, cap):
(block, n) = coords
def _set_tap_info(o, _count, _cap): def _set_tap_info(o, _count, _cap):
ns = 4 - o.count ("\n") ns = 4 - o.count ("\n")
return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100)
@ -87,8 +92,8 @@ class Heatmap(object):
g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
r, g, b = [x * 255 for x in r, g, b] r, g, b = [x * 255 for x in (r, g, b)]
return "#%02x%02x%02x" % (r, g, b) return "#%02x%02x%02x" % (int(r), int(g), int(b))
def __init__(self, layout): def __init__(self, layout):
self.log = {} self.log = {}
@ -96,7 +101,8 @@ class Heatmap(object):
self.max_cnt = 0 self.max_cnt = 0
self.layout = layout self.layout = layout
def update_log(self, (c, r)): def update_log(self, coords):
(c, r) = coords
if not (c, r) in self.log: if not (c, r) in self.log:
self.log[(c, r)] = 0 self.log[(c, r)] = 0
self.log[(c, r)] = self.log[(c, r)] + 1 self.log[(c, r)] = self.log[(c, r)] + 1
@ -132,18 +138,17 @@ class Heatmap(object):
# right hand # right hand
[0, 0, 0, 0, 0] [0, 0, 0, 0, 0]
] ]
finger_map = [0, 0, 1, 2, 3, 4, 4] finger_map = [0, 0, 1, 2, 3, 3, 3, 1, 1, 1, 2, 3, 4, 4]
for (c, r) in self.log: for (c, r) in self.log:
if r == 5: # thumb cluster if r == 5: # thumb cluster
if c <= 6: # left side if c <= 6: # left side
usage[0][4] = usage[0][4] + self.log[(c, r)] usage[0][4] = usage[0][4] + self.log[(c, r)]
else: else:
usage[1][4] = usage[1][4] + self.log[(c, r)] usage[1][0] = usage[1][0] + self.log[(c, r)]
else: else:
fc = c fc = c
hand = 0 hand = 0
if fc >= 7: if fc >= 7:
fc = fc - 7
hand = 1 hand = 1
fm = finger_map[fc] fm = finger_map[fc]
usage[hand][fm] = usage[hand][fm] + self.log[(c, r)] usage[hand][fm] = usage[hand][fm] + self.log[(c, r)]
@ -157,79 +162,158 @@ class Heatmap(object):
if total == 0: if total == 0:
total = 1 total = 1
stats = { stats = {
"total-keys": total,
"hands": { "hands": {
"left": { "left": {
"usage": float(hand_usage[0]) / total * 100, "usage": round(float(hand_usage[0]) / total * 100, 2),
"fingers": { "fingers": {
"0 - pinky": 0, "pinky": 0,
"1 - ring": 0, "ring": 0,
"2 - middle": 0, "middle": 0,
"3 - index": 0, "index": 0,
"4 - thumb": 0, "thumb": 0,
} }
}, },
"right": { "right": {
"usage": float(hand_usage[1]) / total * 100, "usage": round(float(hand_usage[1]) / total * 100, 2),
"fingers": { "fingers": {
"0 - thumb": 0, "thumb": 0,
"1 - index": 0, "index": 0,
"2 - middle": 0, "middle": 0,
"3 - ring": 0, "ring": 0,
"4 - pinky": 0, "pinky": 0,
} }
}, },
} }
} }
hmap = ['left', 'right'] hmap = ['left', 'right']
fmap = ['0 - pinky', '1 - ring', '2 - middle', '3 - index', '4 - thumb', fmap = ['pinky', 'ring', 'middle', 'index', 'thumb',
'0 - thumb', '1 - index', '2 - middle', '3 - ring', '4 - pinky'] 'thumb', 'index', 'middle', 'ring', 'pinky']
for hand_idx in range(len(usage)): for hand_idx in range(len(usage)):
hand = usage[hand_idx] hand = usage[hand_idx]
for finger_idx in range(len(hand)): for finger_idx in range(len(hand)):
stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = float(hand[finger_idx]) / total * 100 stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = round(float(hand[finger_idx]) / total * 100, 2)
return stats return stats
def dump_all(out_dir, heatmaps): def dump_all(out_dir, heatmaps):
for layer in heatmaps.keys(): stats = {}
t = Terminal()
t.clear()
sys.stdout.write("\x1b[2J\x1b[H")
print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir))
keys = list(heatmaps.keys())
keys.sort()
for layer in keys:
if len(heatmaps[layer].log) == 0: if len(heatmaps[layer].log) == 0:
continue continue
with open ("%s/%s.json" % (out_dir, layer), "w") as f: with open ("%s/%s.json" % (out_dir, layer), "w") as f:
json.dump(heatmaps[layer].get_heatmap(), f) json.dump(heatmaps[layer].get_heatmap(), f)
print >>sys.stderr, "%s stats:" % (layer) stats[layer] = heatmaps[layer].get_stats()
json.dump (heatmaps[layer].get_stats(), sys.stderr,
indent = 4, sort_keys = True) left = stats[layer]['hands']['left']
print >>sys.stderr, "" right = stats[layer]['hands']['right']
print >>sys.stderr, ""
print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer,
total=int(stats[layer]['total-keys'] / 2)))
print (('{t.underline} | ' + \
'left ({l[usage]:6.2f}%) | ' + \
'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right))
print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \
' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \
' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \
' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \
' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \
'').format(left=left['fingers'], right=right['fingers'], t=t))
def process_line(line, heatmaps, opts, stamped_log = None):
m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line)
if not m:
return False
if stamped_log is not None:
if line.startswith("KL:"):
print ("%10.10f %s" % (time.time(), line),
file = stamped_log, end = '')
else:
print (line,
file = stamped_log, end = '')
stamped_log.flush()
(c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4))
if (c, r) not in opts.allowed_keys:
return False
heatmaps[l].update_log ((c, r))
return True
def setup_allowed_keys(opts):
if len(opts.only_key):
incmap={}
for v in opts.only_key:
m = re.search ('(\d+),(\d+)', v)
if not m:
continue
(c, r) = (int(m.group(1)), int(m.group(2)))
incmap[(c, r)] = True
else:
incmap={}
for r in range(0, 6):
for c in range(0, 14):
incmap[(c, r)] = True
for v in opts.ignore_key:
m = re.search ('(\d+),(\d+)', v)
if not m:
continue
(c, r) = (int(m.group(1)), int(m.group(2)))
del(incmap[(c, r)])
return incmap
def main(opts): def main(opts):
heatmaps = {"Dvorak": Heatmap("Dvorak"), heatmaps = {"Dvorak": Heatmap("Dvorak"),
"ADORE": Heatmap("ADORE") "ADORE": Heatmap("ADORE")
} }
cnt = 0 cnt = 0
restrict_row = opts.restrict_row
out_dir = opts.outdir out_dir = opts.outdir
if not os.path.exists(out_dir):
os.makedirs(out_dir)
opts.allowed_keys = setup_allowed_keys(opts)
if not opts.one_shot:
try:
with open("%s/stamped-log" % out_dir, "r") as f:
while True:
line = f.readline()
if not line:
break
if not process_line(line, heatmaps, opts):
continue
except:
pass
stamped_log = open ("%s/stamped-log" % (out_dir), "a+")
else:
stamped_log = None
while True: while True:
line = sys.stdin.readline() line = sys.stdin.readline()
if not line: if not line:
break break
m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) if not process_line(line, heatmaps, opts, stamped_log):
if not m:
continue continue
cnt = cnt + 1 cnt = cnt + 1
(c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4))
if restrict_row != -1 and r != restrict_row:
continue
if c in opts.ignore_columns:
continue
heatmaps[l].update_log ((c, r)) if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot:
if opts.dump_interval != -1 and cnt >= opts.dump_interval:
cnt = 0 cnt = 0
dump_all(out_dir, heatmaps) dump_all(out_dir, heatmaps)
@ -239,11 +323,17 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser (description = "keylog to heatmap processor") parser = argparse.ArgumentParser (description = "keylog to heatmap processor")
parser.add_argument ('outdir', action = 'store', parser.add_argument ('outdir', action = 'store',
help = 'Output directory') help = 'Output directory')
parser.add_argument ('--row', dest = 'restrict_row', action = 'store', type = int,
default = -1, help = 'Restrict processing to this row only')
parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int, parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int,
default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only') default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only')
parser.add_argument ('--ignore-column', dest = 'ignore_columns', action = 'append', type = int, parser.add_argument ('--ignore-key', dest = 'ignore_key', action = 'append', type = str,
default = [], help = 'Ignore the specified columns') default = [], help = 'Ignore the key at position (x, y)')
parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str,
default = [], help = 'Only include key at position (x, y)')
parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true',
help = 'Do not load previous data, and do not update it, either.')
args = parser.parse_args() args = parser.parse_args()
if len(args.ignore_key) and len(args.only_key):
print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!",
file = sys.stderr)
sys.exit(1)
main(args) main(args)

View File

@ -1,5 +0,0 @@
#! /bin/sh
WIN="$(xdotool getactivewindow)"
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
xdotool windowsize ${WIN} 100% 100%
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz

View File

@ -0,0 +1,107 @@
#!/usr/bin/env python3
import os
import sys
charmap = {
'9': [[1, 0]],
'7': [[2, 0]], '@': [[2, 5], [2, 0]],
'5': [[3, 0]], '*': [[2, 5], [3, 0]],
'3': [[4, 0]], '^': [[2, 5], [4, 0]],
'1': [[5, 0]], '$': [[2, 5], [5, 0]],
'0': [[8, 0]], '%': [[2, 5], [8, 0]],
'2': [[9, 0]], '!': [[2, 5], [9, 0]],
'4': [[10, 0]], '#': [[2, 5], [10, 0]],
'6': [[11, 0]], '&': [[2, 5], [11, 0]],
'8': [[12, 0]],
'`': [[0, 1]], '~': [[2, 5], [0, 1]],
'y': [[1, 1]], 'Y': [[2, 5], [1, 1]],
'w': [[2, 1]], 'W': [[2, 5], [2, 1]],
'g': [[3, 1]], 'G': [[2, 5], [3, 1]],
'l': [[4, 1]], 'L': [[2, 5], [4, 1]],
'm': [[5, 1]], 'M': [[2, 5], [5, 1]],
'[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]],
']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]],
'f': [[8, 1]], 'F': [[2, 5], [8, 1]],
'h': [[9, 1]], 'H': [[2, 5], [9, 1]],
'c': [[10, 1]], 'C': [[2, 5], [10, 1]],
'p': [[11, 1]], 'P': [[2, 5], [11, 1]],
'x': [[12, 1]], 'X': [[2, 5], [12, 1]],
'\\': [[13, 1]], '|': [[2, 5], [13, 1]],
'\t': [[0, 2]],
'a': [[1, 2]], 'A': [[2, 5], [1, 2]],
'o': [[2, 2]], 'O': [[2, 5], [2, 2]],
'e': [[3, 2]], 'E': [[2, 5], [3, 2]],
'i': [[4, 2]], 'I': [[2, 5], [4, 2]],
'u': [[5, 2]], 'U': [[2, 5], [5, 2]],
'd': [[8, 2]], 'D': [[2, 5], [8, 2]],
'r': [[9, 2]], 'R': [[2, 5], [9, 2]],
't': [[10, 2]], 'T': [[2, 5], [10, 2]],
'n': [[11, 2]], 'N': [[2, 5], [11, 2]],
's': [[12, 2]], 'S': [[2, 5], [12, 2]],
'=': [[13, 2]], '+': [[2, 5], [13, 2]],
'z': [[1, 3]], 'Z': [[2, 5], [1, 3]],
'q': [[2, 3]], 'Q': [[2, 5], [2, 3]],
'\'': [[3, 3]], '"': [[2, 5], [3, 3]],
',': [[4, 3]], '<': [[2, 5], [4, 3]],
'.': [[5, 3]], '>': [[2, 5], [5, 3]],
'b': [[8, 3]], 'B': [[2, 5], [8, 3]],
'k': [[9, 3]], 'K': [[2, 5], [9, 3]],
'v': [[10, 3]], 'V': [[2, 5], [10, 3]],
'j': [[11, 3]], 'J': [[2, 5], [11, 3]],
'/': [[12, 3]], '?': [[2, 5], [12, 3]],
':': [[4, 4]], ';': [[4, 4], [4, 4]],
'-': [[9, 4]], '_': [[2, 5], [9, 4]],
' ': [[10, 5]],
'\n': [[11, 5]],
## Layered things
# Hungarian
'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]],
'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]],
'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]],
'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]],
'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]],
'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]],
'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]],
'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]],
'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]],
}
def lookup_char(layer, ch):
if ch in charmap:
return charmap[ch]
return None
def process_char(layer, ch, out=sys.stdout):
keys = lookup_char(layer, ch)
if not keys:
print ("Unknown char: %s" % ch, file=sys.stderr)
else:
for (c, r) in keys:
print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out)
print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out)
def process_file(fn, layer, out=sys.stdout):
with open(fn, "r") as f:
ch = f.read(1)
while ch:
process_char(layer, ch, out)
ch = f.read(1)
if sys.argv[1] == '-':
out='/dev/stdin'
else:
out=sys.argv[1]
if len(sys.argv) >= 2:
layer = 'ADORE'
else:
layer = sys.argv[2]
process_file(out, layer = layer)

View File

@ -7,6 +7,8 @@
#define SYMB 1 // symbols #define SYMB 1 // symbols
#define MDIA 2 // media keys #define MDIA 2 // media keys
#define EPRM M(1) // Macro 1: Reset EEPROM
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer /* Keymap 0: Basic layer
* *
@ -62,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | . | 0 | = | | * | EPRM | | | | | | | . | 0 | = | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | | | | | | * | | | | | |
@ -79,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,
@ -149,6 +151,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
} }
break; break;
case 1:
if (record->event.pressed) { // For resetting EEPROM
eeconfig_init();
}
break;
} }
return MACRO_NONE; return MACRO_NONE;
}; };
@ -158,6 +165,7 @@ void matrix_init_user(void) {
}; };
// Runs constantly in the background, in a loop. // Runs constantly in the background, in a loop.
void matrix_scan_user(void) { void matrix_scan_user(void) {

View File

@ -2,6 +2,8 @@
## Changelog ## Changelog
* Sep 22, 2016:
* Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
* Feb 2, 2016 (V1.1): * Feb 2, 2016 (V1.1):
* Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).

View File

@ -1,3 +1,6 @@
/* Setup to approximate a Kinesis Advantage with an eye to use in a
* Mac/OSX environment
* This version adds a hand swap feature to flip the keyboard */
#include "ergodox.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | * |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1|
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,---------------. ,---------------. * ,---------------. ,---------------.
* |Ctrl/Esc| Alt | | Alt |Ctrl/Esc| * | LGUI |Al/Esc| |Al/Esc| RGUI |
* ,------|--------|------| |------+--------+------. * ,------|--------|------| |------+--------+------.
* | | | Home | | PgUp | | | * | | | Home | | PgUp | | |
* |Backsp| Del |------| |------| Enter | Space| * |Backsp| Del |------| |------| Enter | Space|
@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// If it accepts an argument (i.e, is a function), it doesn't need KC_. // If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_* // Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default [BASE] = KEYMAP( // layer 0 : default
// left hand // left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
CTL_T(KC_ESC), ALT_T(KC_APP), KC_LGUI, ALT_T(KC_ESC),
KC_HOME, KC_HOME,
KC_BSPC,KC_DEL,KC_END, KC_BSPC, KC_DEL, KC_END,
// right hand // right hand
KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
KC_LALT, CTL_T(KC_ESC), ALT_T(KC_ESC), KC_RGUI,
KC_PGUP, KC_PGUP,
KC_PGDN,KC_ENT, KC_SPC KC_PGDN, KC_ENT, KC_SPC
), ),
/* Keymap 1: Symbol Layer /* Keymap 1: Symbol Layer
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | * | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | * | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// SYMBOLS // SYMBOLS
[SYMB] = KEYMAP( [SYMB] = KEYMAP(
// left hand // left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_PAUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// right hand // right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS
), ),
/* Keymap 2: Media and mouse keys /* Keymap 2: Media and mouse keys
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
@ -135,10 +140,6 @@ KEYMAP(
), ),
}; };
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
// MACRODOWN only works in this function // MACRODOWN only works in this function
@ -154,6 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE; return MACRO_NONE;
}; };
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands
};
// Runs just one time when the keyboard initializes. // Runs just one time when the keyboard initializes.
void matrix_init_user(void) { void matrix_init_user(void) {

View File

@ -0,0 +1,14 @@
The kastyle keymap was originally intended to remap the ErgoDox EZ to more
closely approximate the layout of a Kinesis Advantage. Notable changes
over the stock ErgoDox layout include:
* Re-arragnement of tab, enter, space, and delete to match the Kinesis
* Addition of print screen, pause, etc. keys following the kines-ish keymap
on L1
* GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys
are mapped to allow Esc on tap (good for Vi users)
* Most notably, the addition of a momentary one-handed mode for quick and
easy access to keys on the other half of the keyboard, e.g. while using a
mouse in one hand, one may add text to a dialogue box with the other without
having to reach across the keyboard or remove one's hand from the mouse.

View File

@ -0,0 +1,5 @@
# Ergodox EZ for OS X
This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/).

View File

@ -0,0 +1,144 @@
// Media keys work on OSX, but not on Windows.
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // Default layer
#define AUXI 1 // Auxiliary layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ~` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | -_ | += | Bkspc |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | L1 | | Del | Y | U | I | O | P | |\ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | L1 | A | S | D | F | G |------| |------| H | J | K | L | ;: | Enter |
* |--------+------+------+------+------+------| {[ | | }] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | <, | >. | ?/ | "' |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | | | | Esc | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | |Power | |
* ,------|------|------| |------+--------+------.
* | | | | | | | |
* | LGui | LAlt |------| |------| Bkspc |Space |
* | | | | | Del | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1),
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
KC_LCTL, KC_TRNS,KC_TRNS,KC_TRNS,KC_ESC,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_LGUI,KC_LALT,KC_TRNS,
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC,
KC_DELETE, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT,
KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_QUOT,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_PWR, KC_TRNS,
KC_TRNS,
KC_DELETE, KC_BSPC, KC_SPC
),
/* Keymap 1: Auxiliary Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | TRNS | | | Mute | VolDn| VolUp| Play | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | TRNS | |LShift| LCtrl| | |------| |------| LEFT | DOWN | UP |RIGHT | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LShift | | | | | | | | | MPrv | MNxt | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | LGui | LAlt |------| |------| Bkspc| Space|
* | | | | | Del | | |
* `--------------------' `--------------------'
*/
// AUXILIARY
[AUXI] = KEYMAP(
// left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_LSHIFT,KC_LCTL, KC_TRNS, KC_TRNS,
KC_LSHIFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_LGUI, KC_LALT, KC_TRNS,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS,
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS,
KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_PWR, KC_TRNS,
KC_TRNS,
KC_DELETE, KC_BSPC, KC_SPC
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

View File

@ -26,3 +26,4 @@ SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode UNICODE_ENABLE ?= yes # Unicode
ONEHAND_ENABLE ?= yes # Allow swapping hands of keyboard

View File

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../../Makefile
endif

View File

@ -0,0 +1,60 @@
retro_refit keyboard firmware
======================
## Keyboard Info
The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop".
http://imgur.com/a/08Fyj
This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow".
The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y.
```
#define KEYMAP( \
K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \
K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \
K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \
K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \
K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \
K10, K06, K25, K07, K86, K85, K95, K90, K93 \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \
{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \
{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \
{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \
{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \
{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \
}
```
## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme.md](/readme.md).
## Building
Download or clone the whole firmware and navigate to the keyboards/retro_refit 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 file named `<name>.c` and see keymap document (you can find in top readme.md) and existent 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.

View File

@ -0,0 +1,70 @@
/*
* dbroqua HHKB Layout
*/
#include "hhkb.h"
#define BASE 0
#define FN 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* BASE Level: Default Layer
* ,-----------------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
* |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
* |-----------------------------------------------------------------------------------------+
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . | / | Left |Right|
* +-----------------------------------------------------------------------------------------+
* | Gui | Alt | Space | AltGr | fn |
* `----------------------------------------------------------------´
*/
[BASE] = KEYMAP(
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_BSLS, KC_GRV, \
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_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LEFT, KC_RGHT, \
KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(FN)
),
/* BASE Level: Default Layer
* ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del|
* |-----------------------------------------------------------------------------------------+
* | Caps | | | | | | | | | | | Up | | |
* |-----------------------------------------------------------------------------------------+
* | | Vol-| Vol+| Mute| | | |PrtSc| Home| PgUp| Left |Right| |
* |-----------------------------------------------------------------------------------------+
* | | Prev| Play| Next| | | | | End |PgDwn| Down| Up | Down|
* +-----------------------------------------------------------------------------------------+
* | | | | | |
* `----------------------------------------------------------------´
*/
[FN] = KEYMAP(
KC_TRNS, 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_INS, KC_DEL, \
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_UP, KC_DOWN, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};

View File

@ -0,0 +1,9 @@
# Dbroqua Layout
* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01
# Programming Instructions:
Enter into programming mode and run the following command.
```
$ sudo KEYMAP=dbroqua make dfu
```

View File

@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* number of backlight levels */ /* number of backlight levels */
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 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

View File

@ -34,9 +34,9 @@ const uint16_t PROGMEM fn_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | Bksp| * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | Caps/FN1| A | S | D | F | G | H | J | K | L | ; | ' | Enter | * | Caps/FN1| A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
@ -46,11 +46,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------------'
*/ */
[0] = KEYMAP( /* Basic QWERTY */ [0] = KEYMAP( /* Basic QWERTY */
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_GRV, \ 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_BSLS, \
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_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_BSPC, \
LT(_FNCAPS, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ LT(_FNCAPS, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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, MO(_FNRIGHTSHIFT), KC_UP, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FNRIGHTSHIFT), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \
), ),
/* Layer 1 /* Layer 1

View File

@ -41,6 +41,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define USE_I2C // #define USE_I2C
// Use serial if not using I2C
#ifndef USE_I2C
# define USE_SERIAL
#endif
// #define EE_HANDS // #define EE_HANDS
#define I2C_MASTER_LEFT #define I2C_MASTER_LEFT
@ -94,4 +99,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
#endif #endif

View File

@ -6,6 +6,8 @@
#include <stdbool.h> #include <stdbool.h>
#include "i2c.h" #include "i2c.h"
#ifdef USE_I2C
// Limits the amount of we wait for any one i2c transaction. // Limits the amount of we wait for any one i2c transaction.
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
// 9 bits, a single transaction will take around 90μs to complete. // 9 bits, a single transaction will take around 90μs to complete.
@ -157,3 +159,4 @@ ISR(TWI_vect) {
// Reset everything, so we are ready for the next TWI interrupt // Reset everything, so we are ready for the next TWI interrupt
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
} }
#endif

View File

@ -0,0 +1,102 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060
#define DEVICE_VER 0x0001
#define MANUFACTURER Wootpatoot
#define PRODUCT Lets Split
#define DESCRIPTION A split keyboard for the cheap makers
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 8
#define MATRIX_COLS 6
// wiring of each half
#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
#define CATERINA_BOOTLOADER
#define USE_I2C
// Use serial if not using I2C
#ifndef USE_I2C
# define USE_SERIAL
#endif
// #define EE_HANDS
#define I2C_MASTER_LEFT
// #define I2C_MASTER_RIGHT
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* ws2812 RGB LED */
#define RGB_DI_PIN D4
#define RGBLIGHT_TIMER
#define RGBLED_NUM 8 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

View File

@ -0,0 +1,214 @@
#include "lets_split.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
ADJUST,
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = KEYMAP( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = KEYMAP( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = KEYMAP( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

View File

@ -0,0 +1,102 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060
#define DEVICE_VER 0x0001
#define MANUFACTURER Wootpatoot
#define PRODUCT Lets Split
#define DESCRIPTION A split keyboard for the cheap makers
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 8
#define MATRIX_COLS 6
// wiring of each half
#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
#define CATERINA_BOOTLOADER
// #define USE_I2C
// Use serial if not using I2C
#ifndef USE_I2C
# define USE_SERIAL
#endif
// #define EE_HANDS
#define I2C_MASTER_LEFT
// #define I2C_MASTER_RIGHT
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* ws2812 RGB LED */
#define RGB_DI_PIN D4
#define RGBLIGHT_TIMER
#define RGBLED_NUM 8 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

View File

@ -0,0 +1,214 @@
#include "lets_split.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
ADJUST,
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = KEYMAP( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = KEYMAP( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = KEYMAP( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

View File

@ -24,7 +24,9 @@ void matrix_init_kb(void) {
}; };
void shutdown_user(void) { void shutdown_user(void) {
PLAY_NOTE_ARRAY(tone_goodbye, false, 0); #ifdef AUDIO_ENABLE
_delay_ms(150); PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
stop_all_notes(); _delay_ms(150);
stop_all_notes();
#endif
} }

View File

@ -28,14 +28,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h" #include "debug.h"
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#include "i2c.h"
#include "serial.h"
#include "split_util.h" #include "split_util.h"
#include "pro_micro.h" #include "pro_micro.h"
#include "config.h" #include "config.h"
#ifdef USE_I2C
# include "i2c.h"
#else // USE_SERIAL
# include "serial.h"
#endif
#ifndef DEBOUNCE #ifndef DEBOUNCE
# define DEBOUNCE 5 # define DEBOUNCE 5
#endif #endif
#define ERROR_DISCONNECT_COUNT 5 #define ERROR_DISCONNECT_COUNT 5
@ -145,6 +149,8 @@ uint8_t _matrix_scan(void)
return 1; return 1;
} }
#ifdef USE_I2C
// Get rows from other half over i2c // Get rows from other half over i2c
int i2c_transaction(void) { int i2c_transaction(void) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
@ -176,7 +182,8 @@ i2c_error: // the cable is disconnceted, or something else went wrong
return 0; return 0;
} }
#ifndef USE_I2C #else // USE_SERIAL
int serial_transaction(void) { int serial_transaction(void) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
@ -199,7 +206,7 @@ uint8_t matrix_scan(void)
#ifdef USE_I2C #ifdef USE_I2C
if( i2c_transaction() ) { if( i2c_transaction() ) {
#else #else // USE_SERIAL
if( serial_transaction() ) { if( serial_transaction() ) {
#endif #endif
// turn on the indicator led when halves are disconnected // turn on the indicator led when halves are disconnected
@ -235,7 +242,7 @@ void matrix_slave_scan(void) {
/* i2c_slave_buffer[i] = matrix[offset+i]; */ /* i2c_slave_buffer[i] = matrix[offset+i]; */
i2c_slave_buffer[i] = matrix[offset+i]; i2c_slave_buffer[i] = matrix[offset+i];
} }
#else #else // USE_SERIAL
for (int i = 0; i < ROWS_PER_HAND; ++i) { for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_slave_buffer[i] = matrix[offset+i]; serial_slave_buffer[i] = matrix[offset+i];
} }
@ -290,7 +297,7 @@ static void init_cols(void)
static matrix_row_t read_cols(void) static matrix_row_t read_cols(void)
{ {
matrix_row_t result = 0; matrix_row_t result = 0;
for(int x = 0; x < MATRIX_COLS; x++) { for(int x = 0; x < MATRIX_COLS; x++) {
result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
} }
return result; return result;
@ -298,7 +305,7 @@ static matrix_row_t read_cols(void)
static void unselect_rows(void) static void unselect_rows(void)
{ {
for(int x = 0; x < ROWS_PER_HAND; x++) { for(int x = 0; x < ROWS_PER_HAND; x++) {
_SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
_SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
} }

View File

@ -52,7 +52,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
OPT_DEFS += -DBOOTLOADER_SIZE=4096 OPT_DEFS += -DBOOTLOADER_SIZE=4096
# 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)
@ -71,4 +71,4 @@ RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes CUSTOM_MATRIX = yes

View File

@ -10,9 +10,10 @@
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <util/delay.h> #include <util/delay.h>
#include <stdbool.h> #include <stdbool.h>
#include "serial.h" #include "serial.h"
#ifdef USE_SERIAL
// Serial pulse period in microseconds. Its probably a bad idea to lower this // Serial pulse period in microseconds. Its probably a bad idea to lower this
// value. // value.
#define SERIAL_DELAY 24 #define SERIAL_DELAY 24
@ -223,3 +224,5 @@ int serial_update_buffers(void) {
sei(); sei();
return 0; return 0;
} }
#endif

View File

@ -6,11 +6,15 @@
#include <avr/eeprom.h> #include <avr/eeprom.h>
#include "split_util.h" #include "split_util.h"
#include "matrix.h" #include "matrix.h"
#include "i2c.h"
#include "serial.h"
#include "keyboard.h" #include "keyboard.h"
#include "config.h" #include "config.h"
#ifdef USE_I2C
# include "i2c.h"
#else
# include "serial.h"
#endif
volatile bool isLeftHand = true; volatile bool isLeftHand = true;
static void setup_handedness(void) { static void setup_handedness(void) {

View File

@ -14,14 +14,21 @@ extern keymap_config_t keymap_config;
#define _BASE 0 #define _BASE 0
#define _MOVE 1 #define _MOVE 1
#define _SYMB 2 #define _SYMB 2
#define _FUNC 3 #define _MOUSE 3
#define _FUNC 4
enum planck_keycodes { enum planck_keycodes {
BASE = SAFE_RANGE, MOVE = SAFE_RANGE,
MOVE,
SYMB, SYMB,
FUNC, FUNC,
LOCK CMDLEFT,
CMDRGHT,
BELOW,
ABOVE,
DASH,
GBP,
VOLUP,
VOLDN
}; };
// Fillers to make layering more clear // Fillers to make layering more clear
@ -33,73 +40,91 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* BASE /* BASE
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | * | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_BASE] = { [_BASE] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS},
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
{FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, FUNC }
}, },
/* MOVE /* MOVE
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | | Left | Down |Right | | | Left | Down |Right | | Del |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | |Pg Up |Pg Dn | | |Pg Dn |Pg Up | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | * | Del | | Left | Down | Right| | | Left | Down | Right| | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | Below| | | | | | |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_MOVE] = { [_MOVE] = {
{KC_ESC, _______, KC_HOME, KC_UP, KC_END, _______, _______, KC_HOME, KC_UP, KC_END, _______, KC_ESC}, {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC },
{KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL}, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
{_______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______}, {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______}
}, },
/* SYMB /* SYMB
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |-----------------------------------------------------------------------------------. * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ |
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | * | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_SYMB] = { [_SYMB] = {
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC }, {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH },
{KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP },
{_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}, },
/* MOUSE
* ,-----------------------------------------------------------------------------------.
* | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | SW-D | SW-U | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_MOUSE] = {
{XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, XXXXXXX, XXXXXXX, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX},
{_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
},
/* FUNC /* FUNC
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ |
* |-----------------------------------------------------------------------------------.
* | | Play | Prev | Next | BL+ | | | Lock | | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | Mute | Vol- | Vol+ | BL- | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |Reset | * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F21 | F22 | F23 | F24 | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | Prev | Mute | Play | Next | | | | |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_FUNC] = { [_FUNC] = {
{KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP },
{_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______}, {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN },
{_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______}, {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______}
} }
}; };
@ -109,20 +134,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case MOVE: case MOVE:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_MOVE); layer_on(_MOVE);
update_tri_layer(_MOVE, _SYMB, _FUNC); update_tri_layer(_MOVE, _SYMB, _MOUSE);
} else { } else {
layer_off(_MOVE); layer_off(_MOVE);
update_tri_layer(_MOVE, _SYMB, _FUNC); update_tri_layer(_MOVE, _SYMB, _MOUSE);
} }
return false; return false;
break; break;
case SYMB: case SYMB:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_SYMB); layer_on(_SYMB);
update_tri_layer(_MOVE, _SYMB, _FUNC); update_tri_layer(_MOVE, _SYMB, _MOUSE);
} else { } else {
layer_off(_SYMB); layer_off(_SYMB);
update_tri_layer(_MOVE, _SYMB, _FUNC); update_tri_layer(_MOVE, _SYMB, _MOUSE);
} }
return false; return false;
break; break;
@ -134,15 +159,91 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case LOCK: case CMDLEFT:
if (record->event.pressed) { if (record->event.pressed) {
register_code(KC_RSFT); register_code(KC_LGUI);
register_code(KC_RCTL); register_code(KC_LEFT);
register_code(KC_POWER);
} else { } else {
unregister_code(KC_POWER); unregister_code(KC_LEFT);
unregister_code(KC_RCTL); unregister_code(KC_LGUI);
unregister_code(KC_RSFT); }
return false;
break;
case CMDRGHT:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_RGHT);
} else {
unregister_code(KC_RGHT);
unregister_code(KC_LGUI);
}
return false;
break;
case BELOW:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_RGHT);
unregister_code(KC_RGHT);
unregister_code(KC_LGUI);
register_code(KC_ENT);
unregister_code(KC_ENT);
}
return false;
break;
case ABOVE:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_LEFT);
unregister_code(KC_LEFT);
unregister_code(KC_LGUI);
register_code(KC_ENT);
unregister_code(KC_ENT);
register_code(KC_UP);
unregister_code(KC_UP);
}
return false;
break;
case DASH:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_MINS);
} else {
unregister_code(KC_MINS);
unregister_code(KC_LALT);
}
return false;
break;
case GBP:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_3);
} else {
unregister_code(KC_3);
unregister_code(KC_LALT);
}
return false;
break;
case VOLUP:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_LSFT);
register_code(KC_VOLU);
} else {
unregister_code(KC_VOLU);
unregister_code(KC_LSFT);
unregister_code(KC_LALT);
}
return false;
break;
case VOLDN:
if (record->event.pressed) {
register_code(KC_LALT);
register_code(KC_LSFT);
register_code(KC_VOLD);
} else {
unregister_code(KC_VOLD);
unregister_code(KC_LSFT);
unregister_code(KC_LALT);
} }
return false; return false;
break; break;

View File

@ -2,42 +2,70 @@
This is a layout for the grid planck, built with a few ideals in mind: This is a layout for the grid planck, built with a few ideals in mind:
- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. - Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided they inevitably send their keycode later than a normal key interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key.
- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible.
- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make.
- Backspace should be in the “capslock position” in the colemak tradition.
We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation.
## The `BASE` layer ```
![](http://i.imgur.com/tVNI3SE.png) /* BASE
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func |
* `-----------------------------------------------------------------------------------'
*/
This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I dont really use the bottom corners so theres nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and its probably my next most used key that didnt yet have a home. /* MOVE
* ,-----------------------------------------------------------------------------------.
* | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | | Left | Down | Right| | | Left | Down | Right| | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | Below| | | | | | |
* `-----------------------------------------------------------------------------------'
*/
The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. /* SYMB
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
## The `MOVE` layer /* MOUSE
![](http://i.imgur.com/KXRSuHT.png) * ,-----------------------------------------------------------------------------------.
* | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | SW-D | SW-U | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if its needed. /* FUNC
* ,-----------------------------------------------------------------------------------.
On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `home` and `end` jump you to the beginning and end of the line respectively and so that `pg up` and `pg dn` move the cursor instead of just scrolling. * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
* |------+------+------+------+------+------+------+------+------+------+------+------|
## The `SYMB` layer * | | F21 | F22 | F23 | F24 | | | | | | | |
![](http://i.imgur.com/thh1ne2.png) * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | Prev | Mute | Play | Next | | | | |
The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. * `-----------------------------------------------------------------------------------'
*/
`esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand. ```
Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected.
## The `FUNC` layer
![](http://i.imgur.com/1VKFBBU.png)
The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.)
## Other changes from the default
I have LEDs and sound disabled, simply because I have no need of them.

View File

@ -3,6 +3,9 @@
#include "../../config.h" #include "../../config.h"
#define LEADER_TIMEOUT 300
#define BACKLIGHT_BREATHING
/* cbbrowne user configuration */ /* cbbrowne user configuration */
#define randadd 53 #define randadd 53
@ -16,5 +19,3 @@
#endif #endif

View File

@ -65,10 +65,11 @@
*/ */
enum layers { enum layers {
_QW = 0, /* Qwerty mapping */ _QWERTY = 0, /* Qwerty mapping */
_LW, /* Lower layer, where top line has symbols !@#$%^&*() */ _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */
_RS, /* Raised layer, where top line has digits 1234567890 */ _RAISE, /* Raised layer, where top line has digits 1234567890 */
_KP, /* Key pad */ _KEYPAD, /* Key pad */
_ADJUST, /* Special Adjust layer coming via tri-placement */
}; };
enum macro_id { enum macro_id {
@ -76,37 +77,60 @@ enum macro_id {
M_USERNAME, M_USERNAME,
M_RANDDIGIT, M_RANDDIGIT,
M_RANDLETTER, M_RANDLETTER,
M_VERSION M_VERSION,
MACRO_UPPER,
MACRO_LOWER,
}; };
#define M_LOWER M(MACRO_LOWER)
#define M_UPPER M(MACRO_UPPER)
#define ROT_LED M(M_LED) /* Rotate LED */
#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */
#define KEYPAD DF(_KEYPAD) /* Switch to keypad */
#define USERNAME M(M_USERNAME) /* shortcut for username */
#define RANDDIG M(M_RANDDIGIT)
#define RANDALP M(M_RANDLETTER)
#define CTLENTER MT(MOD_RCTL, KC_ENT)
#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT)
#define ALTRIGHT MT(MOD_LALT, KC_RGHT)
#define MVERSION M(M_VERSION)
/* Note that Planck has dimensions 4 rows x 12 columns */ /* Note that Planck has dimensions 4 rows x 12 columns */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = { /* Qwerty */ [_QWERTY] = { /* Qwerty */
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE },
{KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT}
/* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */
}, },
[_RS] = { /* RAISE */ [_RAISE] = { /* RAISE */
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_KP), DF(_KP), RESET, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}, },
[_LW] = { /* LOWER */ [_LOWER] = { /* LOWER */
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_KP), DF(_KP), RESET, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______},
{_______, DF(_KP), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[_KEYPAD] = { /* Key Pad */
{KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC},
{KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE},
{KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER},
{KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
}, },
[_KP] = { /* Key Pad */
{KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */
{KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ },
} {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
}
}; };
/* What is fn_actions actually used for??? */ /* What is fn_actions actually used for??? */
@ -171,6 +195,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code (KC_A + rval); unregister_code (KC_A + rval);
} }
break; break;
case MACRO_UPPER:
if (record->event.pressed)
{
layer_on(_RAISE);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case MACRO_LOWER:
if (record->event.pressed)
{
layer_on(_LOWER);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
} }
return MACRO_NONE; return MACRO_NONE;
}; };

View File

@ -24,7 +24,26 @@ doing sundry experimentation:
- Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random
- Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random
- Key [1][3] aka "e" spits out the keymap version number - Key [1][3] aka "e" spits out the keymap version number
* Minor use of Space Cadet Shift; my SHIFT key has switched to KC_LSP0, so that when I just hit SHIFT, I get a left parens: ( which is great for Lisping. I don't have a Right Shift, so I don't get an autoclose; I think I'll live with that until a Planck successor with more lines of keys :-) * Trying out sgoodwin's "hold Enter down to get Shift"
- Liking this Quite Well Enough...
- Applied this to both Shift and Quote
- It seems likely that Alt should get a right-hand-side, akin to this...
- Alt needs to move, and get a RHS
- Hence ALTRIGHT, and shifted ROT_LED over
- Emacs likes this!!! :-)
- I'm suspicious that I'll want to shift ROT_LED another location over,
so some modifier can replace the OS/KC_LGUI key
* I have added an alternate ADJUST layer that is activated via update_tri_layer()
- e.g. - LOWER+RAISE simultaneously
- This seems entirely more useful for handling my "special keys"
like the random numbers, user name, and such, than the keypad layer
* The _ADJUST layer provides a good place to have RESET
- But this isn't strictly enough; I want RESET somewhat accessible from
main layer lest an error hide that layer
- I never use the OS/KC_LGUI key (that's Command on MacOS, Windows
Key on Windows), so that's a good place to have it as a chord of
some sort
2. Some code structure ideas 2. Some code structure ideas
--------------------------------------------------- ---------------------------------------------------
@ -43,8 +62,8 @@ doing sundry experimentation:
only need to fit 4 symbols onto each line, rather than 12. only need to fit 4 symbols onto each line, rather than 12.
I used enums to manage layer IDs and macro IDs so that I don't need I used enums to manage layer IDs and macro IDs so that I don't need
to care (beyond "start at 0", and arguably that's not needed) about to care (beyond "start at 0", and arguably even that's not needed)
their values. about their values.
3. Things I did not like about the default mapping 3. Things I did not like about the default mapping
--------------------------------------------------------- ---------------------------------------------------------
@ -57,12 +76,27 @@ doing sundry experimentation:
and shift ESC off the first column so KC_LCTL and KC_LALT can and shift ESC off the first column so KC_LCTL and KC_LALT can
be on the first column. be on the first column.
* I needed to swap ' and ENTER * I needed to swap ' and ENTER
4. Unuseful experiments
---------------------------------------------------------
I have tried some things out that didn't turn out particularly well.
I'll note some of these for posterity, hopefully helpful in not doing
unwise things again...
* I tried added Workman alongside Dvorak and Colemak * I tried added Workman alongside Dvorak and Colemak
- Boy, oh boy, these don't help!!! - Boy, oh boy, these don't help!!!
- I have done 30 years of learning of Emacs key mappings, and - I have done 30 years of learning of Emacs key mappings, and
these alternative keyboards massively mess me up these alternative keyboards massively mess me up
4. TODO * Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I
just hit SHIFT, I get a left parens. In principle, this is great
for Lisping.
- Unfortunately, there are times when mouse interfaces use SHIFT
to allow selecting multiple items, and this really interferes
with that
5. TODO
--------------------------------------------------------- ---------------------------------------------------------
* I use tmux quite a lot; the mollat keymap seems to have some * I use tmux quite a lot; the mollat keymap seems to have some
@ -77,4 +111,3 @@ doing sundry experimentation:
* The jeebak keymap seems to have some neat ideas: * The jeebak keymap seems to have some neat ideas:
- Number layer which is aggressive about having numbers in several places - Number layer which is aggressive about having numbers in several places
- Touch layer seems interesting - Touch layer seems interesting
* Trying out sgoodwin's "hold Enter down to get Shift"

View File

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

View File

@ -0,0 +1,242 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.
#include "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _WORKMAN 0
#define _FN 1
#define _QWERTY 2
#define _QW_FN 3
#define _PLOVER 4
#define _ADJ 5
enum planck_keycodes {
WORKMAN = SAFE_RANGE,
QWERTY,
PLOVER
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Workman Alpha-numeric
* ,-----------------------------------------------------------------------------------------------.
* | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 |
* |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
* | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent|
* `-----------------------------------------------------------------------------------------------'
*/
[_WORKMAN] = {
{KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9},
{KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6},
{KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3},
{ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)}
},
/* FN-key held (Workman)
* ,-----------------------------------------------------------------------------------------------.
* | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 |
* |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
* | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* |Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent|
* `-----------------------------------------------------------------------------------------------'
*/
[_FN] = {
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9},
{KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6},
{KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3},
{_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______}
},
/* Qwerty
* ,-----------------------------------------------------------------------------------------------.
* |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
* | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / |
* |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
* | Shift | A | S | D | F | G | H | J | K | L | ; | " |
* |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
* |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent|
* `-----------------------------------------------------------------------------------------------'
*/
[_QWERTY] = {
{GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT},
{KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)},
},
/* FN-key held (Qwerty)
* ,-----------------------------------------------------------------------------------------------.
* | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | |
* |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
* |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent|
* `-----------------------------------------------------------------------------------------------'
*/
[_QW_FN] = {
{KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11},
{_______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12},
{_______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX},
{_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______}
},
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------------------.
* | S | T | P | H | * | F | P | L | T | D | | |
* |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
* | S | K | W | R | * | R | B | G | S | Z | | |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* | # | # | # | # | | # | # | # | # | # | | |
* |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
* | | | A | O | | E | U | | | | |Adj/Ent|
* `-----------------------------------------------------------------------------------------------'
*/
[_PLOVER] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX},
{KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)}
},
/* Adjust
* ,-----------------------------------------------------------------------------------------------.
* | | | | | | | | | Insert| PrtSc | Pause | RESET |
* |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
* | | | | | | | | CapLk |Voice +| Audio |MIDIoff| |
* |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
* | | | | | | | | ScrLk |Voice -| Music |MIDI on| |
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
* | | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent|
* `-----------------------------------------------------------------------------------------------'
*/
[_ADJ] = {
{_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET},
{_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______},
{_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______},
{_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______}
}
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float tone_workman[][2] = SONG(QWERTY_SOUND);
float tone_qwerty[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case WORKMAN:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_workman, false, 0);
#endif
persistant_default_layer_set(1UL<<_WORKMAN);
}
return false;
break;
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case PLOVER:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_plover, false, 0);
#endif
if (!eeconfig_is_enabled()) {
eeconfig_init();
}
keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
persistant_default_layer_set(1UL<<_PLOVER);
}
return false;
break;
}
return true;
}
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
startup_user();
#endif
}
#ifdef AUDIO_ENABLE
void startup_user()
{
_delay_ms(20); // gets rid of tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
}
void shutdown_user()
{
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
_delay_ms(150);
stop_all_notes();
}
void music_on_user(void)
{
music_scale_user();
}
void music_scale_user(void)
{
PLAY_NOTE_ARRAY(music_scale, false, 0);
}
#endif

View File

@ -0,0 +1,73 @@
# The Impossible Layout
The Impossible Layout is named such because it manages to fit in both a numpad and an inverted-T arrow cluster into the same layer as the alpha keys.
## Main layout
The Impossible Layout places the middle column of the alphas onto where the punctuation keys were, moving he most used punctuation to be accessed by the thumbs. Because removing the middle columns fits with the Workman layout's philosopy, Workman is used as the basis for the layout. This means the layout should be very easy to learn for Workman users, and reasonable for Colemak users. Other space gains are made by combining keys that are only ever chorded with other non symbol keys (with function-layer alternatives where needed).
### Alpha-numeric layer
| | | | | | | | | | | | |
|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
| Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 |
| A | S | H | T | G | N | E | O | I | 4 | 5 | 6 |
| Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 |
|Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent|
### Function layer
| | | | | | | | | | | | |
|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
| ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 |
| Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 |
| Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 |
|Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent|
## Qwerty
The Qwerty layer, mostly intended for gaming use, makes use of the doubled chorded/non-symbolic keys to obtain use of the entire alpha-numeric typing area.
### Qwerty layer
| | | | | | | | | | | | |
|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
|Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
| Ctrl | Q | W | E | R | T | Y | U | I | O | P | / |
| Shift | A | S | D | F | G | H | J | K | L | ; | " |
|Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent|
### Qwerty Fn Layer
| | | | | | | | | | | | |
|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
| Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
| Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 |
| Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | |
|Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent|
## Stenography
The Steno/Plover layer moves the number row below the regular keys, providing a much more comfortable placement for the thumb keys. Using this layout will require a slightly different dictionary to account for different keys being adjacent to the number row.
### Steno Layer
| | | | | | | | | | | | |
|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
| S | T | P | H | * | F | P | L | T | D | | |
| S | K | W | R | * | R | B | G | S | Z | | |
| # | # | # | # | | # | # | # | # | # | | |
| | | A | O | | E | U | | | | |Adj/Ent|
## Adjustments and Options
In order to switch between layouts and change other keyboard settings, an adjustment layer is accessible from the same position over any layout.
### Adjustment Layer
| | | | | | | | | | | | |
|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
| | | | | | | | | Insert| PrtSc | Pause | RESET |
| | | | | | | | CapLk |Voice +| Audio |MIDIoff| |
| | | | | | | | ScrLk |Voice -| Music |MIDI on| |
| | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent|

View File

@ -43,6 +43,15 @@ enum keyboard_macros {
MACRO_MOUSE_MOVE_UR, MACRO_MOUSE_MOVE_UR,
MACRO_MOUSE_MOVE_DL, MACRO_MOUSE_MOVE_DL,
MACRO_MOUSE_MOVE_DR, MACRO_MOUSE_MOVE_DR,
MACRO_HELP_1,
MACRO_HELP_2,
MACRO_HELP_3,
MACRO_HELP_4,
MACRO_HELP_5,
MACRO_HELP_6,
MACRO_HELP_7,
MACRO_HELP_8,
MACRO_HELP_9,
}; };
#define M_QWRTY M(MACRO_QWERTY) #define M_QWRTY M(MACRO_QWERTY)
@ -66,6 +75,15 @@ enum keyboard_macros {
#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) #define M_MS_UR M(MACRO_MOUSE_MOVE_UR)
#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) #define M_MS_DL M(MACRO_MOUSE_MOVE_DL)
#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) #define M_MS_DR M(MACRO_MOUSE_MOVE_DR)
#define M_HELP1 M(MACRO_HELP_1)
#define M_HELP2 M(MACRO_HELP_2)
#define M_HELP3 M(MACRO_HELP_3)
#define M_HELP4 M(MACRO_HELP_4)
#define M_HELP5 M(MACRO_HELP_5)
#define M_HELP6 M(MACRO_HELP_6)
#define M_HELP7 M(MACRO_HELP_7)
#define M_HELP8 M(MACRO_HELP_8)
#define M_HELP9 M(MACRO_HELP_9)
#define VC_UP M(MACRO_INC_VOICE) #define VC_UP M(MACRO_INC_VOICE)
@ -104,14 +122,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT | | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT |
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_QWERTY] = { [LAYER_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_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_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT },
{ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_ENT }, { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_ENT },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT } { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT }
}, },
/* LAYER = LAYER_UPPER /* LAYER = LAYER_UPPER
.-----------------------------------------------------------------------------------------------------------. .-----------------------------------------------------------------------------------------------------------.
| PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL | | PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL |
@ -123,14 +139,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END | | ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END |
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_UPPER] = { [LAYER_UPPER] = {
{ KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL },
{ KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS }, { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS },
{ _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME }, { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME },
{ _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END } { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END }
}, },
/* LAYER = LAYER_LOWER /* LAYER = LAYER_LOWER
.-----------------------------------------------------------------------------------------------------------. .-----------------------------------------------------------------------------------------------------------.
| ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP |
@ -142,14 +156,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END |
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_LOWER] = { [LAYER_LOWER] = {
{ _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP }, { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP },
{ _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN }, { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN },
{ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME }, { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME },
{ _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END } { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END }
}, },
/* LAYER = LAYER_FUNCTION /* LAYER = LAYER_FUNCTION
.-----------------------------------------------------------------------------------------------------------. .-----------------------------------------------------------------------------------------------------------.
| XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
@ -161,16 +173,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT | | ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT |
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_FUNCTION] = { [LAYER_FUNCTION] = {
{ XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE }, { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE },
{ _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }
}, },
#ifdef MOUSEKEY_ENABLE
/* LAYER = LAYER_MOUSE /* LAYER = LAYER_MOUSE
.-----------------------------------------------------------------------------------------------------------. .-----------------------------------------------------------------------------------------------------------.
| ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR | | ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR |
@ -182,32 +190,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R | | ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R |
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_MOUSE] = { [LAYER_MOUSE] = {
{ KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R }, { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R },
{ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U }, { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U },
{ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D }, { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D },
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }
}, },
#endif
/* LAYER = LAYER_ADJUST /* LAYER = LAYER_ADJUST
.-----------------------------------------------------------------------------------------------------------. .-----------------------------------------------------------------------------------------------------------.
| XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MUSIC | AUDIO | | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | MUSIC | AUDIO |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | VOICE+ | XXXXXX | | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | VOICE+ | XXXXXX |
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | XXXXXX | TEMPO- | VOICE- | TEMPO+ | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | XXXXXX | TEMPO- | VOICE- | TEMPO+ |
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_ADJUST] = { [LAYER_ADJUST] = {
{ XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG , AU_TOG }, { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , TG_NKRO, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP }
}, },
@ -247,6 +250,69 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) switch(id)
{ {
case MACRO_HELP_1:
if (record->event.pressed)
{
uprintf("1");
}
break;
case MACRO_HELP_2:
if (record->event.pressed)
{
uprintf("2");
}
break;
case MACRO_HELP_3:
if (record->event.pressed)
{
uprintf("3");
}
break;
case MACRO_HELP_4:
if (record->event.pressed)
{
uprintf("4");
}
break;
case MACRO_HELP_5:
if (record->event.pressed)
{
uprintf("5");
}
break;
case MACRO_HELP_6:
if (record->event.pressed)
{
uprintf("6");
}
break;
case MACRO_HELP_7:
if (record->event.pressed)
{
uprintf("7");
}
break;
case MACRO_HELP_8:
if (record->event.pressed)
{
uprintf("8");
}
break;
case MACRO_HELP_9:
if (record->event.pressed)
{
uprintf("9");
}
break;
case MACRO_BREATH_TOGGLE: case MACRO_BREATH_TOGGLE:
if (record->event.pressed) if (record->event.pressed)
{ {

View File

@ -1,26 +0,0 @@
retro_refit keyboard firmware
======================
## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme.md](/readme.md).
## Building
Download or clone the whole firmware and navigate to the keyboards/retro_refit 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 file named `<name>.c` and see keymap document (you can find in top readme.md) and existent 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.

97
keyboards/tada68/config.h Normal file
View File

@ -0,0 +1,97 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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 0x0003
#define MANUFACTURER TADA
#define PRODUCT TADA68
#define DESCRIPTION QMK keyboard firmware for TADA68 with WS2812 support
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
// ROWS: Top to bottom, COLS: Left to right
#define MATRIX_ROW_PINS {D0,D1,F6,F7,D5}
#define MATRIX_COL_PINS {F0,F1,E6,C7,C6,B7,D4,B1,B0,B5,B4,D7,D6,B3,F4}
#define UNUSED_PINS
#define BACKLIGHT_PIN B6
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 4
/* Underlight configuration
*/
/*#define RGB_DI_PIN E2
#define RGBLIGHT_TIMER
#define RGBLED_NUM 2 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17*/
//Disabled while I figure out a suitable pin for RGB support.
//I've tried F5, D2, D3, and E2 but it's possible the end of my
//strand is bad. New LEDs on order.
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

View File

@ -0,0 +1,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 = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = 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

View File

@ -0,0 +1,98 @@
#include "tada68.h"
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,----------------------------------------------------------------.
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del |
* |----------------------------------------------------------------|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |----------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[_BL] = KEYMAP_ANSI(
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_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS,KC_DEL, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
/* Keymap _FL: Function Layer
* ,----------------------------------------------------------------.
* | | | | | | | | | | | | | | RESET| |
* |----------------------------------------------------------------|
* | | | | | | | | | | | |BL-|BL+|BL | |
* |----------------------------------------------------------------|
* | | | | | | | | | | | | | |
* |----------------------------------------------------------------|
* | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | | |
* |----------------------------------------------------------------|
* | | | | | | | | | | |
* `----------------------------------------------------------------'
*/
[_FL] = KEYMAP_ANSI(
#ifdef RGBLIGHT_ENABLE
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
_______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, \
_______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
#else
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
_______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
#endif
};
/*enum function_id {
//SHIFT_ESC,
};
const uint16_t PROGMEM fn_actions[] = {
//[0] = ACTION_FUNCTION(SHIFT_ESC),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t shift_esc_shift_mask;
switch (id) {
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
}
}*/

View File

@ -0,0 +1 @@
# default TADA68 layout

View File

@ -0,0 +1,4 @@
TADA68 keyboard firmware
======================
TODO: to be updated.

66
keyboards/tada68/rules.mk Normal file
View File

@ -0,0 +1,66 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# 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
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID

30
keyboards/tada68/tada68.c Normal file
View File

@ -0,0 +1,30 @@
#include "tada68.h"
#include "led.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
led_init_ports();
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
};
void led_init_ports(void) {
// * Set our LED pins as output
DDRB |= (1<<2);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
PORTB &= ~(1<<2);
} else {
// Turn capslock off
PORTB |= (1<<2);
}
}

43
keyboards/tada68/tada68.h Normal file
View File

@ -0,0 +1,43 @@
#ifndef TADA68_H
#define TADA68_H
#include "quantum.h"
// readability
#define XXX KC_NO
/* TADA68 ANSI layout
* ,----------------------------------------------------------------.
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e |
* |----------------------------------------------------------------|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e |
* |----------------------------------------------------------------|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | 2e |
* |----------------------------------------------------------------|
* | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e |
* |----------------------------------------------------------------|
* | 40 | 41 | 42 | 45 | 49| 4a| 4b| 4c| 4d| 4e |
* `----------------------------------------------------------------'
*/
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP_ANSI( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k45, k49, k4a, k4b, k4c, k4d, k4e \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e}, \
{k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

View File

@ -26,10 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
// #define BACKLIGHT_PIN B7 #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCING_DELAY 5
@ -124,10 +123,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* disable debug print */ /* disable debug print */
//#define NO_DEBUG // #ifndef NO_DEBUG
// # define NO_DEBUG
// #endif
/* disable print */ /* disable print */
//#define NO_PRINT // #ifndef NO_PRINT
// # define NO_PRINT
// #endif
/* Only print user print statements */
// #define USER_PRINT
/* disable action features */ /* disable action features */
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER

View File

@ -2,19 +2,19 @@
# 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 = yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration 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 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 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # 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.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR ifndef QUANTUM_DIR
include ../../../../Makefile include ../../../../Makefile

View File

@ -4,25 +4,44 @@
#include "../../config.h" #include "../../config.h"
#include "matrix_types.h" #include "matrix_types.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID GET_PID(NUMERIC_NORMAL, HOMING_MAX_TEENSY)
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER IBNobody #define MANUFACTURER IBNobody
#define PRODUCT Vision Division #define PRODUCT Vision Division
#define DESCRIPTION Full / Split Keyboard #define DESCRIPTION Full / Split Keyboard
#define MATRIX_ROWS 6
#define MATRIX_ROWS 6
#define MATRIX_ROW_PINS { C2, C3, F4, F5, F6, F7 } #define MATRIX_ROW_PINS { C2, C3, F4, F5, F6, F7 }
#define MATRIX_COLS GET_MATRIX_COLS(NUMERIC_NORMAL, HOMING_MAX_TEENSY) // !!! MAKE SURE THAT THE LEFT/RIGHT PCB DEFINES MATCH ON ALL OF THESE COLUMNS
#define MATRIX_COL_PINS GET_MATRIX_COL_PINS(NUMERIC_NORMAL, HOMING_MAX_TEENSY)
#define UNUSED_PINS // **LEFT** **RIGHT**
#define PRODUCT_ID GET_PID( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
#define MATRIX_COLS GET_MATRIX_COLS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
#define MATRIX_COL_PINS GET_MATRIX_COL_PINS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
/*#define KEYMAP( \ #define KEYMAP(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
) \
KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, KC_NO, KC_NO, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
)
// Example Keymap Macros
/*
#define KEYMAP(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
@ -30,16 +49,18 @@
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
) \ ) \
KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
)*/ )
*/
#define KEYMAP( \ /*
#define KEYMAP(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \
@ -47,7 +68,7 @@ KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \
) \ ) \
KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \
@ -55,5 +76,6 @@ KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, KC_NO, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, KC_NO, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \
) )
*/
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -139,28 +139,29 @@
// Changable Row Macro // Changable Row Macro
#define KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, \ #define _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C \ k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C \
) \ ) \
KEYMAP_ROW_LEFT_ ## LEFT_TYPE(k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C), KEYMAP_ROW_RIGHT_ ## RIGHT_TYPE(k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C) KEYMAP_ROW_LEFT_ ## _LEFT_TYPE( k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C ), \
KEYMAP_ROW_RIGHT_ ## _RIGHT_TYPE( k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C )
// Changable Master Macro // Changable Master Macro
#define KEYMAP_MASTER(LEFT_TYPE, RIGHT_TYPE, \ #define KEYMAP_MASTER(_MATRIX_LAYER, _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \ k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C \
) \ ) \
{ \ [_MATRIX_LAYER] = { \
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\ { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\ { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\ { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\ { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\ { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\ { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
} }

View File

@ -1,6 +1,12 @@
vision_division keyboard firmware vision_division keyboard firmware
====================== ======================
## Keyboard Info
[See this thread.](https://geekhack.org/index.php?topic=83692.msg2227856#msg2227856)
Vision/Division is a full size or split keyboard that can be customized due to its pcb.
## Quantum MK Firmware ## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).

View File

@ -63,7 +63,7 @@ COMMAND_ENABLE ?= yes # Commands for debug and configuration
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 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 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= yes # USB Nkey Rollover NKRO_ENABLE ?= yes # USB Nkey Rollover
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE ?= no # MIDI controls MIDI_ENABLE ?= no # MIDI controls
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

View File

@ -24,5 +24,45 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (usb_led & (1 << USB_LED_CAPS_LOCK))
{
// HI
DDRD |= (1<<4);
PORTD |= (1<<4);
}
else
{
// Hi-Z
DDRD &= ~(1<<4);
PORTD &= ~(1<<4);
}
if (usb_led & (1 << USB_LED_NUM_LOCK))
{
// HI
DDRD |= (1<<5);
PORTD |= (1<<5);
}
else
{
// Hi-Z
DDRD &= ~(1<<5);
PORTD &= ~(1<<5);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK))
{
// HI
DDRD |= (1<<6);
PORTD |= (1<<6);
}
else
{
// Hi-Z
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
led_set_user(usb_led); led_set_user(usb_led);
} }

View File

@ -70,6 +70,10 @@
#define DV_LCBR LSFT(DV_LBRC) #define DV_LCBR LSFT(DV_LBRC)
#define DV_RCBR LSFT(DV_RBRC) #define DV_RCBR LSFT(DV_RBRC)
#define DV_DQUO LSFT(DV_QUOT)
#define DV_LABK LSFT(DV_COMM)
#define DV_RABK LSFT(DV_DOT)
#define DV_QUES LSFT(DV_SLSH) #define DV_QUES LSFT(DV_SLSH)
#define DV_PLUS LSFT(DV_EQL) #define DV_PLUS LSFT(DV_EQL)
#define DV_PIPE LSFT(DV_BSLS) #define DV_PIPE LSFT(DV_BSLS)

View File

@ -7,7 +7,9 @@ int midi_offset = 7;
bool process_midi(uint16_t keycode, keyrecord_t *record) { bool process_midi(uint16_t keycode, keyrecord_t *record) {
if (keycode == MI_ON && record->event.pressed) { if (keycode == MI_ON && record->event.pressed) {
midi_activated = true; midi_activated = true;
#ifdef AUDIO_ENABLE
music_scale_user(); music_scale_user();
#endif
return false; return false;
} }
@ -63,4 +65,4 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) {
return false; return false;
} }
return true; return true;
} }

View File

@ -70,6 +70,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
action->state.keycode = keycode; action->state.keycode = keycode;
action->state.count++; action->state.count++;
action->state.timer = timer_read(); action->state.timer = timer_read();
process_tap_dance_action_on_each_tap (action);
if (last_td && last_td != keycode) { if (last_td && last_td != keycode) {
qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE];

View File

@ -39,15 +39,17 @@ typedef struct
#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \
.fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \
.user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \
} }
#define ACTION_TAP_DANCE_FN(user_fn) { \ #define ACTION_TAP_DANCE_FN(user_fn) { \
.fn = { NULL, user_fn, NULL } \ .fn = { NULL, user_fn, NULL }, \
.user_data = NULL, \
} }
#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \
.fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \
.user_data = NULL, \
} }
extern qk_tap_dance_action_t tap_dance_actions[]; extern qk_tap_dance_action_t tap_dance_actions[];

View File

@ -72,9 +72,11 @@ Here are the steps
3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). 3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. 4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
6. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 6. Open the `\util` folder.
7. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! 7. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
8. Future build commands should be run from the MHV AVR Shell, which sets up an environment compatible with colorful build output. The standard Command Prompt will also work, but add `COLOR=false` to the end of all make commands when using it. 8. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
### Mac ### Mac
If you're using [homebrew,](http://brew.sh/) you can use the following commands: If you're using [homebrew,](http://brew.sh/) you can use the following commands:
@ -278,11 +280,23 @@ This allows you to use the system and audio control key codes.
`CONSOLE_ENABLE` `CONSOLE_ENABLE`
This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html). Add this to your `Makefile`, and set it to `yes`. Then put `println`, `printf`, etc. in your keymap or anywhere in the `qmk` source. Finally, open `hid_listen` and enjoy looking at your printed messages. This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html).
By default, all debug (*dprint*) print (*print*, *xprintf*), and user print (*uprint*) messages will be enabled. This will eat up a significant portion of the flash and may make the keyboard .hex file too big to program.
To disable debug messages (*dprint*) and reduce the .hex file size, include `#define NO_DEBUG` in your `config.h` file.
To disable print messages (*print*, *xprintf*) and user print messages (*uprint*) and reduce the .hex file size, include `#define NO_PRINT` in your `config.h` file.
To disable print messages (*print*, *xprintf*) and **KEEP** user print messages (*uprint*), include `#define USER_PRINT` in your `config.h` file.
To see the text, open `hid_listen` and enjoy looking at your printed messages.
**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
`COMMAND_ENABLE` `COMMAND_ENABLE`
TODO This enables magic commands, typically fired with the default magic key combo `LSHIFT+RSHIFT+KEY`. Magic commands include turning on debugging messages (`MAGIC+D`) or temporarily toggling NKRO (`MAGIC+N`).
`SLEEP_LED_ENABLE` `SLEEP_LED_ENABLE`
@ -290,7 +304,7 @@ Enables your LED to breath while your computer is sleeping. Timer1 is being used
`NKRO_ENABLE` `NKRO_ENABLE`
This allows for n-key rollover (default is 6) to be enabled. It is off by default, but can be forced by adding `#define FORCE_NKRO` to your config.h. This allows the keyboard to tell the host OS that up to 248 keys are held down at once (default without NKRO is 6). NKRO is off by default, even if `NKRO_ENABLE` is set. NKRO can be forced by adding `#define FORCE_NKRO` to your config.h or by binding `MAGIC_TOGGLE_NKRO` to a key and then hitting the key.
`BACKLIGHT_ENABLE` `BACKLIGHT_ENABLE`
@ -512,7 +526,7 @@ This array specifies what actions shall be taken when a tap-dance key is in acti
* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.

View File

@ -155,9 +155,10 @@ void process_action(keyrecord_t *record, action_t action)
action.key.mods<<4; action.key.mods<<4;
if (event.pressed) { if (event.pressed) {
if (mods) { if (mods) {
if (IS_MOD(action.key.code)) { if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
// e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless.
// this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT) // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT).
// Same applies for some keys like KC_MEH which are declared as MEH(KC_NO).
add_mods(mods); add_mods(mods);
} else { } else {
add_weak_mods(mods); add_weak_mods(mods);
@ -168,7 +169,7 @@ void process_action(keyrecord_t *record, action_t action)
} else { } else {
unregister_code(action.key.code); unregister_code(action.key.code);
if (mods) { if (mods) {
if (IS_MOD(action.key.code)) { if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
del_mods(mods); del_mods(mods);
} else { } else {
del_weak_mods(mods); del_weak_mods(mods);

View File

@ -38,7 +38,7 @@
* | | | | * | | | |
* = = = = * = = = =
* | | 32KB-4KB | | 128KB-8KB * | | 32KB-4KB | | 128KB-8KB
* 0x6000 +---------------+ 0x1FC00 +---------------+ * 0x7000 +---------------+ 0x1E000 +---------------+
* | Bootloader | 4KB | Bootloader | 8KB * | Bootloader | 4KB | Bootloader | 8KB
* 0x7FFF +---------------+ 0x1FFFF +---------------+ * 0x7FFF +---------------+ 0x1FFFF +---------------+
* *
@ -64,8 +64,8 @@
#define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE) #define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE)
/* /*
* Entering the Bootloader via Software * Entering the Bootloader via Software
* http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html * http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
*/ */
#define BOOTLOADER_RESET_KEY 0xB007B007 #define BOOTLOADER_RESET_KEY 0xB007B007
@ -137,7 +137,7 @@ void bootloader_jump_after_watchdog_reset(void)
#if 0 #if 0
/* Jumping To The Bootloader /* Jumping To The Bootloader
* http://www.pjrc.com/teensy/jump_to_bootloader.html * http://www.pjrc.com/teensy/jump_to_bootloader.html
* *
* This method doen't work when using LUFA. idk why. * This method doen't work when using LUFA. idk why.
* - needs to initialize more regisers or interrupt setting? * - needs to initialize more regisers or interrupt setting?
*/ */

View File

@ -261,7 +261,10 @@ static void print_status(void)
#ifdef BOOTMAGIC_ENABLE #ifdef BOOTMAGIC_ENABLE
static void print_eeconfig(void) static void print_eeconfig(void)
{ {
#ifndef NO_PRINT
// Print these variables if NO_PRINT or USER_PRINT are not defined.
#if !defined(NO_PRINT) && !defined(USER_PRINT)
print("default_layer: "); print_dec(eeconfig_read_default_layer()); print("\n"); print("default_layer: "); print_dec(eeconfig_read_default_layer()); print("\n");
debug_config_t dc; debug_config_t dc;
@ -381,9 +384,6 @@ static bool command_common(uint8_t code)
debug_mouse = true; debug_mouse = true;
} else { } else {
print("\ndebug: off\n"); print("\ndebug: off\n");
debug_matrix = false;
debug_keyboard = false;
debug_mouse = false;
} }
break; break;
@ -571,7 +571,8 @@ static uint8_t mousekey_param = 0;
static void mousekey_param_print(void) static void mousekey_param_print(void)
{ {
#ifndef NO_PRINT // Print these variables if NO_PRINT or USER_PRINT are not defined.
#if !defined(NO_PRINT) && !defined(USER_PRINT)
print("\n\t- Values -\n"); print("\n\t- Values -\n");
print("1: delay(*10ms): "); pdec(mk_delay); print("\n"); print("1: delay(*10ms): "); pdec(mk_delay); print("\n");
print("2: interval(ms): "); pdec(mk_interval); print("\n"); print("2: interval(ms): "); pdec(mk_interval); print("\n");

208
util/Win_Check.bat Normal file
View File

@ -0,0 +1,208 @@
@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
@echo OFF
set BAT_VERSION=v1.0
set REPORT_NAME=Win_Check_Output.txt
:: -----------------------------------------------------------------------------
cls
echo QMK Windows Check Output %BAT_VERSION%
echo QMK Windows Check Output %BAT_VERSION%.>%REPORT_NAME%
:: -----------------------------------------------------------------------------
set MINGW_BASE_DIR=C:\MinGW
set KEYMAP=atomic-pvc
set KEYMAP_CLEAN=atomic-pvc-clean
:: -----------------------------------------------------------------------------
if /I "%1" EQU VERBOSE (goto :Verbose_Make) else (goto :Normal_Make)
:Normal_Make
set MAKE_CMD_LEVEL_0=make -r -f Makefile COLOR=FALSE
set MAKE_CMD_LEVEL_1=make -r -f ../Makefile COLOR=FALSE
set MAKE_CMD_LEVEL_2=make -r -f ../../Makefile COLOR=FALSE
goto :Start_Report
:Verbose_Make
echo Verbose Mode
set MAKE_CMD_LEVEL_0=make -r -d -f Makefile COLOR=FALSE VERBOSE=TRUE
set MAKE_CMD_LEVEL_1=make -r -d -f ../Makefile COLOR=FALSE VERBOSE=TRUE
set MAKE_CMD_LEVEL_2=make -r -d -f ../../Makefile COLOR=FALSE VERBOSE=TRUE
goto :Start_Report
:Start_Report
:: -----------------------------------------------------------------------------
set HEADER=CURRENT DIRECTORY & call :ReportHeader
echo %CD%>>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
:: -----------------------------------------------------------------------------
set HEADER=CURRENT PATHS & call :ReportHeader
for %%A in ("%path:;=";"%") do (echo %%~A>>%REPORT_NAME% 2>&1)
echo.>>%REPORT_NAME% 2>&1
:: -----------------------------------------------------------------------------
rem set HEADER=CURRENT ENVIRONMENTAL SETTINGS & call :ReportHeader
rem set>>%REPORT_NAME% 2>&1
rem echo.>>%REPORT_NAME% 2>&1
:: -----------------------------------------------------------------------------
set HEADER=KEY EXECUTABLE LOCATIONS - GENERAL & call :ReportHeader
set FILENAME=make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
set FILENAME=git.exe & set VERSION_CMD=--version & set VERSION_FIND="git" & call :ReportVersion
set FILENAME=cmp.exe & set VERSION_CMD=--version & set VERSION_FIND="cmp" & call :ReportVersion
:: -----------------------------------------------------------------------------
set HEADER=EXECUTABLE LOCATIONS - AVR MCU COMPILERS & call :ReportHeader
set FILENAME=avr-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="avr" & call :ReportVersion
set FILENAME=avr-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
set FILENAME=avr-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
set FILENAME=avr-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
set FILENAME=avr-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
set FILENAME=avr-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
:: -----------------------------------------------------------------------------
set HEADER=EXECUTABLE LOCATIONS - ARM MCU COMPILERS & call :ReportHeader
set FILENAME=arm-none-eabi-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="arm-none-eabi-gcc" & call :ReportVersion
set FILENAME=arm-none-eabi-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
set FILENAME=arm-none-eabi-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
set FILENAME=arm-none-eabi-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
set FILENAME=arm-none-eabi-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
set FILENAME=arm-none-eabi-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
:: -----------------------------------------------------------------------------
set HEADER=EXECUTABLE LOCATIONS - NATIVE COMPILERS & call :ReportHeader
set FILENAME=gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="gcc" & call :ReportVersion
set FILENAME=objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
set FILENAME=objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
set FILENAME=size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
set FILENAME=ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
set FILENAME=nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
:: -----------------------------------------------------------------------------
set HEADER=EXECUTABLE LOCATIONS - PROGRAMMERS & call :ReportHeader
set FILENAME=dfu-programmer.exe & set VERSION_CMD=--version & set VERSION_FIND="dfu" & call :ReportVersion
set FILENAME=batchisp.exe & set VERSION_CMD=-version & set VERSION_FIND="batchisp" & call :ReportVersion
set FILENAME=dfu-util.exe & call :Report
set FILENAME=teensy_loader_cli.exe & call :Report
set FILENAME=hid_bootloader_cli.exe & call :Report
set FILENAME=avrdude.exe & call :Report
:: -----------------------------------------------------------------------------
set HEADER=EXECUTABLE LOCATIONS - OPTIONAL & call :ReportHeader
set FILENAME=cppcheck.exe & call :Report
set FILENAME=doxygen.exe & call :Report
set FILENAME=gdb-config.exe & call :Report
set FILENAME=wget.exe & call :Report
set FILENAME=unzip.exe & call :Report
:: -----------------------------------------------------------------------------
set HEADER=MINGW CHECK - OPTIONAL & call :ReportHeader
if exist %MINGW_BASE_DIR% (echo Expected MinGW Base Dir = %MINGW_BASE_DIR%>>%REPORT_NAME% 2>&1) else (echo Expected MinGW Base Dir = %MINGW_BASE_DIR% - Not Found>>%REPORT_NAME% 2>&1)
echo.>>%REPORT_NAME% 2>&1
set FILENAME=mingw32-make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
if exist %MINGW_BASE_DIR%\bin\make.exe (ECHO It is not recommended to have make.exe in mingw/bin.>>%REPORT_NAME% 2>&1 & echo.>>%REPORT_NAME% 2>&1)
:: -----------------------------------------------------------------------------
set HEADER=MAKE CHECK & call :ReportHeader
if exist Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_0% & goto MakeFound)
if exist ..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_1% & goto MakeFound)
if exist ..\..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_2% & goto MakeFound)
echo No Makfile Found.>>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
goto :ContinueAfterMake
:MakeFound
call :RunMake
:ContinueAfterMake
goto :ExitBatch
:ExitBatch
echo Done!
echo.
rem type %REPORT_NAME%
echo.
echo See %REPORT_NAME% for the report.
endlocal
exit /b
:: -----------------------------------------------------------------------------
:RunMake
echo Makfile Found.>>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
set HEADER=MAKE CLEAN & call :ReportHeader
echo Make Command = %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
%MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
set HEADER=MAKE & call :ReportHeader
echo Make Command = %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
%MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
exit /b
:ReportHeader
echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
echo %HEADER%>>%REPORT_NAME% 2>&1
echo.>>%REPORT_NAME% 2>&1
exit /b
:Report
echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
<nul set /p output="Location = " >>%REPORT_NAME% 2>&1
where %FILENAME% >>%REPORT_NAME% 2> NUL
if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReport)
:EndReport
echo.>>%REPORT_NAME% 2>&1
<nul set /p output="."
exit /b
:ReportVersion
echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
<nul set /p output="Location = " >>%REPORT_NAME% 2>&1
where %FILENAME% >>%REPORT_NAME% 2> NUL
if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReportVersion)
<nul set /p output ="Version = " >>%REPORT_NAME% 2>&1
(%FILENAME% %VERSION_CMD% | find %VERSION_FIND%) >>%REPORT_NAME% 2>&1
:EndReportVersion
echo.>>%REPORT_NAME% 2>&1
<nul set /p output="."
exit /b

View File

@ -68,9 +68,8 @@ elif [[ -n "$(type -P yum)" ]]; then
avr-libc \ avr-libc \
dfu-programmer \ dfu-programmer \
dfu-util \ dfu-util \
gcc-arm-none-eabi \ arm-none-eabi-gcc-cs \
binutils-arm-none-eabi \ arm-none-eabi-newlib \
libnewlib-arm-none-eabi \
git \ git \
diffutils diffutils
# The listed eabi pacackes do unfortunately not exist for CentOS, # The listed eabi pacackes do unfortunately not exist for CentOS,