Merge remote-tracking branch 'origin/master'
|
@ -29,3 +29,4 @@ CMakeLists.txt
|
|||
.idea
|
||||
.browse.VC.db*
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
|
|
|
@ -148,6 +148,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||
|
|
|
@ -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).
|
||||
|
||||
*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.
|
||||
|
||||
|
|
|
@ -1,13 +1,120 @@
|
|||
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
|
||||
|
||||
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/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.
|
||||
|
||||
|
@ -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:
|
||||
|
||||
```
|
||||
$ 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.
|
||||
|
|
|
@ -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)
|
||||
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
|
||||
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
|
||||
|
|
|
@ -150,10 +150,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
#ifndef NO_DEBUG
|
||||
# define NO_DEBUG
|
||||
#endif
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
// #ifndef NO_PRINT
|
||||
// # define NO_PRINT
|
||||
// #endif
|
||||
|
||||
/* Only print user print statements */
|
||||
#define USER_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
|
|
|
@ -2,48 +2,59 @@
|
|||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#include "led.h"
|
||||
#include "mousekey.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#include "song_list.h"
|
||||
#endif
|
||||
|
||||
#define LAYER_QWERTY 0
|
||||
#define LAYER_COLEMAK 1
|
||||
#define LAYER_DVORAK 2
|
||||
#define LAYER_UPPER 3
|
||||
#define LAYER_LOWER 4
|
||||
#define LAYER_FUNCTION 5
|
||||
#define LAYER_MOUSE 6
|
||||
#define LAYER_ADJUST 7
|
||||
|
||||
#define MACRO_QWERTY 0
|
||||
#define MACRO_COLEMAK 1
|
||||
#define MACRO_DVORAK 2
|
||||
#define MACRO_UPPER 3
|
||||
#define MACRO_LOWER 4
|
||||
#define MACRO_FUNCTION 5
|
||||
#define MACRO_MOUSE 6
|
||||
#define MACRO_TIMBRE_1 7
|
||||
#define MACRO_TIMBRE_2 8
|
||||
#define MACRO_TIMBRE_3 9
|
||||
#define MACRO_TIMBRE_4 10
|
||||
#define MACRO_TEMPO_U 11
|
||||
#define MACRO_TEMPO_D 12
|
||||
#define MACRO_TONE_DEFAULT 13
|
||||
#define MACRO_MUSIC_TOGGLE 14
|
||||
#define MACRO_AUDIO_TOGGLE 16
|
||||
#define MACRO_INC_VOICE 18
|
||||
#define MACRO_DEC_VOICE 19
|
||||
#define MACRO_BACKLIGHT 20
|
||||
#define MACRO_BREATH_TOGGLE 21
|
||||
#define MACRO_BREATH_SPEED_INC 23
|
||||
#define MACRO_BREATH_SPEED_DEC 24
|
||||
#define MACRO_BREATH_DEFAULT 25
|
||||
enum keyboard_layers {
|
||||
LAYER_QWERTY = 0,
|
||||
LAYER_UPPER,
|
||||
LAYER_LOWER,
|
||||
LAYER_FUNCTION,
|
||||
LAYER_MOUSE,
|
||||
LAYER_ADJUST,
|
||||
};
|
||||
enum keyboard_macros {
|
||||
MACRO_QWERTY = 0,
|
||||
MACRO_UPPER,
|
||||
MACRO_LOWER,
|
||||
MACRO_FUNCTION,
|
||||
MACRO_MOUSE,
|
||||
MACRO_TIMBRE_1,
|
||||
MACRO_TIMBRE_2,
|
||||
MACRO_TIMBRE_3,
|
||||
MACRO_TIMBRE_4,
|
||||
MACRO_TEMPO_U,
|
||||
MACRO_TEMPO_D,
|
||||
MACRO_TONE_DEFAULT,
|
||||
MACRO_MUSIC_TOGGLE,
|
||||
MACRO_AUDIO_TOGGLE,
|
||||
MACRO_INC_VOICE,
|
||||
MACRO_DEC_VOICE,
|
||||
MACRO_BACKLIGHT,
|
||||
MACRO_BREATH_TOGGLE,
|
||||
MACRO_BREATH_SPEED_INC,
|
||||
MACRO_BREATH_SPEED_DEC,
|
||||
MACRO_BREATH_DEFAULT,
|
||||
MACRO_MOUSE_MOVE_UL,
|
||||
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_COLMK M(MACRO_COLEMAK)
|
||||
#define M_DVORK M(MACRO_DVORAK)
|
||||
#define M_UPPER M(MACRO_UPPER)
|
||||
#define M_LOWER M(MACRO_LOWER)
|
||||
#define M_FUNCT M(MACRO_FUNCTION)
|
||||
|
@ -60,6 +71,19 @@
|
|||
#define M_BSPDU M(MACRO_BREATH_SPEED_INC)
|
||||
#define M_BSPDD M(MACRO_BREATH_SPEED_DEC)
|
||||
#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)
|
||||
|
@ -77,6 +101,7 @@
|
|||
#define SC_ACLS LALT(KC_F4)
|
||||
#define SC_CCLS LCTL(KC_F4)
|
||||
|
||||
#define TG_NKRO MAGIC_TOGGLE_NKRO
|
||||
#define OS_SHFT KC_FN0
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
@ -86,169 +111,126 @@
|
|||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTY
|
||||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | 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 |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
|
||||
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | 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 = LAYER_QWERTY
|
||||
.--------------------------------------------------------------------------------------------------------------------------------------.
|
||||
| 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 |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
|
||||
'--------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[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
|
||||
|
@ -290,6 +272,69 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
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:
|
||||
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)
|
||||
{
|
||||
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;
|
||||
|
||||
|
|
|
@ -37,7 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// 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 }
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
#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 _QW 0
|
||||
#define _RS 1
|
||||
#define _LW 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = { /* Qwerty */
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
|
||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, 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_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
|
||||
},
|
||||
[_RS] = { /* [> RAISE <] */
|
||||
{KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
||||
{KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
||||
{KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS},
|
||||
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
|
||||
},
|
||||
[_LW] = { /* [> LOWER <] */
|
||||
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET}
|
||||
}};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
|
@ -18,17 +18,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
|
||||
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
|
||||
},
|
||||
/*
|
||||
* ! @ up { } || pgup 7 8 9 *
|
||||
* # left down right $ || pgdn 4 5 6 +
|
||||
* [ ] ( ) & || ` 1 2 3 \
|
||||
* lower insert super shift bksp ctrl || alt space fn . 0 =
|
||||
*/
|
||||
[_RS] = { /* [> RAISE <] */
|
||||
{KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
||||
{KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
||||
{KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS},
|
||||
{KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
||||
{KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
||||
{KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LALT, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS},
|
||||
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
|
||||
},
|
||||
/*
|
||||
* insert home up end pgup || up F7 F8 F9 F10
|
||||
* del left down right pgdn || down F4 F5 F6 F11
|
||||
* volup reset || F1 F2 F3 F12
|
||||
* voldn super shift bksp ctrl || alt space L0 prtsc scroll pause
|
||||
*/
|
||||
[_LW] = { /* [> LOWER <] */
|
||||
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET}
|
||||
{KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS}
|
||||
}};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
|
|
@ -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
|
|
@ -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;
|
||||
};
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
ifdef TEENSY2
|
||||
OPT_DEFS += -DATREUS_TEENSY2
|
||||
ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
|
||||
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
|
||||
else
|
||||
OPT_DEFS += -DATREUS_ASTAR
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||
ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
|
||||
endif
|
||||
|
||||
|
@ -79,4 +79,4 @@ UNICODE_ENABLE ?= YES # Unicode
|
|||
USB ?= /dev/cu.usbmodem1411
|
||||
|
||||
upload: build
|
||||
$(ATRUES_UPLOAD_COMMAND)
|
||||
$(ATREUS_UPLOAD_COMMAND)
|
||||
|
|
|
@ -119,4 +119,45 @@ inline void ergodox_led_all_set(uint8_t n)
|
|||
{ k0D, k1D, k2D, k3D, k4D, KC_NO } \
|
||||
}
|
||||
|
||||
#define KEYMAP_80( \
|
||||
\
|
||||
/* left hand, spatial positions */ \
|
||||
k00,k01,k02,k03,k04,k05,k06, \
|
||||
k10,k11,k12,k13,k14,k15,k16, \
|
||||
k20,k21,k22,k23,k24,k25, \
|
||||
k30,k31,k32,k33,k34,k35,k36, \
|
||||
k40,k41,k42,k43,k44, \
|
||||
k55,k56, \
|
||||
k45,k46,k54, \
|
||||
k53,k52,k51, \
|
||||
\
|
||||
/* right hand, spatial positions */ \
|
||||
k07,k08,k09,k0A,k0B,k0C,k0D, \
|
||||
k17,k18,k19,k1A,k1B,k1C,k1D, \
|
||||
k28,k29,k2A,k2B,k2C,k2D, \
|
||||
k37,k38,k39,k3A,k3B,k3C,k3D, \
|
||||
k49,k4A,k4B,k4C,k4D, \
|
||||
k57,k58, \
|
||||
k59,k47,k48, \
|
||||
k5C,k5B,k5A ) \
|
||||
\
|
||||
/* matrix positions */ \
|
||||
{ \
|
||||
{ k00, k10, k20, k30, k40, KC_NO }, \
|
||||
{ k01, k11, k21, k31, k41, k51 }, \
|
||||
{ k02, k12, k22, k32, k42, k52 }, \
|
||||
{ k03, k13, k23, k33, k43, k53 }, \
|
||||
{ k04, k14, k24, k34, k44, k54 }, \
|
||||
{ k05, k15, k25, k35, k45, k55 }, \
|
||||
{ k06, k16, KC_NO, k36, k46, k56 }, \
|
||||
\
|
||||
{ k07, k17, KC_NO, k37, k47, k57 }, \
|
||||
{ k08, k18, k28, k38, k48, k58 }, \
|
||||
{ k09, k19, k29, k39, k49, k59 }, \
|
||||
{ k0A, k1A, k2A, k3A, k4A, k5A }, \
|
||||
{ k0B, k1B, k2B, k3B, k4B, k5B }, \
|
||||
{ k0C, k1C, k2C, k3C, k4C, k5C }, \
|
||||
{ k0D, k1D, k2D, k3D, k4D, KC_NO } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1,183 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | 1 | 2 | Home | | PgUp | 3 | 4 |
|
||||
* |------|------|------| |------|--------|------|
|
||||
* | Space| BkSp | End | | PgDn | Tab |Enter |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP_80( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, 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),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_1, KC_2, KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
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_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,KC_3, KC_4,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* |------|------|------| |------|------|------|
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP_80(
|
||||
// left hand
|
||||
M(0), 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_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_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
|
||||
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_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+----------.
|
||||
* | | | | | | | |
|
||||
* |------|------|------| |------|------|----------|
|
||||
* | | | | | | |BrwserBack|
|
||||
* `--------------------' `------------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP_80(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
};
|
|
@ -0,0 +1,10 @@
|
|||
# ErgoDox 80 Default Configuration
|
||||
|
||||
This is based on the default Ergodox EZ keymap.
|
||||
The difference is that this keymap supports 80 key layouts.
|
||||
If you own an 80 key Ergodox, use this as an example to get your desired keymap.
|
||||
|
||||
**NOTE:** This layout is not physically supported by the Ergodox EZ.
|
||||
|
||||
|
||||
![Default80](ergodox80.png)
|
After Width: | Height: | Size: 1.4 MiB |
|
@ -0,0 +1,183 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A/L2 | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LS/PO |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RS/PC |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// 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_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, 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,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
M(0), 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_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_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
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_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| left | down | up | down | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | Lclk | Rclk |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_BTN1, KC_BTN2, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
};
|
|
@ -0,0 +1,11 @@
|
|||
# ErgoDox EZ Absenth Configuration
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
* Sept. 14, 2016 (V0.2):
|
||||
* Added Space Cadet to Left and Right Shift. Pressing Left shift with no other key adds an "(" and pressing Right shift with no other key adds an ")"
|
||||
* Sept. 8, 2016 (V0.1):
|
||||
* Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer.
|
||||
|
||||
![Absenth](absenth_highres.png)
|
|
@ -1,22 +1,23 @@
|
|||
BOOTMAGIC_ENABLE=no
|
||||
COMMAND_ENABLE=no
|
||||
SLEEP_LED_ENABLE=no
|
||||
UNICODE_ENABLE=no
|
||||
FORCE_NKRO ?= yes
|
||||
DEBUG_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
KEYLOGGER_ENABLE ?= yes
|
||||
UCIS_ENABLE = yes
|
||||
MOUSEKEY_ENABLE ?= yes
|
||||
|
||||
ADORE_AUTOLOG ?= no
|
||||
AUTOLOG_ENABLE ?= no
|
||||
|
||||
ifeq (${FORCE_NKRO},yes)
|
||||
OPT_DEFS += -DFORCE_NKRO
|
||||
endif
|
||||
|
||||
ifeq (${ADORE_AUTOLOG},yes)
|
||||
ifeq (${AUTOLOG_ENABLE},yes)
|
||||
KEYLOGGER_ENABLE = yes
|
||||
OPT_DEFS += -DADORE_AUTOLOG
|
||||
OPT_DEFS += -DAUTOLOG_ENABLE
|
||||
endif
|
||||
|
||||
ifeq (${KEYLOGGER_ENABLE},yes)
|
||||
|
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
@ -2,6 +2,7 @@
|
|||
* algernon's ErgoDox EZ layout, please see the readme.md file!
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "ergodox.h"
|
||||
#include "led.h"
|
||||
#include "debug.h"
|
||||
|
@ -33,7 +34,6 @@ enum {
|
|||
// Buttons that do extra stuff
|
||||
A_GUI,
|
||||
A_PLVR,
|
||||
A_ESC,
|
||||
A_MPN,
|
||||
|
||||
// Function / number keys
|
||||
|
@ -47,7 +47,6 @@ enum {
|
|||
KF_8,
|
||||
KF_9,
|
||||
KF_10,
|
||||
KF_11, // =, F11
|
||||
|
||||
// Application select keys
|
||||
APP_SLK, // Slack
|
||||
|
@ -62,6 +61,11 @@ enum {
|
|||
A_MDL,
|
||||
A_MDR,
|
||||
|
||||
// Mouse acceleration
|
||||
A_ACL0,
|
||||
A_ACL1,
|
||||
A_ACL2,
|
||||
|
||||
// Hungarian layer keys
|
||||
HU_AA, // Á
|
||||
HU_OO, // Ó
|
||||
|
@ -89,7 +93,6 @@ enum {
|
|||
|
||||
enum {
|
||||
CT_CLN = 0,
|
||||
CT_MNS,
|
||||
CT_TA,
|
||||
CT_LBP,
|
||||
CT_RBP
|
||||
|
@ -102,7 +105,11 @@ uint16_t gui_timer = 0;
|
|||
uint16_t kf_timers[12];
|
||||
|
||||
#if KEYLOGGER_ENABLE
|
||||
# ifdef AUTOLOG_ENABLE
|
||||
bool log_enable = true;
|
||||
# else
|
||||
bool log_enable = false;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
bool time_travel = false;
|
||||
|
@ -114,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
/* Keymap 0: Base Layer
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
|
||||
* | 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 |
|
||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||
* | ~ | ' | , | . | 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 |
|
||||
* |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------|
|
||||
* |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------|
|
||||
* | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | | | | | : | | - | | | | |
|
||||
|
@ -135,21 +142,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
|
||||
,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC
|
||||
,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
|
||||
,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN
|
||||
,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN)
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
|
||||
|
||||
,F(F_ALT),F(F_GUI)
|
||||
,F(F_CTRL)
|
||||
,KC_BSPC,F(F_SFT),M(A_ESC)
|
||||
,KC_BSPC,F(F_SFT),KC_ESC
|
||||
|
||||
// right hand
|
||||
,KC_APP ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
|
||||
,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
|
||||
,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
|
||||
,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_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
|
||||
,TD(CT_MNS),KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
|
||||
,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,OSL(NMDIA),KC_DEL
|
||||
,KC_LEAD
|
||||
|
@ -159,13 +166,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
/* Keymap 1: Adore layer
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
|
||||
* | 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 |
|
||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||
* | `~ | X | W | K | L | M | ( | | ) | F | H | C | P | Y | \ |
|
||||
* | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ |
|
||||
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
|
||||
* | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = |
|
||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||
* | | Z | Q | ' | , | . | : | | - | B | G | V | J | / | |
|
||||
* | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
|
@ -180,20 +187,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[ADORE] = KEYMAP(
|
||||
// left hand
|
||||
KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
|
||||
,KC_GRV ,KC_X ,KC_W ,KC_K ,KC_L ,KC_M ,TD(CT_LBP)
|
||||
,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP)
|
||||
,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_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,F(F_ALT),F(F_GUI)
|
||||
,F(F_CTRL)
|
||||
,KC_BSPC,F(F_SFT),M(A_ESC)
|
||||
,KC_BSPC,F(F_SFT),KC_ESC
|
||||
|
||||
// right hand
|
||||
,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
|
||||
,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS
|
||||
,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
|
||||
,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS
|
||||
,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
|
||||
,TD(CT_MNS),KC_B ,KC_G ,KC_V ,KC_J ,KC_SLSH ,KC_NO
|
||||
,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,OSL(NMDIA),KC_DEL
|
||||
|
@ -363,14 +370,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
*/
|
||||
[NMDIA] = KEYMAP(
|
||||
// left hand
|
||||
KC_ACL0 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L)
|
||||
,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO
|
||||
,KC_ACL2 ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO
|
||||
M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L)
|
||||
,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO
|
||||
,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,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_MUTE ,KC_VOLU
|
||||
,KC_VOLD
|
||||
,KC_SPC,KC_ENTER,M(A_ESC)
|
||||
,KC_SPC,KC_ENTER,KC_ESC
|
||||
|
||||
// right hand
|
||||
,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
@ -439,7 +446,7 @@ const uint16_t PROGMEM fn_actions[] = {
|
|||
,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL)
|
||||
};
|
||||
|
||||
void toggle_steno(int pressed)
|
||||
static void toggle_steno(int pressed)
|
||||
{
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
|
@ -462,7 +469,7 @@ void toggle_steno(int pressed)
|
|||
}
|
||||
}
|
||||
|
||||
macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char)
|
||||
static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char)
|
||||
{
|
||||
uint8_t need_shift = 0;
|
||||
uint8_t hold_shift = 0;
|
||||
|
@ -507,46 +514,43 @@ macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char)
|
|||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void ang_handle_kf (keyrecord_t *record, uint8_t id)
|
||||
static bool from_appsel;
|
||||
|
||||
static void ang_handle_kf (keyrecord_t *record, uint8_t id)
|
||||
{
|
||||
uint8_t code = id - KF_1;
|
||||
|
||||
if (record->event.pressed) {
|
||||
kf_timers[code] = timer_read ();
|
||||
} else {
|
||||
uint8_t kc;
|
||||
uint8_t kc_base;
|
||||
|
||||
if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) {
|
||||
// Long press
|
||||
kc = KC_F1 + code;
|
||||
} else {
|
||||
if (id == KF_11)
|
||||
kc = KC_EQL;
|
||||
else
|
||||
kc = KC_1 + code;
|
||||
if (from_appsel) {
|
||||
from_appsel = false;
|
||||
return;
|
||||
}
|
||||
|
||||
register_code (kc);
|
||||
unregister_code (kc);
|
||||
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)
|
||||
{
|
||||
switch(id) {
|
||||
case A_ESC:
|
||||
if (record->event.pressed) {
|
||||
if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) {
|
||||
clear_oneshot_mods ();
|
||||
} else {
|
||||
register_code (KC_ESC);
|
||||
}
|
||||
layer_off (HUN);
|
||||
} else {
|
||||
unregister_code (KC_ESC);
|
||||
}
|
||||
break;
|
||||
|
||||
case A_MPN:
|
||||
if (record->event.pressed) {
|
||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
|
||||
|
@ -588,6 +592,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
case HU_UEE:
|
||||
return ang_do_hun (record, KC_EQL, KC_U);
|
||||
|
||||
#if MOUSEKEY_ENABLE
|
||||
/* Mouse movement */
|
||||
case A_MUL:
|
||||
if (record->event.pressed) {
|
||||
|
@ -633,6 +638,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
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 */
|
||||
case A_PLVR:
|
||||
toggle_steno(record->event.pressed);
|
||||
|
@ -663,22 +686,34 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
break;
|
||||
|
||||
case APP_SLK:
|
||||
from_appsel = true;
|
||||
return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END);
|
||||
|
||||
case APP_EMCS:
|
||||
from_appsel = true;
|
||||
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);
|
||||
|
||||
case APP_TERM:
|
||||
return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END);
|
||||
from_appsel = true;
|
||||
if (!record->event.pressed) {
|
||||
register_code(KC_ESC);
|
||||
unregister_code(KC_ESC);
|
||||
wait_ms(TAPPING_TERM + 25);
|
||||
register_code(KC_DEL);
|
||||
unregister_code(KC_DEL);
|
||||
}
|
||||
break;
|
||||
|
||||
case APP_CHRM:
|
||||
from_appsel = true;
|
||||
return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END);
|
||||
|
||||
case APP_MSIC:
|
||||
from_appsel = true;
|
||||
return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END);
|
||||
|
||||
/* Function keys */
|
||||
case KF_1 ... KF_11:
|
||||
case KF_1 ... KF_10:
|
||||
ang_handle_kf (record, id);
|
||||
break;
|
||||
}
|
||||
|
@ -686,12 +721,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
uint8_t is_adore = 0;
|
||||
static uint8_t is_adore = 0;
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
uint8_t dl;
|
||||
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
|
||||
ergodox_led_all_on();
|
||||
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
|
||||
ergodox_led_all_set (i);
|
||||
|
@ -709,120 +746,38 @@ void matrix_init_user(void) {
|
|||
dl = eeconfig_read_default_layer ();
|
||||
if (dl == (1UL << ADORE)) {
|
||||
is_adore = 1;
|
||||
#if ADORE_AUTOLOG
|
||||
log_enable = true;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void ang_do_unicode (void) {
|
||||
register_code (KC_RCTL);
|
||||
register_code (KC_RSFT);
|
||||
register_code (KC_U);
|
||||
unregister_code (KC_U);
|
||||
unregister_code (KC_RSFT);
|
||||
unregister_code (KC_RCTL);
|
||||
wait_ms (100);
|
||||
}
|
||||
static void ang_tap (uint8_t code, ...) {
|
||||
uint8_t kc = code;
|
||||
va_list ap;
|
||||
|
||||
void ang_tap (uint16_t codes[]) {
|
||||
for (int i = 0; codes[i] != 0; i++) {
|
||||
register_code (codes[i]);
|
||||
unregister_code (codes[i]);
|
||||
wait_ms (50);
|
||||
}
|
||||
va_start(ap, code);
|
||||
|
||||
do {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
wait_ms(50);
|
||||
kc = va_arg(ap, int);
|
||||
} while (kc != 0);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#define TAP_ONCE(code) \
|
||||
register_code (code); \
|
||||
unregister_code (code)
|
||||
|
||||
void ang_tap_dance_bp_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
bool left, parens;
|
||||
|
||||
if (state->count > 2) {
|
||||
state->count = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (state->keycode == TD(CT_LBP))
|
||||
left = true;
|
||||
else
|
||||
left = false;
|
||||
|
||||
if (state->count == 1)
|
||||
parens = false;
|
||||
else
|
||||
parens = true;
|
||||
|
||||
if (parens) {
|
||||
register_code (KC_RSFT);
|
||||
if (left) {
|
||||
TAP_ONCE(KC_9);
|
||||
} else {
|
||||
TAP_ONCE(KC_0);
|
||||
}
|
||||
unregister_code (KC_RSFT);
|
||||
} else {
|
||||
if (left) {
|
||||
TAP_ONCE (KC_LBRC);
|
||||
} else {
|
||||
TAP_ONCE (KC_RBRC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ang_tap_dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_RSFT);
|
||||
register_code (KC_SCLN);
|
||||
} else if (state->count == 2) {
|
||||
register_code (KC_SCLN);
|
||||
}
|
||||
}
|
||||
|
||||
void ang_tap_dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code (KC_SCLN);
|
||||
unregister_code (KC_RSFT);
|
||||
} else if (state->count == 2) {
|
||||
unregister_code (KC_SCLN);
|
||||
}
|
||||
}
|
||||
|
||||
void ang_tap_dance_mns_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_MINS);
|
||||
} else if (state->count == 2) {
|
||||
register_code (KC_RSFT);
|
||||
register_code (KC_MINS);
|
||||
}
|
||||
}
|
||||
|
||||
void ang_tap_dance_mns_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code (KC_MINS);
|
||||
} else if (state->count == 2) {
|
||||
unregister_code (KC_RSFT);
|
||||
unregister_code (KC_MINS);
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
bool layer_toggle;
|
||||
bool sticky;
|
||||
bool finished_once;
|
||||
} td_ta_state_t;
|
||||
|
||||
void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
|
||||
|
||||
if (td_ta->finished_once) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (td_ta->sticky) {
|
||||
td_ta->sticky = false;
|
||||
td_ta->layer_toggle = false;
|
||||
|
@ -830,7 +785,6 @@ void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) {
|
|||
return;
|
||||
}
|
||||
|
||||
td_ta->finished_once = true;
|
||||
if (state->count == 1 && !state->pressed) {
|
||||
register_code (KC_TAB);
|
||||
td_ta->sticky = false;
|
||||
|
@ -842,35 +796,29 @@ void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) {
|
|||
}
|
||||
}
|
||||
|
||||
void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
|
||||
|
||||
if (!td_ta->layer_toggle)
|
||||
unregister_code (KC_TAB);
|
||||
if (!td_ta->sticky)
|
||||
layer_off (ARRW);
|
||||
|
||||
td_ta->finished_once = false;
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset)
|
||||
,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset)
|
||||
[CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
|
||||
,[CT_TA] = {
|
||||
.fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset },
|
||||
.user_data = (void *)&((td_ta_state_t) { false, false, false })
|
||||
.user_data = (void *)&((td_ta_state_t) { false, false })
|
||||
}
|
||||
,[CT_LBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished)
|
||||
,[CT_RBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished)
|
||||
,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN)
|
||||
,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
|
||||
};
|
||||
|
||||
static uint16_t uni[32];
|
||||
static uint8_t unicnt;
|
||||
static bool unimagic = false;
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
bool is_arrow = false;
|
||||
|
||||
if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
|
||||
unregister_code (KC_LGUI);
|
||||
|
@ -893,13 +841,19 @@ void matrix_scan_user(void) {
|
|||
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
|
||||
}
|
||||
|
||||
if (layer_state & (1UL << ARRW)) {
|
||||
ergodox_right_led_1_on ();
|
||||
ergodox_right_led_3_on ();
|
||||
is_arrow = true;
|
||||
}
|
||||
|
||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
|
||||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
|
||||
ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
|
||||
ergodox_right_led_1_on ();
|
||||
} else {
|
||||
ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
|
||||
if (layer != NMDIA && layer != PLVR && layer != ADORE)
|
||||
if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
|
||||
ergodox_right_led_1_off ();
|
||||
}
|
||||
|
||||
|
@ -919,7 +873,7 @@ void matrix_scan_user(void) {
|
|||
ergodox_right_led_3_on ();
|
||||
} else {
|
||||
ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
|
||||
if (layer != HUN && layer != PLVR && layer != ADORE)
|
||||
if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
|
||||
ergodox_right_led_3_off ();
|
||||
}
|
||||
|
||||
|
@ -936,20 +890,17 @@ void matrix_scan_user(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
SEQ_ONE_KEY (KC_Q) {
|
||||
register_code16 (LCTL(KC_1));
|
||||
unregister_code16 (LCTL(KC_1));
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY (KC_T) {
|
||||
time_travel = !time_travel;
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY (KC_U) {
|
||||
ang_do_unicode ();
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS (KC_LEAD, KC_U) {
|
||||
unicnt = 0;
|
||||
unimagic = true;
|
||||
register_code(KC_RSFT);
|
||||
TAP_ONCE(KC_U);
|
||||
unregister_code(KC_RSFT);
|
||||
qk_ucis_start();
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY (KC_V) {
|
||||
|
@ -958,25 +909,23 @@ void matrix_scan_user(void) {
|
|||
|
||||
SEQ_ONE_KEY (KC_L) {
|
||||
/* λ */
|
||||
ang_do_unicode ();
|
||||
|
||||
uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0};
|
||||
ang_tap (codes);
|
||||
unicode_input_start();
|
||||
register_hex(0x03bb);
|
||||
unicode_input_finish();
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY (KC_Y) {
|
||||
uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0};
|
||||
ang_tap (codes);
|
||||
ang_tap (KC_BSLS, KC_O, KC_SLSH, 0);
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY (KC_S) {
|
||||
ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
|
||||
unicode_input_start(); register_hex(0xaf); unicode_input_finish();
|
||||
TAP_ONCE (KC_BSLS);
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
|
||||
ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC);
|
||||
unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT);
|
||||
TAP_ONCE (KC_SLSH);
|
||||
ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
|
||||
unicode_input_start (); register_hex(0xaf); unicode_input_finish();
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS (KC_W, KC_M) {
|
||||
|
@ -987,8 +936,7 @@ void matrix_scan_user(void) {
|
|||
|
||||
wait_ms (1000);
|
||||
|
||||
uint16_t codes[] = {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};
|
||||
ang_tap (codes);
|
||||
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);
|
||||
|
@ -1013,13 +961,7 @@ void matrix_scan_user(void) {
|
|||
ergodox_right_led_2_off ();
|
||||
wait_ms (100);
|
||||
ergodox_right_led_1_off ();
|
||||
#if ADORE_AUTOLOG
|
||||
log_enable = true;
|
||||
#endif
|
||||
} else {
|
||||
#if ADORE_AUTOLOG
|
||||
log_enable = false;
|
||||
#endif
|
||||
is_adore = 0;
|
||||
default_layer_and (0);
|
||||
default_layer_or (1UL << BASE);
|
||||
|
@ -1043,140 +985,38 @@ void matrix_scan_user(void) {
|
|||
|
||||
static uint16_t last4[4];
|
||||
|
||||
bool is_uni_seq(char *seq) {
|
||||
uint8_t i;
|
||||
|
||||
for (i = 0; seq[i]; i++) {
|
||||
uint16_t code;
|
||||
if (('1' <= seq[i]) && (seq[i] <= '9'))
|
||||
code = seq[i] - '1' + KC_1;
|
||||
else if (seq[i] == '0')
|
||||
code = KC_0;
|
||||
else
|
||||
code = seq[i] - 'a' + KC_A;
|
||||
|
||||
if (i > unicnt)
|
||||
return false;
|
||||
if (uni[i] != code)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (uni[i] == KC_ENT || uni[i] == KC_SPC)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t hex_to_keycode(uint8_t hex)
|
||||
{
|
||||
if (hex == 0x0) {
|
||||
return KC_0;
|
||||
} else if (hex < 0xA) {
|
||||
return KC_1 + (hex - 0x1);
|
||||
} else {
|
||||
return KC_A + (hex - 0xA);
|
||||
}
|
||||
}
|
||||
|
||||
void register_hex(uint16_t hex) {
|
||||
bool leading_zeros = true;
|
||||
|
||||
for(int i = 3; i >= 0; i--) {
|
||||
uint8_t digit = ((hex >> (i*4)) & 0xF);
|
||||
if (digit != 0)
|
||||
leading_zeros = false;
|
||||
else if (leading_zeros)
|
||||
continue;
|
||||
register_code(hex_to_keycode(digit));
|
||||
unregister_code(hex_to_keycode(digit));
|
||||
wait_ms(10);
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
char *symbol;
|
||||
uint16_t codes[4];
|
||||
} qk_ucis_symbol_t;
|
||||
|
||||
static qk_ucis_symbol_t ucis_symbol_table[] = {
|
||||
{"poop", {0x1, 0xf4a9, 0}},
|
||||
{"rofl", {0x1, 0xf923, 0}},
|
||||
{"kiss", {0x1, 0xf619, 0}},
|
||||
{"snowman", {0x2603, 0}},
|
||||
{NULL, {}}
|
||||
};
|
||||
|
||||
bool process_record_ucis (uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t i;
|
||||
|
||||
if (!unimagic)
|
||||
return true;
|
||||
|
||||
if (!record->event.pressed)
|
||||
return true;
|
||||
|
||||
uni[unicnt] = keycode;
|
||||
unicnt++;
|
||||
|
||||
if (keycode == KC_BSPC) {
|
||||
if (unicnt >= 2) {
|
||||
unicnt-= 2;
|
||||
return true;
|
||||
} else {
|
||||
unicnt--;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (keycode == KC_ENT || keycode == KC_SPC) {
|
||||
bool symbol_found = false;
|
||||
|
||||
for (i = unicnt; i > 0; i--) {
|
||||
register_code (KC_BSPC);
|
||||
unregister_code (KC_BSPC);
|
||||
wait_ms(10);
|
||||
}
|
||||
|
||||
ang_do_unicode();
|
||||
wait_ms(10);
|
||||
for (i = 0; ucis_symbol_table[i].symbol; i++) {
|
||||
if (is_uni_seq (ucis_symbol_table[i].symbol)) {
|
||||
symbol_found = true;
|
||||
for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) {
|
||||
register_hex(ucis_symbol_table[i].codes[j]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!symbol_found) {
|
||||
for (i = 0; i < unicnt - 1; i++) {
|
||||
uint8_t code;
|
||||
|
||||
if (uni[i] > KF_1)
|
||||
code = uni[i] - KF_1 + KC_1;
|
||||
else
|
||||
code = uni[i];
|
||||
TAP_ONCE(code);
|
||||
wait_ms (10);
|
||||
}
|
||||
}
|
||||
|
||||
unimagic = false;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
|
||||
(
|
||||
UCIS_SYM("poop", 0x1f4a9),
|
||||
UCIS_SYM("rofl", 0x1f923),
|
||||
UCIS_SYM("kiss", 0x1f619),
|
||||
UCIS_SYM("snowman", 0x2603),
|
||||
UCIS_SYM("coffee", 0x2615),
|
||||
UCIS_SYM("heart", 0x2764),
|
||||
UCIS_SYM("bolt", 0x26a1)
|
||||
);
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
#if KEYLOGGER_ENABLE
|
||||
if (log_enable) {
|
||||
xprintf ("KL: col=%d, row=%d\n", record->event.key.col,
|
||||
record->event.key.row);
|
||||
xprintf ("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
|
||||
|
||||
if (!process_record_ucis (keycode, record))
|
||||
return false;
|
||||
if (keycode == KC_ESC && record->event.pressed) {
|
||||
bool queue = true;
|
||||
|
||||
if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) {
|
||||
clear_oneshot_mods ();
|
||||
queue = false;
|
||||
}
|
||||
if (layer_state & (1UL<<HUN)) {
|
||||
layer_off (HUN);
|
||||
queue = false;
|
||||
}
|
||||
return queue;
|
||||
}
|
||||
|
||||
if (time_travel && !record->event.pressed) {
|
||||
uint8_t p;
|
||||
|
@ -1188,15 +1028,13 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
|||
last4[3] = keycode;
|
||||
|
||||
if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) {
|
||||
uint16_t codes[] = {KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0};
|
||||
ang_tap (codes);
|
||||
ang_tap (KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0);
|
||||
register_code (KC_RSFT);
|
||||
register_code (KC_EQL);
|
||||
unregister_code (KC_EQL);
|
||||
unregister_code (KC_RSFT);
|
||||
|
||||
uint16_t codes2[] = {KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0};
|
||||
ang_tap (codes2);
|
||||
ang_tap (KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1204,3 +1042,17 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void qk_ucis_symbol_fallback (void) {
|
||||
for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
|
||||
uint8_t code;
|
||||
|
||||
if (qk_ucis_state.codes[i] > KF_1)
|
||||
code = qk_ucis_state.codes[i] - KF_1 + KC_1;
|
||||
else
|
||||
code = qk_ucis_state.codes[i];
|
||||
register_code(code);
|
||||
unregister_code(code);
|
||||
wait_ms (10);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,15 @@
|
|||
algernon's layout
|
||||
=======================
|
||||
|
||||
This is an unconventional layout for the ErgoDox EZ. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox].
|
||||
This is an unconventional layout for the [ErgoDox EZ][ez]. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox].
|
||||
|
||||
[ez]: https://ergodox-ez.com/
|
||||
[blog-ergodox]: https://asylum.madhouse-project.org/blog/tags/ergodox/
|
||||
|
||||
Some of the things in the layout only work when one uses Spacemacs and GNOME under Linux. Your mileage may vary.
|
||||
Some of the things in the layout only work when one uses [Spacemacs][spacemacs] and [GNOME][gnome] under Linux. Your mileage may vary.
|
||||
|
||||
[spacemacs]: http://spacemacs.org/
|
||||
[gnome]: https://www.gnome.org/
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
@ -40,10 +44,10 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
|
|||
* 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 **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle.
|
||||
* When holding any of the **Arrow** layer keys, the arrow layer activates while the layer key is held. Tapping the key produces the normal key.
|
||||
* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap.
|
||||
* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
|
||||
* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`.
|
||||
* The **Lead** key allows me to type in a sequence of keys, and trigger some actions:
|
||||
- `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that does this.
|
||||
- `LEAD l` uses the unicode input method to enter a `λ`.
|
||||
- `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯`
|
||||
- `LEAD y` types `\o/`.
|
||||
|
@ -52,7 +56,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
|
|||
- `LEAD v` prints the firmware version, the keyboard and the keymap.
|
||||
- `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 LEAD u` enters the [Unicode symbol input][#unicode-symbol-input] mode.
|
||||
- `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode.
|
||||
|
||||
## ADORE layer
|
||||
|
||||
|
@ -91,6 +95,7 @@ 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 [Hungarian layer](#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 **ARROW** layer is active, the *red* and *blue* ones are on.
|
||||
* For the [Steno layer](#steno-layer), all LEDs will be turned on.
|
||||
|
||||
Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers use a stronger one, and modifiers override any layer preferences. For example, when on the one-handed layer, with the left side active (*red* light blinking), if `Shift` is on, the *red* light will be constantly on.
|
||||
|
@ -116,7 +121,7 @@ This is an experimental feature, and may or may not work reliably.
|
|||
|
||||
When the keypress logging functionality is enabled (by `LEAD d`), the keyboard will output a line every time a key is pressed, containing the position of the key in the matrix. This allows one to collect this information, and build analytics over it, such as a heat map, including dead keys too.
|
||||
|
||||
Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, simply point `tools/log-to-heatmap.py` to a base layout file (one is included in the `tools/` directory), and the key position log. The latter one can create by running `hid-listen`, and redirecting its output to a file.
|
||||
Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, either pipe the output of `hid_listen` into it, or pipe it an already saved log, and it will save the results into files in an output directory (given on the command-line). See the output of `tools/log-to-heatmap.py --help` for more information.
|
||||
|
||||
[kle]: http://www.keyboard-layout-editor.com/
|
||||
|
||||
|
@ -151,7 +156,35 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
|
|||
|
||||
# Changelog
|
||||
|
||||
## v1.5 - 2016-08-12
|
||||
## v1.6
|
||||
|
||||
*2016-08-24*
|
||||
|
||||
### Base layer changes
|
||||
|
||||
* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`.
|
||||
* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`.
|
||||
* The `Apps` key has been replaced by `F12`.
|
||||
* The `-`/`_` is no longer a tap-dance key.
|
||||
|
||||
### ADORE layer changes
|
||||
|
||||
* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations.
|
||||
|
||||
### Miscellaneous changes
|
||||
|
||||
* `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.
|
||||
* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now.
|
||||
|
||||
### Heatmap
|
||||
|
||||
* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off.
|
||||
* The heatmap generator received a lot of updates.
|
||||
|
||||
## v1.5
|
||||
|
||||
*2016-08-12*
|
||||
|
||||
* The **1HAND** layer has been removed.
|
||||
* A `Delete` key is now available on the right thumb cluster.
|
||||
|
@ -161,7 +194,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
|
|||
* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
|
||||
* There is some experimental support for entering Unicode symbols.
|
||||
|
||||
## v1.4 - 2016-07-29
|
||||
## v1.4
|
||||
|
||||
*2016-07-29*
|
||||
|
||||
* When toggling the key logging on or off, the LEDs will do a little dance.
|
||||
* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it.
|
||||
|
@ -169,14 +204,18 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
|
|||
* The `-`/`_` key was turned into a tap-dance key too.
|
||||
* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`.
|
||||
|
||||
## v1.3 - 2016-07-06
|
||||
## v1.3
|
||||
|
||||
*2016-07-06*
|
||||
|
||||
* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.
|
||||
* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are.
|
||||
* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now.
|
||||
* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
|
||||
|
||||
## v1.2 - 2016-06-22
|
||||
## v1.2
|
||||
|
||||
*2016-06-22*
|
||||
|
||||
* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows).
|
||||
* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
|
||||
|
@ -187,7 +226,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
|
|||
* 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.
|
||||
|
||||
## v1.1 - 2016-06-14
|
||||
## v1.1
|
||||
|
||||
*2016-06-14*
|
||||
|
||||
* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
|
||||
* A [Steno](#steno-layer) layer was added, to be used with Plover.
|
||||
|
@ -201,7 +242,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
|
|||
- `:` now inputs `;` when shifted.
|
||||
* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers.
|
||||
|
||||
## v1.0 - 2016-05-26
|
||||
## v1.0
|
||||
|
||||
*2016-05-26*
|
||||
|
||||
Initial version.
|
||||
|
||||
|
|
|
@ -75,9 +75,9 @@
|
|||
"STENO",
|
||||
{
|
||||
"x": 4.5,
|
||||
"f": 6
|
||||
"f": 3
|
||||
},
|
||||
"<i class='mss mss-Unicode-Option-3'></i>",
|
||||
"F12",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 4,
|
||||
|
@ -94,12 +94,20 @@
|
|||
{
|
||||
"y": -0.875,
|
||||
"c": "#ffb2d2",
|
||||
"f": 3,
|
||||
"f": 9,
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"\n\n~\n`",
|
||||
"\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
|
||||
{
|
||||
"t": "#0d0d0b"
|
||||
"t": "#0d0d0b",
|
||||
"f": 3,
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"!\n1\nF1",
|
||||
{
|
||||
|
@ -120,7 +128,7 @@
|
|||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"L",
|
||||
"G",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
|
@ -132,16 +140,16 @@
|
|||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b",
|
||||
"a": 4
|
||||
"a": 6
|
||||
},
|
||||
">\n.",
|
||||
"W",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"W",
|
||||
"L",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
|
@ -164,14 +172,15 @@
|
|||
{
|
||||
"c": "#93c9b7",
|
||||
"a": 4,
|
||||
"fa": [0, 0, 0],
|
||||
"h": 1.5
|
||||
},
|
||||
"{\n[",
|
||||
"{\n(\n[",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"}\n]",
|
||||
"}\n)\n]",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 6
|
||||
|
@ -183,21 +192,22 @@
|
|||
"y": -0.875,
|
||||
"c": "#ffb07b",
|
||||
"t": "#0d0d0b",
|
||||
"f": 6,
|
||||
"f": 3,
|
||||
"a": 4,
|
||||
"w": 1.5
|
||||
},
|
||||
"<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
|
||||
"\n\n~\n`",
|
||||
{
|
||||
"c": "#ffb2d2",
|
||||
"a": 4,
|
||||
"a": 6,
|
||||
"f": 3
|
||||
},
|
||||
"<\n,",
|
||||
"Y",
|
||||
{
|
||||
"x": 14.5,
|
||||
"a": 6
|
||||
},
|
||||
"Y",
|
||||
"X",
|
||||
{
|
||||
"a": 4,
|
||||
"w": 1.5
|
||||
|
@ -300,15 +310,14 @@
|
|||
"x": 6.5,
|
||||
"c": "#93c9b7",
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"h": 1.5
|
||||
},
|
||||
"(",
|
||||
";\n:",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
")"
|
||||
"_\n-"
|
||||
],
|
||||
[
|
||||
{
|
||||
|
@ -320,7 +329,9 @@
|
|||
},
|
||||
"\"\n'",
|
||||
{
|
||||
"x": 10.5
|
||||
"x": 10.5,
|
||||
"a": 6,
|
||||
"f": 3
|
||||
},
|
||||
"V"
|
||||
],
|
||||
|
@ -329,19 +340,22 @@
|
|||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"t": "#0d0d0b",
|
||||
"a": 6
|
||||
},
|
||||
"Z",
|
||||
"Q",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"t": "#000000",
|
||||
"a": 4
|
||||
},
|
||||
"<\n,",
|
||||
{
|
||||
"x": 8.5,
|
||||
"a": 6
|
||||
},
|
||||
"K",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"G",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
|
@ -354,11 +368,13 @@
|
|||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"t": "#000000",
|
||||
"a": 4
|
||||
},
|
||||
"X",
|
||||
">\n.",
|
||||
{
|
||||
"x": 6.5
|
||||
"x": 6.5,
|
||||
"a": 6
|
||||
},
|
||||
"B"
|
||||
],
|
||||
|
@ -367,28 +383,32 @@
|
|||
"y": -0.875,
|
||||
"c": "#ffb07b",
|
||||
"f": 9,
|
||||
"w": 1.5
|
||||
"w": 1.5,
|
||||
"g": true
|
||||
},
|
||||
"\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
|
||||
"",
|
||||
{
|
||||
"c": "#ffb2d2",
|
||||
"t": "#0d0d0b",
|
||||
"a": 4,
|
||||
"f": 3
|
||||
"a": 6,
|
||||
"f": 3,
|
||||
"g": false
|
||||
},
|
||||
"?\n/",
|
||||
"Z",
|
||||
{
|
||||
"x": 14.5,
|
||||
"a": 6
|
||||
"a": 4
|
||||
},
|
||||
"Q",
|
||||
"?\n/",
|
||||
{
|
||||
"c": "#ffb07b",
|
||||
"t": "#000000",
|
||||
"f": 9,
|
||||
"w": 1.5
|
||||
"g": true,
|
||||
"w": 1.5,
|
||||
"a": 4
|
||||
},
|
||||
"<i class='kb kb-Multimedia-Stop'></i>"
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
|
@ -414,14 +434,14 @@
|
|||
{
|
||||
"x": 1,
|
||||
"c": "#d4872a",
|
||||
"g": false,
|
||||
"g": true,
|
||||
"a": 5
|
||||
},
|
||||
";\n:",
|
||||
"",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"_\n-",
|
||||
"",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#d9dae0",
|
||||
|
@ -503,13 +523,13 @@
|
|||
},
|
||||
"MEDIA",
|
||||
{},
|
||||
"1HAND"
|
||||
"DEL"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3
|
||||
},
|
||||
"LEAD",
|
||||
"HUN",
|
||||
{
|
||||
"c": "#d4872a",
|
||||
"f": 9,
|
||||
|
@ -528,6 +548,6 @@
|
|||
"c": "#f9cd31",
|
||||
"f": 2
|
||||
},
|
||||
"HUN"
|
||||
"LEAD"
|
||||
]
|
||||
]
|
|
@ -75,9 +75,9 @@
|
|||
"STENO",
|
||||
{
|
||||
"x": 4.5,
|
||||
"f": 6
|
||||
"f": 3
|
||||
},
|
||||
"<i class='mss mss-Unicode-Option-3'></i>",
|
||||
"F12",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 4,
|
||||
|
@ -94,12 +94,21 @@
|
|||
{
|
||||
"y": -0.875,
|
||||
"c": "#ffb2d2",
|
||||
"f": 3,
|
||||
"f": 6,
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"\n\n~\n`",
|
||||
"<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
|
||||
{
|
||||
"t": "#0d0d0b"
|
||||
"f": 3,
|
||||
"t": "#0d0d0b",
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
|
||||
},
|
||||
"!\n1\nF1",
|
||||
{
|
||||
|
@ -167,12 +176,12 @@
|
|||
"a": 4,
|
||||
"h": 1.5
|
||||
},
|
||||
"{\n[",
|
||||
"{\n(\n[",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"}\n]",
|
||||
"}\n)\n]",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 6
|
||||
|
@ -184,10 +193,10 @@
|
|||
"y": -0.875,
|
||||
"c": "#ffb07b",
|
||||
"t": "#0d0d0b",
|
||||
"f": 6,
|
||||
"f": 3,
|
||||
"w": 1.5
|
||||
},
|
||||
"<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
|
||||
"\n\n~\n`",
|
||||
{
|
||||
"c": "#ffb2d2",
|
||||
"a": 4,
|
||||
|
@ -503,7 +512,7 @@
|
|||
},
|
||||
"MEDIA",
|
||||
{},
|
||||
"1HAND"
|
||||
"DEL"
|
||||
],
|
||||
[
|
||||
{
|
|
@ -3,143 +3,247 @@ import json
|
|||
import os
|
||||
import sys
|
||||
import re
|
||||
import argparse
|
||||
|
||||
from math import floor
|
||||
from os.path import dirname
|
||||
|
||||
cr_coord_map = [
|
||||
[
|
||||
# Row 0
|
||||
[ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2],
|
||||
[ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6],
|
||||
],
|
||||
[
|
||||
# Row 1
|
||||
[ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2],
|
||||
[ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6],
|
||||
],
|
||||
[
|
||||
# Row 2
|
||||
[12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ],
|
||||
[ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6],
|
||||
],
|
||||
[
|
||||
# Row 3
|
||||
[17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0],
|
||||
[13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6],
|
||||
],
|
||||
[
|
||||
# Row 4
|
||||
[20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [],
|
||||
[19, 4], [18, 2], [19, 6], [20, 4], [20, 6],
|
||||
],
|
||||
[
|
||||
# Row 5
|
||||
[ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2],
|
||||
[24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ],
|
||||
],
|
||||
]
|
||||
class Heatmap(object):
|
||||
coords = [
|
||||
[
|
||||
# Row 0
|
||||
[ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2],
|
||||
[ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6],
|
||||
],
|
||||
[
|
||||
# Row 1
|
||||
[ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2],
|
||||
[ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6],
|
||||
],
|
||||
[
|
||||
# Row 2
|
||||
[12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ],
|
||||
[ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6],
|
||||
],
|
||||
[
|
||||
# Row 3
|
||||
[17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0],
|
||||
[13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6],
|
||||
],
|
||||
[
|
||||
# Row 4
|
||||
[20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [],
|
||||
[19, 4], [18, 2], [19, 6], [20, 4], [20, 6],
|
||||
],
|
||||
[
|
||||
# Row 5
|
||||
[ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2],
|
||||
[24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ],
|
||||
],
|
||||
]
|
||||
|
||||
def set_attr_at(j, b, n, attr, fn, val):
|
||||
blk = j[b][n]
|
||||
if attr in blk:
|
||||
blk[attr] = fn(blk[attr], val)
|
||||
else:
|
||||
blk[attr] = fn(None, val)
|
||||
def set_attr_at(self, block, n, attr, fn, val):
|
||||
blk = self.heatmap[block][n]
|
||||
if attr in blk:
|
||||
blk[attr] = fn(blk[attr], val)
|
||||
else:
|
||||
blk[attr] = fn(None, val)
|
||||
|
||||
def coord(col, row):
|
||||
return cr_coord_map[row][col]
|
||||
def coord(self, col, row):
|
||||
return self.coords[row][col]
|
||||
|
||||
def set_attr(orig, new):
|
||||
return new
|
||||
@staticmethod
|
||||
def set_attr(orig, new):
|
||||
return new
|
||||
|
||||
def set_bg(j, (b, n), color):
|
||||
set_attr_at(j, b, n, "c", set_attr, color)
|
||||
#set_attr_at(j, b, n, "g", set_attr, False)
|
||||
def set_bg(self, (block, n), color):
|
||||
self.set_attr_at(block, n, "c", self.set_attr, color)
|
||||
#self.set_attr_at(block, n, "g", self.set_attr, False)
|
||||
|
||||
def _set_tap_info(o, count, cap):
|
||||
ns = 4 - o.count ("\n")
|
||||
return o + "\n" * ns + "%.02f%%" % (float(count) / float(cap) * 100)
|
||||
def set_tap_info(self, (block, n), count, cap):
|
||||
def _set_tap_info(o, _count, _cap):
|
||||
ns = 4 - o.count ("\n")
|
||||
return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100)
|
||||
|
||||
def set_tap_info(j, (b, n), count, cap):
|
||||
j[b][n + 1] = _set_tap_info (j[b][n + 1], count, cap)
|
||||
if not cap:
|
||||
cap = 1
|
||||
self.heatmap[block][n + 1] = _set_tap_info (self.heatmap[block][n + 1], count, cap)
|
||||
|
||||
def heatmap_color (v):
|
||||
colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]]
|
||||
fb = 0
|
||||
if v <= 0:
|
||||
idx1, idx2 = 0, 0
|
||||
elif v >= 1:
|
||||
idx1, idx2 = len(colors) - 1, len(colors) - 1
|
||||
else:
|
||||
val = v * (len(colors) - 1)
|
||||
idx1 = int(floor(val))
|
||||
idx2 = idx1 + 1
|
||||
fb = val - float(idx1)
|
||||
@staticmethod
|
||||
def heatmap_color (v):
|
||||
colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]]
|
||||
fb = 0
|
||||
if v <= 0:
|
||||
idx1, idx2 = 0, 0
|
||||
elif v >= 1:
|
||||
idx1, idx2 = len(colors) - 1, len(colors) - 1
|
||||
else:
|
||||
val = v * (len(colors) - 1)
|
||||
idx1 = int(floor(val))
|
||||
idx2 = idx1 + 1
|
||||
fb = val - float(idx1)
|
||||
|
||||
r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0]
|
||||
g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
|
||||
b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
|
||||
r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0]
|
||||
g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
|
||||
b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
|
||||
|
||||
r, g, b = [x * 255 for x in r, g, b]
|
||||
return "#%02x%02x%02x" % (r, g, b)
|
||||
r, g, b = [x * 255 for x in r, g, b]
|
||||
return "#%02x%02x%02x" % (r, g, b)
|
||||
|
||||
# Load the keylog
|
||||
def load_keylog(fname, restrict_row):
|
||||
keylog = {}
|
||||
total = 0
|
||||
with open(fname, "r") as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
m = re.search ('KL: col=(\d+), row=(\d+)', line)
|
||||
def __init__(self, layout):
|
||||
self.log = {}
|
||||
self.total = 0
|
||||
self.max_cnt = 0
|
||||
self.layout = layout
|
||||
|
||||
def update_log(self, (c, r)):
|
||||
if not (c, r) in self.log:
|
||||
self.log[(c, r)] = 0
|
||||
self.log[(c, r)] = self.log[(c, r)] + 1
|
||||
self.total = self.total + 1
|
||||
if self.max_cnt < self.log[(c, r)]:
|
||||
self.max_cnt = self.log[(c, r)]
|
||||
|
||||
def get_heatmap(self):
|
||||
with open("%s/heatmap-layout.%s.json" % (dirname(sys.argv[0]), self.layout), "r") as f:
|
||||
self.heatmap = json.load (f)
|
||||
|
||||
## Reset colors
|
||||
for row in self.coords:
|
||||
for coord in row:
|
||||
if coord != []:
|
||||
self.set_bg (coord, "#d9dae0")
|
||||
|
||||
for (c, r) in self.log:
|
||||
coords = self.coord(c, r)
|
||||
b, n = coords
|
||||
cap = self.max_cnt
|
||||
if cap == 0:
|
||||
cap = 1
|
||||
v = float(self.log[(c, r)]) / cap
|
||||
self.set_bg (coords, self.heatmap_color (v))
|
||||
self.set_tap_info (coords, self.log[(c, r)], self.total)
|
||||
return self.heatmap
|
||||
|
||||
def get_stats(self):
|
||||
usage = [
|
||||
# left hand
|
||||
[0, 0, 0, 0, 0],
|
||||
# right hand
|
||||
[0, 0, 0, 0, 0]
|
||||
]
|
||||
finger_map = [0, 0, 1, 2, 3, 4, 4]
|
||||
for (c, r) in self.log:
|
||||
if r == 5: # thumb cluster
|
||||
if c <= 6: # left side
|
||||
usage[0][4] = usage[0][4] + self.log[(c, r)]
|
||||
else:
|
||||
usage[1][4] = usage[1][4] + self.log[(c, r)]
|
||||
else:
|
||||
fc = c
|
||||
hand = 0
|
||||
if fc >= 7:
|
||||
fc = fc - 7
|
||||
hand = 1
|
||||
fm = finger_map[fc]
|
||||
usage[hand][fm] = usage[hand][fm] + self.log[(c, r)]
|
||||
hand_usage = [0, 0]
|
||||
for f in usage[0]:
|
||||
hand_usage[0] = hand_usage[0] + f
|
||||
for f in usage[1]:
|
||||
hand_usage[1] = hand_usage[1] + f
|
||||
|
||||
total = self.total
|
||||
if total == 0:
|
||||
total = 1
|
||||
stats = {
|
||||
"hands": {
|
||||
"left": {
|
||||
"usage": float(hand_usage[0]) / total * 100,
|
||||
"fingers": {
|
||||
"0 - pinky": 0,
|
||||
"1 - ring": 0,
|
||||
"2 - middle": 0,
|
||||
"3 - index": 0,
|
||||
"4 - thumb": 0,
|
||||
}
|
||||
},
|
||||
"right": {
|
||||
"usage": float(hand_usage[1]) / total * 100,
|
||||
"fingers": {
|
||||
"0 - thumb": 0,
|
||||
"1 - index": 0,
|
||||
"2 - middle": 0,
|
||||
"3 - ring": 0,
|
||||
"4 - pinky": 0,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
hmap = ['left', 'right']
|
||||
fmap = ['0 - pinky', '1 - ring', '2 - middle', '3 - index', '4 - thumb',
|
||||
'0 - thumb', '1 - index', '2 - middle', '3 - ring', '4 - pinky']
|
||||
for hand_idx in range(len(usage)):
|
||||
hand = usage[hand_idx]
|
||||
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
|
||||
return stats
|
||||
|
||||
def dump_all(out_dir, heatmaps):
|
||||
for layer in heatmaps.keys():
|
||||
if len(heatmaps[layer].log) == 0:
|
||||
continue
|
||||
|
||||
with open ("%s/%s.json" % (out_dir, layer), "w") as f:
|
||||
json.dump(heatmaps[layer].get_heatmap(), f)
|
||||
print >>sys.stderr, "%s stats:" % (layer)
|
||||
json.dump (heatmaps[layer].get_stats(), sys.stderr,
|
||||
indent = 4, sort_keys = True)
|
||||
print >>sys.stderr, ""
|
||||
print >>sys.stderr, ""
|
||||
|
||||
def main(opts):
|
||||
|
||||
heatmaps = {"Dvorak": Heatmap("Dvorak"),
|
||||
"ADORE": Heatmap("ADORE")
|
||||
}
|
||||
cnt = 0
|
||||
restrict_row = opts.restrict_row
|
||||
out_dir = opts.outdir
|
||||
|
||||
while True:
|
||||
line = sys.stdin.readline()
|
||||
if not line:
|
||||
break
|
||||
m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group (2)), int(m.group (1)))
|
||||
if restrict_row != None and r != int(restrict_row):
|
||||
|
||||
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
|
||||
if (c, r) in keylog:
|
||||
keylog[(c, r)] = keylog[(c, r)] + 1
|
||||
else:
|
||||
keylog[(c, r)] = 1
|
||||
total = total + 1
|
||||
return total / 2, keylog
|
||||
|
||||
def l_flat(s):
|
||||
f = s.split("\n")
|
||||
return ", ".join (f)
|
||||
heatmaps[l].update_log ((c, r))
|
||||
|
||||
def main(base_fn, log_fn, restrict_row = None):
|
||||
if opts.dump_interval != -1 and cnt >= opts.dump_interval:
|
||||
cnt = 0
|
||||
dump_all(out_dir, heatmaps)
|
||||
|
||||
with open(base_fn, "r") as f:
|
||||
layout = json.load (f)
|
||||
|
||||
## Reset colors
|
||||
for row in cr_coord_map:
|
||||
for col in row:
|
||||
if col != []:
|
||||
set_bg (layout, col, "#d9dae0")
|
||||
#set_attr_at (layout, col[0], col[1], "g", set_attr, True)
|
||||
|
||||
total, log = load_keylog (log_fn, restrict_row)
|
||||
max_cnt = 0
|
||||
for (c, r) in log:
|
||||
max_cnt = max(max_cnt, log[(c, r)])
|
||||
|
||||
# Create the heatmap
|
||||
for (c, r) in log:
|
||||
coords = coord(c, r)
|
||||
b, n = coords
|
||||
cap = max_cnt
|
||||
v = float(log[(c, r)]) / cap
|
||||
print >> sys.stderr, "%s => %d/%d => %f = %s" % (l_flat(layout[b][n+1]), log[(c,r)], cap, v, heatmap_color(v))
|
||||
set_bg (layout, coord(c, r), heatmap_color (v))
|
||||
set_tap_info (layout, coord (c, r), log[(c, r)], total)
|
||||
|
||||
print json.dumps(layout)
|
||||
dump_all (out_dir, heatmaps)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 3:
|
||||
print """Log to Heatmap -- creates a heatmap out of keyboard logs
|
||||
|
||||
Usage: log-to-heatmap.py base-layout.json logfile [row] >layout.json"""
|
||||
sys.exit (1)
|
||||
main(*sys.argv[1:])
|
||||
parser = argparse.ArgumentParser (description = "keylog to heatmap processor")
|
||||
parser.add_argument ('outdir', action = 'store',
|
||||
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,
|
||||
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,
|
||||
default = [], help = 'Ignore the specified columns')
|
||||
args = parser.parse_args()
|
||||
main(args)
|
||||
|
|
|
@ -0,0 +1,527 @@
|
|||
/* TypeMatrix-2030-like keymap */
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "action_util.h"
|
||||
#include "led.h"
|
||||
#include "keymap_extras/keymap_bepo.h"
|
||||
#include "keymap_extras/keymap_canadian_multilingual.h"
|
||||
|
||||
enum layers {
|
||||
LR_BASE, // default layer
|
||||
LR_CSA, // BÉPO over Canadian Multilingual (CSA)
|
||||
LR_CSA_SFT, // shifted BÉPO over CSA
|
||||
LR_CSA_AGR, // altgr-ed BÉPO over CSA
|
||||
LR_CSA_AGR_SFT, // altgr-shifted BÉPO over CSA
|
||||
LR_NUMR, // numeric layer
|
||||
LR_FN, // fn layer
|
||||
};
|
||||
|
||||
#define IS_CA_MULT_ENABLED() (layer_state & (1 << LR_CSA))
|
||||
|
||||
enum macros {
|
||||
// Characters that do not exist in CSA and must be implemented based on unicode support
|
||||
// Note: these are intentionally declared first to be used as indexes in spec_chars below
|
||||
UC_NDSH, // –
|
||||
UC_MDSH, // —
|
||||
UC_ELPS, // …
|
||||
END_UC, // indicates the last unicode character macro
|
||||
// other macros
|
||||
M_CSA_SFT, // toggle shift on CSA
|
||||
M_CSA_AGR_SFT, // toggle shift on LR_CSA_AGR (goes to LR_CSA_AGR_SFT)
|
||||
M_CSA_SFT_AGR, // toggle AltGr on LR_CSA_SFT (goes to LR_CSA_AGR_SFT)
|
||||
// macros for characters that need to be un-shifted in LR_CA_MULT_SHIFT
|
||||
M_1,
|
||||
M_2,
|
||||
M_3,
|
||||
M_4,
|
||||
M_5,
|
||||
M_6,
|
||||
M_7,
|
||||
M_8,
|
||||
M_9,
|
||||
M_0,
|
||||
M_DEGR,
|
||||
M_SCLN,
|
||||
M_GRV,
|
||||
M_NBSP,
|
||||
// macros for characters that don't have a simple key combination in LR_CA_MULT_ALTGR
|
||||
M_CRC,
|
||||
// other layer macros
|
||||
M_DBL0, // double 0
|
||||
M_FNLR, // fn layer
|
||||
M_NMAL, // num+alt
|
||||
};
|
||||
|
||||
#define CSA(name) M(M_CSA_##name) // calls a CSA macro
|
||||
|
||||
const uint16_t unicode_chars[] = {
|
||||
[UC_NDSH] = L'–',
|
||||
[UC_MDSH] = L'—',
|
||||
[UC_ELPS] = L'…',
|
||||
};
|
||||
|
||||
/* shortcut for unicode character macros */
|
||||
#define MUC(name) M(UC_##name) // calls a unicode macro
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z |
|
||||
* |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------|
|
||||
* | = | A | U | I | E | , |------| |------| C | T | S | R | N | M |
|
||||
* |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------|
|
||||
* | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------. ,-------------.
|
||||
* | Esc | num | | Left |Right |
|
||||
* ,------+-------+------| |------+------+------.
|
||||
* | | | PgUp | | Up | | |
|
||||
* |Space | Home |------| |------| End |Space |
|
||||
* | | | PgDn | | Down | | |
|
||||
* `---------------------' `--------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[LR_BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT,
|
||||
KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC,
|
||||
BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM,
|
||||
KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT,
|
||||
KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), KC_LALT,
|
||||
|
||||
KC_ESC, TG(LR_NUMR),
|
||||
KC_PGUP,
|
||||
KC_SPC, KC_HOME, KC_PGDN,
|
||||
|
||||
// right hand
|
||||
KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W,
|
||||
KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
|
||||
BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
|
||||
KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT,
|
||||
BP_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL,
|
||||
|
||||
KC_LEFT, KC_RGHT,
|
||||
KC_UP,
|
||||
KC_DOWN, KC_END, KC_SPC
|
||||
),
|
||||
/**
|
||||
* Same as default but for use with Canadian Multilingual on OS side
|
||||
*/
|
||||
[LR_CSA] = KEYMAP(
|
||||
// left hand
|
||||
KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS,
|
||||
KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS,
|
||||
KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM,
|
||||
CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, 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
|
||||
KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W,
|
||||
KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
|
||||
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
|
||||
KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT),
|
||||
MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Shifted BÉPO over Canadian Multilingual
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | # | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | ! | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ° | | | | | ; |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | : | | | | | ? | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | ` | | | |
|
||||
* `----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[LR_CSA_SFT] = KEYMAP(
|
||||
// left hand
|
||||
KC_HASH, M(M_1), M(M_2), M(M_3), M(M_4), M(M_5), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
M(M_DEGR),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_SCLN),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COLN, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
M(M_NBSP), KC_TRNS, KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS,
|
||||
KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
CSA(SFT_AGR), M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(M_NBSP)
|
||||
),
|
||||
/* AltGr-ed BÉPO over Canadian Multilingual
|
||||
* "////" indicates that the key is disabled (unsupported bépo character)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | – | — | < | > | [ | ] | | | | ^ | ± | //// | ÷ | × | dead ˘ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | |dead '| & | œ |dead `| | | | ¡ |dead ˇ| ð | //// | ij | ////// |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ////// | æ | ù |dead "| € | ̛’ |------| |------| © | þ | ß | ® |dead ~| dead ¯ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | \ | { | } | … | ~ | | | | ¿ |dead °| μ | //// |dead ˛| |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | //// | |dead ¸| |
|
||||
* `----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | _ | |------| |------| | _ |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[LR_CSA_AGR] = KEYMAP(
|
||||
// left hand
|
||||
MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS,
|
||||
KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS,
|
||||
KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT,
|
||||
CSA(AGR_SFT), CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_UNDS, CSA(AGR_SFT), KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV,
|
||||
KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO,
|
||||
CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR,
|
||||
KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, CSA(AGR_SFT),
|
||||
KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, CSA(AGR_SFT), KC_UNDS
|
||||
),
|
||||
/* AltGr-shifted BÉPO over Canadian Multilingual
|
||||
* "////" indicates that the key is disabled (unsupported bépo character or unused in bépo)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ¶ | //// | “ | ” | //// | //// | | | | //// | ¬ | ¼ | ½ | ¾ | ////// |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ¦ | ˝ | § | Œ | ` | | | | //// | //// | Ð | //// | IJ | ////// |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ////// | Æ | Ù |dead-˙| //// | //// |------| |------| //// | Þ | ẞ | ™ | //// | º |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | //// | ‘ | ’ | //// | //// | | | | //// | //// | //// | //// | ª | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[LR_CSA_AGR_SFT] = KEYMAP(
|
||||
// left hand
|
||||
CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS,
|
||||
KC_NO, S(CSA_AE), S(CSA_UGRV), CSA_DDTA, KC_NO, KC_NO,
|
||||
CSA(AGR_SFT), KC_NO, CSA_LQOT, CSA_RQOT, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, CSA(AGR_SFT), KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_TRNS, KC_NO, CSA_NEGT, CSA_1QRT, CSA_1HLF, CSA_3QRT, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, S(CSA_ETH), KC_NO, S(CSA_IJ), KC_NO,
|
||||
KC_NO, S(CSA_THRN), S(CSA_SRPS), CSA_TM, KC_NO, CSA_ORDO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CSA_ORDA, CSA(AGR_SFT),
|
||||
CSA(SFT_AGR), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, CSA(AGR_SFT), KC_TRNS
|
||||
),
|
||||
/* Numeric Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | 0 | 00 | . |Etr/Ctl|
|
||||
* `----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | |n.lock|c.lock|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[LR_NUMR] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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
|
||||
KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_UP, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_TRNS, KC_P0, M(M_DBL0),KC_PDOT, CTL_T(KC_PENT),
|
||||
|
||||
KC_NLCK, KC_CAPS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* fn layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |~CA-mult| | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk|
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | |VolUp | | | | | | | | Pause |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | RESET | | | Calc | Mail |Browsr|------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | App | cut | copy |paste | Mute |VolDn | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | Next | | | | |
|
||||
* | Mute | play |------| |------| | |
|
||||
* | | | Prev | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[LR_FN] = KEYMAP(
|
||||
TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM,
|
||||
KC_TRNS, KC_APP, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_MPRV,
|
||||
KC_MUTE, KC_MPLY, KC_MNXT,
|
||||
|
||||
// right hand
|
||||
KC_INS, KC_EJCT, KC_PWR, KC_SLEP, KC_WAKE, KC_PSCR, KC_SLCK,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
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[] = {
|
||||
};
|
||||
|
||||
void hold_shift(void) {
|
||||
register_code(KC_LSHIFT);
|
||||
}
|
||||
|
||||
void release_shift(void) {
|
||||
unregister_code(KC_LSHIFT);
|
||||
}
|
||||
|
||||
uint16_t hextokeycode(int hex) {
|
||||
if (hex == 0x0) {
|
||||
return KC_P0;
|
||||
} else if (hex < 0xA) {
|
||||
return KC_P1 + (hex - 0x1);
|
||||
} else {
|
||||
return KC_A + (hex - 0xA);
|
||||
}
|
||||
}
|
||||
|
||||
void send_unicode(uint16_t unicode)
|
||||
{
|
||||
// For more info on how this works per OS, see here: https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input
|
||||
// Implemented for Windows:
|
||||
// Pressing ALT followed by + followed by the unicode code point in hex.
|
||||
// Requires registry key HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad set to String 1
|
||||
register_code(KC_LALT);
|
||||
register_code(KC_PPLS);
|
||||
unregister_code(KC_PPLS);
|
||||
|
||||
for (int i = 12; i >= 0; i -= 4) {
|
||||
register_code(hextokeycode((unicode >> i) & 0xF));
|
||||
unregister_code(hextokeycode((unicode >> i) & 0xF));
|
||||
}
|
||||
|
||||
unregister_code(KC_LALT);
|
||||
}
|
||||
|
||||
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 ... END_UC:
|
||||
if (record->event.pressed) {
|
||||
send_unicode(unicode_chars[id]);
|
||||
}
|
||||
break;
|
||||
case M_CSA_SFT:
|
||||
// BÉPO over CSA: toggle shift layer
|
||||
layer_invert(LR_CSA_SFT);
|
||||
if (record->event.pressed) {
|
||||
hold_shift();
|
||||
} else {
|
||||
release_shift();
|
||||
}
|
||||
break;
|
||||
case M_CSA_SFT_AGR:
|
||||
// BÉPO over CSA: from shift layer, momentary altgr+shift layer
|
||||
layer_invert(LR_CSA_AGR);
|
||||
layer_invert(LR_CSA_AGR_SFT);
|
||||
if (record->event.pressed) {
|
||||
// shift not needed for LR_CSA_AGR_SFT
|
||||
release_shift();
|
||||
} else {
|
||||
// back to shift layer
|
||||
hold_shift();
|
||||
}
|
||||
break;
|
||||
case M_CSA_AGR_SFT:
|
||||
// BÉPO over CSA: from altgr layer, momentary altgr+shift layer
|
||||
layer_invert(LR_CSA_SFT);
|
||||
layer_invert(LR_CSA_AGR_SFT);
|
||||
break;
|
||||
case M_1 ... M_0:
|
||||
case M_DEGR:
|
||||
case M_SCLN:
|
||||
case M_GRV:
|
||||
case M_NBSP:
|
||||
// macros of the shift layer that require to release shift
|
||||
if (record->event.pressed) {
|
||||
release_shift();
|
||||
switch (id) {
|
||||
case M_1 ... M_0:
|
||||
register_code(KC_1 + (id - M_1));
|
||||
break;
|
||||
case M_DEGR:
|
||||
return MACRO(DOWN(CSA_ALTGR), D(SCLN), END);
|
||||
case M_SCLN:
|
||||
return MACRO(D(SCLN), END);
|
||||
case M_GRV:
|
||||
return MACRO(I(75), DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END);
|
||||
case M_NBSP:
|
||||
// use weak mod such that pressing another key will not be affected
|
||||
add_weak_mods(MOD_BIT(CSA_ALTGR));
|
||||
return MACRO(D(SPACE), END);
|
||||
}
|
||||
} else {
|
||||
hold_shift();
|
||||
switch (id) {
|
||||
case M_1 ... M_0:
|
||||
unregister_code(KC_1 + (id - M_1));
|
||||
break;
|
||||
case M_DEGR:
|
||||
return MACRO(UP(CSA_ALTGR), U(SCLN), END);
|
||||
case M_SCLN:
|
||||
return MACRO(U(SCLN), END);
|
||||
case M_NBSP:
|
||||
del_weak_mods(MOD_BIT(CSA_ALTGR));
|
||||
return MACRO(U(SPACE), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case M_CRC:
|
||||
if (record->event.pressed) {
|
||||
return MACRO(I(75), TYPE(CSA_DCRC), T(SPACE), END);
|
||||
}
|
||||
break;
|
||||
case M_DBL0:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( I(25), T(P0), T(P0), END );
|
||||
}
|
||||
break;
|
||||
case M_FNLR:
|
||||
layer_invert(LR_NUMR);
|
||||
layer_invert(LR_FN);
|
||||
break;
|
||||
case M_NMAL:
|
||||
layer_invert(LR_NUMR);
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_LALT);
|
||||
} else {
|
||||
unregister_code(KC_LALT);
|
||||
}
|
||||
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) {
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
// led 1: numeric layer
|
||||
if (layer_state & (1 << LR_NUMR)) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
// led 2: BÉPO over Canadian Multilingual
|
||||
if (IS_CA_MULT_ENABLED()) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
// led 3: caps lock
|
||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
};
|
|
@ -0,0 +1,162 @@
|
|||
# BÉPO Keymap with firmware-remapping for software CSA layout
|
||||
|
||||
This is a keymap intended to be used with the [BÉPO layout](http://bepo.fr), a French ergonomic layout designed by following Dvorak's principles.
|
||||
|
||||
The particularity of this keymap is that it supports using the [Canadian Multilingual Standard layout](https://en.wikipedia.org/wiki/QWERTY#Canadian_Multilingual_Standard) (also known as _ACNOR keyboard_ or _CSA keyboard_, see also the [French page](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) which contains more details) on the OS side, by enabling the _CSA_ layer. This is especially useful for operating systems that natively provide CSA, but not BÉPO, like Windows. The CSA layout was chosen because it is probably the standard layout that provides the best character set coverage.
|
||||
|
||||
This keymap is based on the [tm2030](../tm2030/) keymap, whose goal was to have a [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) inspired layout for the ErgoDox EZ.
|
||||
|
||||
As this keyboard is intended for French people, the rest of this page will be in French.
|
||||
|
||||
# Keymap BÉPO avec support en firmware pour utilisation avec la disposition CSA en software
|
||||
|
||||
Cette keymap a été conçue pour être utilisée avec la [disposition BÉPO](http://bepo.fr), la disposition francophone, ergonomique et libre basée sure les principes de Dvorak.
|
||||
|
||||
La particularité de cette keymap est qu'elle supporte l'utilisation du [clavier canadien multilingue standard](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) (aussi appelé _clavier ACNOR_ ou _clavier CSA_) du côté du système d'exploitation, en activant la couche _CSA_. Ceci s'avère particulièrement utile pour les systèmes d'exploitations qui fournissent nativement le CSA, mais pas le BÉPO, comme Windows. Le clavier CSA a été choisi comme base car c'est probablement la disposition standard qui fournit la meilleure couverture en termes de caractères disponibles.
|
||||
|
||||
Cette keymap est basée sur la keymap [tm2030](../tm2030/), dont le but est de fournir une disposition inspirée du [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) pour l'ErgoDox EZ.
|
||||
|
||||
## Couche de base
|
||||
C'est la couche par défaut, proche du TypeMatrix, avec les différences suivantes:
|
||||
- La ligne du haut (les touches `F`) et la colonne de droite sont retirées, les touches correspondantes étant déplacées ailleurs.
|
||||
- Les touches situés en bas à gauche sont redisposées dans cet ordre: `Ctrl`, `fn`, `Gui`, `num+Alt`, `Alt`
|
||||
- Les touches `shuffle` (`Alt+Tab`) et `desktop` ne sont pas supportés
|
||||
- `W` est déplacé à la place de `=`
|
||||
- `=` est déplacé sous `Tab` (au lieu d'avoir un grand `Shift`)
|
||||
- `%` et `Ç` sont déplacés à la place de `Home` et `End` respectivement
|
||||
- Les flèches ainsi que `PgUp`/`PgDown`/`Home`/`End` sont déplacées sur les pouces
|
||||
|
||||
À noter que pour `W` et `Ç`, le but a été de ne pas les déplacer trop par rapport à la disposition BÉPO _standard_, afin de pouvoir repasser facilement sur un TypeMatrix ou un clavier traditionnel.
|
||||
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
| Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z |
|
||||
|--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------|
|
||||
| = | A | U | I | E | , |------| |------| C | T | S | R | N | M |
|
||||
|--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------|
|
||||
| LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
|LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl|
|
||||
`----------------------------------' `----------------------------------'
|
||||
,--------------. ,-------------.
|
||||
| Esc | num | | Left |Right |
|
||||
,------+-------+------| |------+------+------.
|
||||
| | | PgUp | | Up | | |
|
||||
|Space | Home |------| |------| End |Space |
|
||||
| | | PgDn | | Down | | |
|
||||
`---------------------' `--------------------'
|
||||
```
|
||||
|
||||
### Changer de couche
|
||||
|
||||
- Utilisez `num` pour activer/désactiver [la couche numérique](#couche-numérique)
|
||||
- Maintenez `fn` pour activer temporairement [les couches numériques et Fn](#couche-fn)
|
||||
- Maintenez `numAlt` pour activer temporairement la couche numérique combinée avec `Alt` (facilite l'utilisation des raccourcis tels que `Alt`+`F4`)
|
||||
|
||||
### Diodes
|
||||
Les diodes de l'ErgoDox EZ (côté droit) sont utilisées de la façon suivante :
|
||||
|
||||
- diode de gauche (rouge) : indique l'activation de [la couche numérique](#couche-numérique)
|
||||
- diode du milieu (verte) : indique l'activation du [mode CSA](#couche-csa)
|
||||
- diode de droite (bleue) : indique le verrouillage majuscules
|
||||
|
||||
## Couche CSA
|
||||
La couche _CSA_ est la même que la couche de base, pour une utilisation avec un clavier Canadien Multilingue configuré dans le système d'exploitation.
|
||||
|
||||
Pour l'activer, appuyez sur `fn`+`$`. La [diode](#diodes) verte indique que la couche CSA est activée.
|
||||
|
||||
### Limitations
|
||||
Seuls les caractères présents dans le clavier CSA sont parfaitement supportés. De manière générale, il s'agit des caractères suivants :
|
||||
|
||||
- toute la couche de base
|
||||
- tous les caractères accessibles en `Shift`
|
||||
- tous les caractères de la main gauche accessibles en `AltGr` à l'exception du `≠`
|
||||
- environ la moitié des caractères de la main droite accessibles en `AltGr` et la moitié des caractères accessibles en `AltGr`+`Shift` (consultez [le fichier source](keymap.c) pour voir les caractères supportés)
|
||||
|
||||
En particulier, les caractères suivants sont émulés via le support Unicode (Windows seulement):
|
||||
|
||||
- le tiret cadratin (tiret long) : —
|
||||
- le tiret demi-cadratin (demi tiret) : –
|
||||
- les points de suspension : …
|
||||
|
||||
L'implémentation actuelle ne fonctionne pas dans toutes les applications, en particulier les applications MS Office.
|
||||
|
||||
Il est probable que l'utilisation de la couche CSA ne fonctionne pas correctement dans certains jeux vidéos.
|
||||
|
||||
Cette fonctionnalité a été conçue et testée essentiellment pour Windows (7).
|
||||
|
||||
### Détails techniques
|
||||
Techniquement, la couche CSA est en réalité composée de 4 couches servant à émuler la couche de base, les appuis sur `Shift` ou `Alt` et la combinaison des deux.
|
||||
|
||||
Le changement de couches se fait par des macros afin d'activer ou désactiver plusieurs couches et la touche `Shift` en même temps.
|
||||
|
||||
Certains caractères sont également implémentés par des macros, notamment ceux de la couche `Shift` qui n'ont pas besoin de cette touche en CSA, comme les chiffres.
|
||||
|
||||
Les caractères Unicode se basent sur une implémentation spécifique et non celle fournie dans QMK — il faudrait sans doute migrer le code. Notez la façon dont ces caractères sont déclarés tels quels dans [le code source](keymap.c) (tableau `unicode_char`).
|
||||
|
||||
## Couche numérique
|
||||
Couche numérique proche du TM lorsqu'on active `num`, avec les différences suivantes :
|
||||
|
||||
- Le clavier numérique est déplacés de 1 vers le haut et vers la droite.
|
||||
- Les flèches sont décalées de 1 vers la gauche.
|
||||
- Fournit l'accès aux touches `F1` à `F12`, `caps-lock` et `num-lock`.
|
||||
|
||||
La couche numérique est indiquée par la [diode](#diodes) de gauche (rouge). Caps-lock est indiqué par la diode de droite (bleue).
|
||||
|
||||
La touche `numAlt` de [la couche de base](#couche-de-base) permet d'activer la couche numérique et la touche `Alt` simultanément, afin de faciliter les raccourcis claviers comme `Alt`+`F4`.
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
| | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
| | | | | | | | 0 | 00 | . |Etr/Ctl|
|
||||
`----------------------------------' `-----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | |n.lock|c.lock|
|
||||
,------|------|------| |------+------+------.
|
||||
| | | | | | | |
|
||||
| | |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
## Couche Fn
|
||||
Activée simultanément avec la couche numérique lorsque l'on maintient la touche `fn`. Comme sur le TM, elle fournit l'accès aux fonctionnalités suivantes :
|
||||
|
||||
- `couper`, `copier` et `coller` — attention: ne pas utiliser dans l'explorateur de fichiers.
|
||||
- monter/baisser/couper le volume — seulement accessible en main gauche, contrairement au TM.
|
||||
- piste précédente/suivante
|
||||
- calculatrice, e-mail et page d'accueil du navigateur web
|
||||
- `insert`, `power`, `sleep`, `wake`, `print screen`, `scroll-lock` et `pause`
|
||||
- ~CSA: (dés)activation de [la couche CSA](#couche-csa) sur `$`
|
||||
- RESET: rechargement du firmware avec Teensy-Loader (pour les développeurs)
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| ~CSA | | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk|
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
| | | | | | |VolUp | | | | | | | | Pause |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| RESET | | | Calc | Mail |Browsr|------| |------| | | | | | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | App | cut | copy |paste | Mute |VolDn | | | | | | | | |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
| | | | | | | | | | | |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | | | |
|
||||
,------|------|------| |------+------+------.
|
||||
| | | Next | | | | |
|
||||
| Mute | play |------| |------| | |
|
||||
| | | Prev | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
|
@ -1,2 +1,3 @@
|
|||
SLEEP_LED_ENABLE = no
|
||||
UNICODE_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "led.h"
|
||||
#include "keymap_extras/keymap_neo2.h"
|
||||
|
@ -138,11 +137,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* ┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
|
||||
* │ │ │ │ │ ✕ │ │ │ │ │ │ F9 │ F10 │ F11 │ F12 │ │
|
||||
* │ │ ┌ │ ┬ │ ┐ │ ─ │ │ │ │ │ │ │ F9 │ F10 │ F11 │ F12 │ │
|
||||
* ├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
|
||||
* │ │ │ │ │ ✓ │ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │
|
||||
* │ │ ├ │ ┼ │ ┤ │ ✓ │ ✕ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │
|
||||
* ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │
|
||||
* │ │ └ │ ┴ │ ┘ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │
|
||||
* └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
|
||||
* │ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │
|
||||
* └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
|
||||
|
@ -156,9 +155,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[FMU] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2713),KC_TRNS,KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2715),KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS,
|
||||
KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715),
|
||||
KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_MS_L, KC_MS_U,
|
||||
KC_BTN1,
|
||||
|
@ -245,6 +244,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
};
|
||||
|
||||
|
||||
|
@ -279,3 +279,14 @@ void matrix_scan_user(void)
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Override Unicode start method to use NEO_U instead of KC_U
|
||||
void unicode_input_start (void) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_LSFT);
|
||||
register_code(NEO_U);
|
||||
unregister_code(NEO_U);
|
||||
unregister_code(KC_LSFT);
|
||||
unregister_code(KC_LCTL);
|
||||
};
|
||||
|
|
After Width: | Height: | Size: 137 KiB |
|
@ -0,0 +1,180 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_norwegian.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define BASE_MAC 1 // default layer mac
|
||||
#define NUMB_FUNC 2 // numbers and function keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Keymap 0: Basic layer PC
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | * | [ | ] | { | } | ~ |Mac/PC| | ^ | $ | ( | ) | < | > | @ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | + | Q | W | E | R | T | " | | ' | Y | U | I | O | P | Å |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | / | A | S | D | F | G |------| |------| H | J | K | L | Ø | Æ |
|
||||
* |--------+------+------+------+------+------| ; | | = |------+------+------+------+------+--------|
|
||||
* | - | Z | X | C | V | B | | | | N | M | RIGHT| DOWN | UP | _ |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Alt/esc| ! | ? | : | TAB | | LEFT | _ | & | | |Num/fn|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,--------------.
|
||||
* | # | ` | |Insert| % |
|
||||
* ,------|------|------| |------+-------+------.
|
||||
* | | | ´ | | Del | | |
|
||||
* | Shift|Ctrl/.|------| |------| Enter |Space |
|
||||
* | | |GUI/, | | Bspc | | |
|
||||
* `--------------------' `---------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1),
|
||||
KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_QUO2,
|
||||
KC_PSLS, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN,
|
||||
ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB,
|
||||
KC_HASH, KC_FN7,
|
||||
KC_FN6,
|
||||
KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA),
|
||||
// right hand
|
||||
KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT,
|
||||
NO_APOS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA ,
|
||||
KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE,
|
||||
NO_EQL, KC_N, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS,
|
||||
KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2),
|
||||
KC_INSERT, KC_PERC,
|
||||
KC_DELT,
|
||||
KC_BSPC,KC_ENT,KC_SPC
|
||||
),
|
||||
/* Keymap 1: Basic layer MACS (Same as pc, except for cmd/ctrl, which are swapped)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | \ | | | { | } | | | | | $ | | | < | > | @ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | ' |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | |,/Ctrl| | | | ` | |Num/fn|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | ` | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | ´ | | | | |
|
||||
* | |GUI/. |------| |------| | |
|
||||
* | | |crtl/,| | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[BASE_MAC] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, NO_GRV_MAC,
|
||||
KC_FN10,
|
||||
KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA),
|
||||
// right hand
|
||||
KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC,
|
||||
NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_BSLS_MAC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2),
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: Number ++´ánd Fn layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | F9 | F10 | F11 | F12 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | 8 | 7 | 6 | 5 | 9 | | | | | F5 | F6 | F7 | F8 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | 4 | 3 | 2 | 1 | 0 |------| |------| | F1 | F2 | F3 | F4 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | END | PGDWN| PGUP | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | HOME | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[NUMB_FUNC] = KEYMAP(
|
||||
NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS,
|
||||
NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0,
|
||||
NO_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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
|
||||
KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_F5, KC_F6 , KC_F7, KC_F8, KC_TRNS,
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS,
|
||||
KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_PGDN, KC_PGUP, KC_TRNS,
|
||||
KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
enum macro_id {
|
||||
TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift.
|
||||
[2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed.
|
||||
[3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first.
|
||||
[4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first.
|
||||
[5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed.
|
||||
[6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed.
|
||||
[7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed.
|
||||
[8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly
|
||||
[9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly
|
||||
[10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed
|
||||
};
|
||||
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case TILDE_NO:
|
||||
return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE);
|
||||
case LESS_NO:
|
||||
return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE);
|
||||
case GRTR_NO:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE);
|
||||
case CIRC_NO:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE);
|
||||
case ACUT_NO:
|
||||
return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE);
|
||||
case GRV_NO:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE);
|
||||
case LESS_NO_MAC:
|
||||
return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE);
|
||||
case GRTR_NO_MAC:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE);
|
||||
case ACUT_NO_MAC:
|
||||
return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE);
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
# Norwegian setup with osx/pc toggle
|
||||
|
||||
## Motivation
|
||||
I wanted a Norwegian setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup.
|
||||
|
||||
## Overview
|
||||
The setup is created to be programmer friendly.
|
||||
- Most of the symbols used in code can be activated without using layers or shift key.
|
||||
- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist.
|
||||
- Navigation is prioritized, arrows below the home row.
|
||||
|
||||
## PC/Mac toggle
|
||||
The default setup is for Norwegian keyboard setting(on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard.
|
||||
|
||||
## Layers
|
||||
Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys.
|
||||
|
||||
## Tap-shift
|
||||
Tap for the next character to be shifted, hold down for regular shift.
|
||||
|
||||
## Comma dot and escape
|
||||
Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys.
|
||||
|
||||
## Numpad symbols
|
||||
+-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0.
|
||||
If you really need the norwegian symbols in a program, you can access them using the number toggle button.
|
||||
|
||||
## Layout
|
||||
|
||||
![keyboard-layout](keyboard-layout.png)
|
After Width: | Height: | Size: 95 KiB |
|
@ -0,0 +1,180 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_norwegian.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define BASE_MAC 1 // default layer mac
|
||||
#define NUMB_FUNC 2 // numbers and function keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Keymap 0: Basic layer PC
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | * | [ | ] | { | } | ~ |Mac/PC| | ^ | $ | ( | ) | < | > | @ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | + | Q | W | F | P | G | " | | ' | J | L | U | Y | Å | Æ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | / | A | R | S | T | D |------| |------| H | N | E | I | O | Ø |
|
||||
* |--------+------+------+------+------+------| ; | | = |------+------+------+------+------+--------|
|
||||
* | - | Z | X | C | V | B | | | | K | M | RIGHT| DOWN | UP | _ |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Alt/esc| ! | ? | : | TAB | | LEFT | _ | & | | |Num/fn|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,--------------.
|
||||
* | # | ` | |Insert| % |
|
||||
* ,------|------|------| |------+-------+------.
|
||||
* | | | ´ | | Del | | |
|
||||
* | Shift|Ctrl/.|------| |------| Enter |Space |
|
||||
* | | |GUI/, | | Bspc | | |
|
||||
* `--------------------' `---------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1),
|
||||
KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2,
|
||||
KC_PSLS, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN,
|
||||
ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB,
|
||||
KC_HASH, KC_FN7,
|
||||
KC_FN6,
|
||||
KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA),
|
||||
// right hand
|
||||
KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT,
|
||||
NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE ,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH,
|
||||
NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS,
|
||||
KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2),
|
||||
KC_INSERT, KC_PERC,
|
||||
KC_DELT,
|
||||
KC_BSPC,KC_ENT,KC_SPC
|
||||
),
|
||||
/* Keymap 1: Basic layer MAC (Same as pc, except for cmd/ctrl, which are swapped)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | \ | | | { | } | | | | | $ | | | < | > | @ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | ' |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | |,/Ctrl| | | | ` | |Num/fn|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | ` | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | ´ | | | | |
|
||||
* | |GUI/. |------| |------| | |
|
||||
* | | |crtl/,| | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[BASE_MAC] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, NO_GRV_MAC,
|
||||
KC_FN10,
|
||||
KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA),
|
||||
// right hand
|
||||
KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC,
|
||||
NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_BSLS_MAC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2),
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: Number ++´ánd Fn layer pc
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | F9 | F10 | F11 | F12 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | 8 | 7 | 6 | 5 | 9 | | | | | F5 | F6 | F7 | F8 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | 4 | 3 | 2 | 1 | 0 |------| |------| | F1 | F2 | F3 | F4 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | END | PGDWN| PGUP | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | HOME | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[NUMB_FUNC] = KEYMAP(
|
||||
NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS,
|
||||
NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0,
|
||||
NO_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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
|
||||
KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_F5, KC_F6 , KC_F7, KC_F8, KC_TRNS,
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS,
|
||||
KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_PGDN, KC_PGUP, KC_TRNS,
|
||||
KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
enum macro_id {
|
||||
TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift.
|
||||
[2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed.
|
||||
[3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first.
|
||||
[4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first.
|
||||
[5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed.
|
||||
[6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed.
|
||||
[7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed.
|
||||
[8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly
|
||||
[9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly
|
||||
[10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed
|
||||
};
|
||||
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case TILDE_NO:
|
||||
return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE);
|
||||
case LESS_NO:
|
||||
return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE);
|
||||
case GRTR_NO:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE);
|
||||
case CIRC_NO:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE);
|
||||
case ACUT_NO:
|
||||
return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE);
|
||||
case GRV_NO:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE);
|
||||
case LESS_NO_MAC:
|
||||
return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE);
|
||||
case GRTR_NO_MAC:
|
||||
return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE);
|
||||
case ACUT_NO_MAC:
|
||||
return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE);
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
# Norwegian Colemak setup with osx/pc toggle
|
||||
|
||||
## Motivation
|
||||
I wanted a Norwegian Colemak setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup.
|
||||
|
||||
## Overview
|
||||
The setup is created to be programmer friendly.
|
||||
- Most of the symbols used in code can be activated without using layers or shift key.
|
||||
- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist.
|
||||
- Navigation is prioritized, arrows below the home row.
|
||||
|
||||
## PC/Mac toggle
|
||||
The default setup is for Norwegian keyboard setting(not colemak software variants) on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard.
|
||||
|
||||
## Layers
|
||||
Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys.
|
||||
|
||||
## Tap-shift
|
||||
Tap for the next character to be shifted, hold down for regular shift.
|
||||
|
||||
## Comma dot and escape
|
||||
Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys.
|
||||
|
||||
## Numpad symbols
|
||||
+-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0.
|
||||
If you really need the norwegian symbols in a program, you can access them using the number toggle button.
|
||||
|
||||
## Layout
|
||||
|
||||
![keyboard-layout](keyboard-layout.png)
|
|
@ -6,23 +6,23 @@
|
|||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5,
|
||||
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS,
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5,
|
||||
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS,
|
||||
KC_LCTRL, KC_A, KC_S, KC_E, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT,
|
||||
//
|
||||
/*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
/*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
|
||||
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
|
||||
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
||||
KC_MPLY, KC_MNXT,
|
||||
/*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
/*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
|
||||
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
|
||||
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
||||
KC_MPLY, KC_MNXT,
|
||||
KC_MPRV,
|
||||
KC_RALT, KC_QUOT, KC_SPC
|
||||
KC_RALT, KC_QUOT, KC_SPC
|
||||
)
|
||||
};
|
||||
|
||||
|
|
|
@ -1,28 +1,41 @@
|
|||
# Roman's Layout
|
||||
|
||||
There is only one layer based on [Norman layout](https://normanlayout.info/).
|
||||
There is only one layer, and it is based on [Norman
|
||||
layout](https://normanlayout.info/).
|
||||
|
||||
Looking for multiple-layer layouts?
|
||||
|
||||
- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Symbols, arrows, plover, HJKL
|
||||
arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/)
|
||||
|
||||
[![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195)
|
||||
|
||||
## Functional Keys
|
||||
## How to use Vim key
|
||||
|
||||
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
|
||||
- Tap `F2` to copy screenshot to the clipboard.
|
||||
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
|
||||
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
|
||||
|
||||
## CTRL/ESC
|
||||
|
||||
CTRL and ESC are frequently used in Vim.
|
||||
It is `CTL_T(KC_ESC)` and it works this way:
|
||||
|
||||
- Tap `CTRL/ESC` to send `ESC`.
|
||||
- Hold `CTRL/ESC` to use as `CTRL`.
|
||||
|
||||
## Activate N-rollover
|
||||
## How to activate N-rollover
|
||||
|
||||
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.
|
||||
- Hold left `SHIFT` and right `SHIFT` and then tap `N`.
|
||||
|
||||
## How to make and flash on OS X
|
||||
|
||||
First you need to install few brew packages.
|
||||
|
||||
```bash
|
||||
brew tap osx-cross/avr
|
||||
brew install dfu-programmer avr-libc teensy_loader_cli
|
||||
```
|
||||
|
||||
Then you can clone this repository, make and flash your ErgoDox.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/romanzolotarev/qmk_firmware
|
||||
cd qmk_firmware/keyboards/ergodox
|
||||
# Optionally tweak ./keymaps/romanzolotarev-norman-osx/keymap.c
|
||||
SLEEP_LED_ENABLED=no KEYMAP=romanzolotarev-norman-osx make teensy
|
||||
```
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
Section "InputClass"
|
||||
Identifier "ErgoDox EZ"
|
||||
MatchIsKeyboard "on"
|
||||
MatchProduct "ErgoDox EZ ErgoDox EZ"
|
||||
Option "XkbLayout" "ergodox_yoruian"
|
||||
EndSection
|
|
@ -0,0 +1,13 @@
|
|||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
install-xorg-configuration:
|
||||
install -m 0664 90-$(KEYBOARD)-$(KEYMAP).conf \
|
||||
/etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf
|
||||
install -m 0644 $(KEYBOARD)_$(KEYMAP) \
|
||||
/usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP)
|
||||
|
||||
uninstall-xorg-configuration:
|
||||
-rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf
|
||||
-rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP)
|
|
@ -0,0 +1,102 @@
|
|||
Snarfangel's YORUIAN for the ErgoDox EZ
|
||||
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
DEFAULT
|
||||
┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓
|
||||
┃ ` │ ; │ : │ - │ / │ ( │ < ┃ ┃ > │ ) │ ^ │ * │ ~ │ Γ │ σ ┃
|
||||
┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨
|
||||
┃ ⎋ │ . │ y │ o │ r │ ? │ ✦ ┃ ┃ ✦ │ j │ v │ d │ f │ w │ q ┃
|
||||
┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨
|
||||
┃ ⎈ │ u │ i │ a │ n │ ! ├───┨ ┠───┤ m │ h │ t │ s │ c │ ⎈ ┃
|
||||
┠───┼───┼───┼───┼───┼───┤ ❖ ┃ ┃ ❖ ├───┼───┼───┼───┼───┼───┨
|
||||
┃ λ │ ' │ " │ , │ _ │ = │ ┃ ┃ │ k │ l │ p │ g │ b │ x ┃
|
||||
┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨
|
||||
┃ ⎀ │ E │ │ │ ◆ ┃ ┃ ◆ │ │ │ z │ ⎙ ┃
|
||||
┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛
|
||||
┏━━━┯━━━┓ ┏━━━┯━━━┓
|
||||
┃ ⌫ │ ⌥ ┃ ┃ ⎄ │ ↹ ┃
|
||||
┏━━━╃───┼───┨ ┠───┼───╄━━━┓
|
||||
┃ │ │ ┃ ┃ │ │ ┃
|
||||
┃ e │ ⇧ ├───┨ ┠───┤ ⏎ │ ␣ ┃
|
||||
┃ │ │ ┃ ┃ │ │ ┃
|
||||
┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛
|
||||
SHIFTED
|
||||
┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓
|
||||
┃ 9 │ 7 │ 5 │ 3 │ 1 │ [ │ { ┃ ┃ } │ ] │ 0 │ 2 │ 4 │ 6 │ 8 ┃
|
||||
┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨
|
||||
┃ │ * │ Y │ O │ R │ \ │ ┃ ┃ │ J │ V │ D │ F │ W │ Q ┃
|
||||
┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨
|
||||
┃ │ U │ I │ A │ N │ | ├───┨ ┠───┤ M │ H │ T │ S │ C │ ┃
|
||||
┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨
|
||||
┃ │ # │ $ │ @ │ & │ + │ ┃ ┃ │ K │ L │ P │ G │ B │ X ┃
|
||||
┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨
|
||||
┃ │ │ │ │ ┃ ┃ │ │ │ Z │ ┃
|
||||
┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛
|
||||
┏━━━┯━━━┓ ┏━━━┯━━━┓
|
||||
┃ │ ┃ ┃ │ ┃
|
||||
┏━━━╃───┼───┨ ┠───┼───╄━━━┓
|
||||
┃ │ │ ┃ ┃ │ │ ┃
|
||||
┃ │ ├───┨ ┠───┤ │ ┃
|
||||
┃ │ │ ┃ ┃ │ │ ┃
|
||||
┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛
|
||||
λ LAYER
|
||||
┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓
|
||||
┃ │ │ │ │ │ │ ┃ ┃ │ │ ⑤ │ ⑥ │ ⑦ │ ⑧ │ ⑨ ┃
|
||||
┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨
|
||||
┃ │ │ │ │ │ │ ┃ ┃ │ │ ① │ ② │ ③ │ ④ │ ⑩ ┃
|
||||
┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨
|
||||
┃ │ │ │ │ │ ├───┨ ┠───┤ ⎉ │ ← │ ↓ │ ↑ │ → │ ⑪ ┃
|
||||
┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨
|
||||
┃ λ │ │ │ │ │ │ ┃ ┃ │ │ ⇱ │ ⎘ │ ⎗ │ ⇲ │ ⑫ ┃
|
||||
┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨
|
||||
┃ │ │ │ │ ┃ ┃ │ │ │ │ ┃
|
||||
┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛
|
||||
┏━━━┯━━━┓ ┏━━━┯━━━┓
|
||||
┃ │ ┃ ┃ │ ┃
|
||||
┏━━━╃───┼───┨ ┠───┼───╄━━━┓
|
||||
┃ │ │ ┃ ┃ │ │ ┃
|
||||
┃ │ ├───┨ ┠───┤ │ ┃
|
||||
┃ │ │ ┃ ┃ │ │ ┃
|
||||
┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛
|
||||
|
||||
Installation (X only)
|
||||
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
1. Build and flash firmware as usual
|
||||
|
||||
2. sudo make install-xorg-configuration
|
||||
|
||||
3. Restart X
|
||||
|
||||
Features
|
||||
‾‾‾‾‾‾‾‾
|
||||
• E on the thumb
|
||||
|
||||
• Emacs-friendly
|
||||
|
||||
• Symmetric control keys for finger wear levelling
|
||||
|
||||
• Greek and subscript dead keys
|
||||
|
||||
• Compose key for arbitrary Unicode input via ~/.XCompose
|
||||
|
||||
Don't Cares
|
||||
‾‾‾‾‾‾‾‾‾‾‾
|
||||
• Easy migration from QWERTY
|
||||
|
||||
• Compatbility with non-XKB systems
|
||||
|
||||
• Mouse emulation
|
||||
|
||||
• Media keys
|
||||
|
||||
Acknowledgements
|
||||
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
Snarfangel, for designing the layout.
|
||||
|
||||
The GNU FreeFont project and Steve White, for adding new keyboard
|
||||
symbols.
|
||||
|
||||
Xah Lee, for http://xahlee.info/comp/unicode_computing_symbols.html
|
||||
|
||||
Colophon
|
||||
‾‾‾‾‾‾‾‾
|
||||
This file is best-viewed with an SVN version of GNU FreeFont Mono.
|
|
@ -0,0 +1,34 @@
|
|||
partial alphanumeric_keys modifier_keys
|
||||
xkb_symbols "ergodox_yoruian" {
|
||||
include "us"
|
||||
name[Group1]= "English (yoruian-1.0.0)";
|
||||
|
||||
replace key <KP2> { [ Multi_key, Multi_key ] };
|
||||
replace key <KP3> { [ Hyper_L, Hyper_L ] };
|
||||
replace key <AE09> { [ grave, 9 ] };
|
||||
replace key <AE07> { [ semicolon, 7 ] };
|
||||
replace key <AE05> { [ colon, 5 ] };
|
||||
replace key <AE03> { [ minus, 3 ] };
|
||||
replace key <AE01> { [ slash, 1 ] };
|
||||
replace key <AE10> { [ asciicircum, 0 ] };
|
||||
replace key <AE02> { [ percent, 2 ] };
|
||||
replace key <AE04> { [ asciitilde, 4 ] };
|
||||
replace key <AE06> { [ dead_greek, 6 ] };
|
||||
replace key <AE08> { [ dead_caron, 8 ] };
|
||||
replace key <KP1> { [ E, E ] };
|
||||
replace key <AD12> { [ period, asterisk ] };
|
||||
replace key <BKSL> { [ question, backslash ] };
|
||||
replace key <AC10> { [ exclam, bar ] };
|
||||
replace key <AC11> { [ apostrophe, numbersign ] };
|
||||
replace key <AB08> { [ quotedbl, dollar ] };
|
||||
replace key <AB09> { [ comma, at ] };
|
||||
replace key <AB10> { [ underscore, ampersand ] };
|
||||
replace key <KP0> { [ equal, plus ] };
|
||||
replace key <TLDE> { [ parenleft, bracketleft ] };
|
||||
replace key <AE11> { [ less, braceleft ] };
|
||||
replace key <AE12> { [ greater, braceright ] };
|
||||
replace key <AD11> { [ parenright, bracketright ] };
|
||||
|
||||
modifier_map none { <HYPR> };
|
||||
modifier_map Mod3 { <KP3> };
|
||||
};
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright 2016 Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
*
|
||||
* 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "yoruian.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP\
|
||||
(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8,
|
||||
ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q,
|
||||
LC, U, I, A, N, SCLN, M, H, T, S, C, RC,
|
||||
FF, QUOT, COMM, DOT, SLSH, P0, LGUI, LGUI, K, L, P, G, B, X,
|
||||
IN, P1, NO, NO, LALT, LALT, NO, NO, Z, PS,
|
||||
BSPC, RALT, P2, TAB,
|
||||
NO, NO,
|
||||
E, LSFT, NO, NO, ENT, SPC),
|
||||
[1] = KEYMAP\
|
||||
(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9,
|
||||
TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT,
|
||||
TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE,
|
||||
TR, TR, TR, TR, TR, TR, TR, TR, TR, HOME, PGDN, PGUP, END, FW,
|
||||
TR, TR, TR, TR, TR, TR, TR, TR, TR, TR,
|
||||
TR, TR, TR, TR,
|
||||
TR, TR,
|
||||
TR, TR, TR, TR, TR, TR),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
};
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* electric-indent-mode: nil
|
||||
* End:
|
||||
*/
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright 2016 Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
*
|
||||
* 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#undef KEYMAP
|
||||
#define KEYMAP\
|
||||
( \
|
||||
/* Spacial positions. */ \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
|
||||
k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
|
||||
k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \
|
||||
k55, k56, k57, k58, \
|
||||
k54, k59, \
|
||||
k53, k52, k51, k5C, k5B, k5A) \
|
||||
\
|
||||
/* Matrix positions. */ \
|
||||
{ \
|
||||
{ KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \
|
||||
{ KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \
|
||||
{ KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \
|
||||
{ KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \
|
||||
{ KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \
|
||||
{ KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \
|
||||
{ KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \
|
||||
{ KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \
|
||||
{ KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \
|
||||
{ KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \
|
||||
{ KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \
|
||||
{ KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \
|
||||
{ KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \
|
||||
{ KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \
|
||||
}
|
||||
|
||||
#define KC_ES KC_ESC
|
||||
#define KC_LC KC_LCTL
|
||||
#define KC_RC KC_RCTL
|
||||
#define KC_FF MO(1)
|
||||
#define KC_IN KC_INS
|
||||
#define KC_PS KC_PSCR
|
||||
#define KC_TR KC_TRNS
|
||||
#define KC_FT KC_F10
|
||||
#define KC_FE KC_F11
|
||||
#define KC_FW KC_F12
|
|
@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* ,------|------|------| |------+--------+------.
|
||||
* | | | PgUp | | PgDn | | |
|
||||
* | | ⇥ |------| |------| ⇥ |Enter |
|
||||
* | | | L⌥ | | L⌃ | | |
|
||||
* | | | R⌥ | | R⌃ | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
|
@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT,
|
||||
KC_GRV, KC_QUOT,
|
||||
KC_PGUP,
|
||||
KC_SPC,KC_TAB ,KC_LALT,
|
||||
KC_SPC,KC_TAB ,KC_RALT,
|
||||
// right hand
|
||||
TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
|
@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_SPC ,
|
||||
KC_ESC, KC_BSPC,
|
||||
KC_PGDN,
|
||||
KC_LCTL, KC_TAB, KC_ENT
|
||||
KC_RCTL, KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
|
@ -102,13 +102,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
/* Keymap 2: Media keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power |
|
||||
* | | F14 | F15 |PrtScr|SclLck| Pause| | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | PgUp |⌘S⌘⇥⌘R| Term | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |Safari| PgDn | | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | |BBEdit| | | |L⇧+Spc| Spc | ⏮ | ⏭ | | |
|
||||
* | | | | | |BBEdit| | | | | ⏯ | ⏮ | ⏭ | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
|
@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_F14 , KC_F15 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, /* F14 dims screen, F15 brightens */
|
||||
KC_TRNS, KC_F14 , KC_F15 , KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, /* F14 dims screen, F15 brightens */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, M(SGWF), M(TMNL), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(SAFA), KC_PGDN, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(BBED), KC_TRNS,
|
||||
|
@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), KC_TRNS, KC_TRNS, KC_PWR ,
|
||||
KC_TRNS, LGUI(KC_RBRC), LGUI(LALT(KC_UP)), KC_UP , LGUI(LALT(KC_DOWN)), KC_TRNS, KC_TRNS,
|
||||
LGUI(KC_LBRC), KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, LSFT(KC_SPC), KC_SPC , KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_END ,
|
||||
|
|
|
@ -7,7 +7,7 @@ This layout is tuned for people who…
|
|||
|
||||
## use OS X
|
||||
|
||||
This layout doesn’t make any concessions for Windows use. While it should work fine in Windows, I’m not about to devote precious keyboard space to Windows-specific shortcuts.
|
||||
While this layout should work fine in Windows, it’s not tuned for it. No sane person who primarily uses Windows would put this many Windows keys on a keyboard layout.
|
||||
|
||||
|
||||
## mouse left-handed while doing other things with the right hand
|
||||
|
@ -21,8 +21,6 @@ I tend to have my mouse in my left hand, but I like to use my other hand to make
|
|||
- Go Up and Close Just-Left Folder (⌥⌘↑)
|
||||
- Cycle through open windows in current application (⌘\` and ⌘⇧\`)
|
||||
- Cycle through tabs in current window (⌥⇥ and ⌥⇧⇥)
|
||||
- Space (page down in browsers; Quick Look in the Finder)
|
||||
- Shift-Space (page up in web browsers)
|
||||
|
||||
Because moving letter-by-letter is way slower than moving word-by-word, I added Option (⌥) to the bottommost button on the left side. This key can be held easily while holding ; (activate media layer) and pressing J and L to move left and right by word.
|
||||
|
||||
|
@ -34,11 +32,15 @@ I wanted to preserve the feel of a number of shortcuts that involve pressing lot
|
|||
- Empty Trash Without Asking for Confirmation (⇧⌥⌘⌫)
|
||||
- Shut Down Without Asking for Confirmation (⇧⌥⌘ power)
|
||||
|
||||
⇧⌥⌘⌫, when you press the backspace on the right half of the keyboard, is much more satisfying than if you curl your left hand into a claw to press all the keys on the left. Try both; you’ll agree.
|
||||
|
||||
|
||||
## use Emacs-style shortcuts
|
||||
|
||||
I press C-a, C-e, and C-k all the time. It’s difficult to press these key combinations with the control key on the bottom left and I’m too quick on the draw for the control function on the / key to work reliably, so the bottommost thumb button on the right side is another control key.
|
||||
|
||||
Having trouble remembering which thumb key is alt and which is ctrl? It’s like on the lower right of a normal keyboard — leftmost is alt, rightmost is ctrl.
|
||||
|
||||
|
||||
## use spreadsheets
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
|
@ -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.
|
|
@ -1 +1 @@
|
|||
HHKB_JP=yes
|
||||
OPT_DEFS += -DHHKB_JP
|
||||
|
|
|
@ -1 +1 @@
|
|||
HHKB_JP=yes
|
||||
OPT_DEFS += -DHHKB_JP
|
||||
|
|
|
@ -58,23 +58,19 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
|
|||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # 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
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # 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
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# 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
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
ifneq (, $(findstring yes, $(HHKB_JP)))
|
||||
OPT_DEFS += -DHHKB_JP
|
||||
endif
|
||||
# MIDI_ENABLE ?= yes # MIDI controls
|
||||
# UNICODE_ENABLE ?= yes # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
|
||||
debug-on: all
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
|
||||
|
||||
# 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 ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # 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
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# 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
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../Makefile
|
||||
endif
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
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 0x0001
|
||||
#define MANUFACTURER geekhack
|
||||
#define PRODUCT jd40v2
|
||||
#define DESCRIPTION t.m.k. keyboard firmware for JD40 MKII
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { F0, F1, F5, B4 }
|
||||
#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLED_NUM 12 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
|
@ -0,0 +1,26 @@
|
|||
#include "jd40.h"
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
|
||||
// if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// gh60_caps_led_on();
|
||||
// } else {
|
||||
// gh60_caps_led_off();
|
||||
// }
|
||||
|
||||
// if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||
// gh60_esc_led_on();
|
||||
// } else {
|
||||
// gh60_esc_led_off();
|
||||
// }
|
||||
|
||||
// if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
|
||||
// gh60_fn_led_on();
|
||||
// } else {
|
||||
// gh60_fn_led_off();
|
||||
// }
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef JD40_H
|
||||
#define JD40_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "led.h"
|
||||
|
||||
/* GH60 LEDs
|
||||
* GPIO pads
|
||||
* 0 F7 WASD LEDs
|
||||
* 1 F6 ESC LED
|
||||
* 2 F5 FN LED
|
||||
* 3 F4 POKER Arrow LEDs
|
||||
* B2 Capslock LED
|
||||
* B0 not connected
|
||||
*/
|
||||
|
||||
/*
|
||||
inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
|
||||
inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); }
|
||||
inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }
|
||||
inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); }
|
||||
inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }
|
||||
|
||||
inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
|
||||
inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
|
||||
inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
|
||||
inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); }
|
||||
inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
||||
*/
|
||||
|
||||
/* JD40 MKII keymap definition macro
|
||||
*/
|
||||
#define KEYMAP( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
||||
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
||||
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \
|
||||
K35, K36, K37, K38, K39, K40, K41, K42, K43, K44 \
|
||||
) { \
|
||||
{ KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K10, KC_##K11, KC_##K12 }, \
|
||||
{ KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_NO }, \
|
||||
{ KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO }, \
|
||||
{ KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_NO, KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_NO } \
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,164 @@
|
|||
#include "jd40.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define _BL 0
|
||||
#define _AL 1
|
||||
#define _FL 2
|
||||
#define _UL 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BL] = KEYMAP(
|
||||
F12, Q, W, E, R, T, Y, U, I, O, P, BSPC,
|
||||
TAB, A, S, D, F, G, H, J, K, L, ENT,
|
||||
LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT,
|
||||
LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT ),
|
||||
|
||||
[_AL] = KEYMAP(
|
||||
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL,
|
||||
CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT,
|
||||
TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END ),
|
||||
|
||||
[_FL] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
||||
|
||||
[_UL] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, FN4, FN5, FN11, FN10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
RGBLED_TOGGLE,
|
||||
RGBLED_STEP_MODE,
|
||||
RGBLED_INCREASE_HUE,
|
||||
RGBLED_DECREASE_HUE,
|
||||
RGBLED_INCREASE_SAT,
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay
|
||||
[1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay
|
||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer
|
||||
[3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay
|
||||
[4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
|
||||
[5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
|
||||
[6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
|
||||
[7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
|
||||
[8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
|
||||
[9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
|
||||
[10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
|
||||
[11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
|
||||
[12] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
// Layer LED indicators
|
||||
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
|
||||
uint32_t layer = layer_state;
|
||||
if (layer & (1<<1)) {
|
||||
//gh60_wasd_leds_on();
|
||||
} else {
|
||||
//gh60_wasd_leds_off();
|
||||
}
|
||||
|
||||
if (layer & (1<<2)) {
|
||||
//gh60_esc_led_on();
|
||||
} else {
|
||||
//gh60_esc_led_off();
|
||||
}
|
||||
};
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
case RGBLED_TOGGLE:
|
||||
//led operations
|
||||
if (record->event.pressed) {
|
||||
rgblight_toggle();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_HUE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_hue();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_HUE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_SAT:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_sat();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_SAT:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_sat();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_VAL:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_val();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_VAL:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
break;
|
||||
case RGBLED_STEP_MODE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_step();
|
||||
}
|
||||
break;
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
// Shift + ESC = ~
|
||||
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;
|
||||
}
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
## jd40 mkii keyboard firmware
|
||||
|
||||
Pins:
|
||||
MATRIX_ROW_PINS { F0, F1, F5, B4 }
|
||||
MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 }
|
||||
RGB_DI_PIN D3
|
||||
|
||||
======================
|
||||
|
||||
## 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/jd40 folder.
|
||||
Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Amtel Flip to program your .hex file.
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
|
||||
# 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 ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # 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
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# 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
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#endif
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
|
@ -4,6 +4,13 @@
|
|||
#endif
|
||||
#include "keymap_german.h"
|
||||
|
||||
// for intellisense, has to be commented for building
|
||||
/*
|
||||
#include "..\..\..\..\quantum\keymap_extras\keymap_german.h"
|
||||
#include "..\..\..\..\quantum\keymap_common.h"
|
||||
#include "..\..\..\..\tmk_core\common\keycode.h"
|
||||
*/
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
|
||||
|
@ -24,14 +31,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | | Ctrl | Esc |
|
||||
* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[0] = {
|
||||
{ DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS },
|
||||
{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
|
||||
{ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
|
||||
{ KC_LGUI, KC_LCTL, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_NO, KC_RCTL, KC_ESC }
|
||||
{ DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS },
|
||||
{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
|
||||
{ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
|
||||
{ KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
|
||||
},
|
||||
|
||||
/* M1 Special Characters
|
||||
|
@ -43,7 +50,7 @@ very ergonomic placement for coding
|
|||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | | Ctrl | Esc |
|
||||
* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[1] = {
|
||||
|
@ -56,37 +63,37 @@ very ergonomic placement for coding
|
|||
/* Navigation & Number Blocks
|
||||
very easy to get used to & intuituve placement
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | |
|
||||
* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | Tab | Ins | Enter| | 0 | 1 | 2 | 3 | ; |Shift |
|
||||
* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | GUI | Ctrl | Alt | M3 | M2 | Space | M2 | M3 | | Ctrl | Esc |
|
||||
* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[2] = {
|
||||
{ KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_NO },
|
||||
{ KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_INS },
|
||||
{ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_ENT },
|
||||
{ _______, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ },
|
||||
{ _______, KC_NO, KC_TAB, KC_NO, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ },
|
||||
{ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
|
||||
},
|
||||
|
||||
/* Flipped Navigation & Number Blocks for one handed use
|
||||
accessed by sliding from M2 to M3 with thumb
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
|
||||
* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | GUI | Ctrl | Alt | M3 | | Space | | M3 | | Ctrl | Esc |
|
||||
* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[3] = {
|
||||
{ KC_NO, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO },
|
||||
{ KC_INS, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO },
|
||||
{ _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
|
||||
{ _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ },
|
||||
{ _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ }
|
||||
|
@ -102,7 +109,7 @@ slide from m4 to m5 to access flipped version
|
|||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | GUI | Ctrl | Alt | M4 | M5 | Space | M5 | M4 | | Ctrl | Esc |
|
||||
* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[4] = {
|
||||
|
@ -115,19 +122,19 @@ slide from m4 to m5 to access flipped version
|
|||
|
||||
/* flipped Function & Media Keys
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | F7 | F8 | F9 | | | Print|Scroll| Pause| | |
|
||||
* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | ³ | F4 | F5 | F6 | | | Mute | Vol- | Vol+ | | |
|
||||
* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ² | F1 | F2 | F3 | | | Prev | Play | Next | |Shift |
|
||||
* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | GUI | Ctrl | Alt | | M5 | Space | M5 | | | Ctrl | Esc |
|
||||
* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[5] = {
|
||||
{ KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO },
|
||||
{ KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO },
|
||||
{ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ },
|
||||
{ KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO },
|
||||
{ KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO },
|
||||
{ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ },
|
||||
{ _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ }
|
||||
}
|
||||
};
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
check keymap.c to the layers
|
||||
|
||||
This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
|
||||
It has "üäöß" as it is optimized for a mix of German & English.
|
||||
My favourite features are the placement of the special characters often used for programming right on the home row
|
||||
and the number & navigation block combo, so you never have to move your hands from their home position.
|
||||
|
||||
Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
|
|
@ -20,7 +20,8 @@ enum planck_keycodes {
|
|||
BASE = SAFE_RANGE,
|
||||
MOVE,
|
||||
SYMB,
|
||||
FUNC
|
||||
FUNC,
|
||||
LOCK
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
|
@ -37,14 +38,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps |
|
||||
* | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_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},
|
||||
{FUNC, KC_LGUI, KC_LALT, KC_LCTL, 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, KC_CAPS}
|
||||
},
|
||||
|
||||
/* MOVE
|
||||
|
@ -87,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |-----------------------------------------------------------------------------------.
|
||||
* | | Play | Prev | Next | BL+ | | | | | | | |
|
||||
* | | Play | Prev | Next | BL+ | | | Lock | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | Mute | Vol- | Vol+ | BL- | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|
@ -96,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
*/
|
||||
[_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 },
|
||||
{_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______},
|
||||
{_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
|
||||
}
|
||||
|
@ -133,6 +134,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return false;
|
||||
break;
|
||||
case LOCK:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
} else {
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,25 +1,20 @@
|
|||
# callum’s planck layout
|
||||
|
||||
This is a layout for the grid planck, built with a few ideals in mind. These ideals are just my opinion mind! The great thing about *qmk* is that we can all afford to have different opinions about what makes a good layout:
|
||||
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 --- since 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. 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.
|
||||
- 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), since otherwise certain long key combinations become hard to make.
|
||||
- Backspace should be in the “capslock position” as God intended.
|
||||
- The keyboard should be usable without any firmware changes on any operating system. In my case that means it should work on *Windows* and *Linux* without any software modifications, while I can change the behaviour slightly on *macOS* in software since that’s my home OS. The images reflect the intended use on *macOS* **after** minor software tweaks; which will be noted.
|
||||
- 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.
|
||||
|
||||
## The `BASE` layer
|
||||
![](http://i.imgur.com/aEXOlWl.png)
|
||||
![](http://i.imgur.com/tVNI3SE.png)
|
||||
|
||||
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 don’t really use the bottom corners so there’s 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 it’s probably my next most used key that didn’t yet have a home.
|
||||
|
||||
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 simultaneosly, *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.
|
||||
|
||||
The `ctrl`, `alt`, `cmd` cluster is asymmetric around the centre so that at least one of each of the modifiers can be reached with the thumbs. The intended use is to always hit the left `cmd` and the right `ctrl`, unless an awkward key combination dictates otherwise.
|
||||
|
||||
In firmware `ctrl` and `cmd`/`GUI` are swapped with respect to the image above --- I swap them to the illustrated location when using *macOS* and leave them be for *Windows* and *Linux*. (so that `cmd-z,x,c,v,...` becomes `ctrl-z,x,c,v,...` saving me some confusion)
|
||||
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.
|
||||
|
||||
## The `MOVE` layer
|
||||
![](http://i.imgur.com/KXRSuHT.png)
|
||||
|
@ -40,9 +35,9 @@ The symbol layer has all the numbers and their usual corresponding symbols in th
|
|||
Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected.
|
||||
|
||||
## The `FUNC` layer
|
||||
![](http://i.imgur.com/skxRZiH.png)
|
||||
![](http://i.imgur.com/1VKFBBU.png)
|
||||
|
||||
The only thing of note here is that `bl+` and `bl-` are short for *backlight up* and *backlight down* respectively, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys.
|
||||
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.
|
||||
I have LEDs and sound disabled, simply because I have no need of them.
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
#define randmul 181
|
||||
#define randmod 167
|
||||
|
||||
/* Filler to make layering a bit clearer *
|
||||
* borrowed from basic keymap */
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "planck.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
#include "config.h"
|
||||
#include "quantum.h"
|
||||
|
@ -84,21 +84,22 @@ enum macro_id {
|
|||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = { /* 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
|
||||
{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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT },
|
||||
{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}
|
||||
/* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */
|
||||
},
|
||||
[_RS] = { /* 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_KP), DF(_KP), RESET, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
{_______, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[_LW] = { /* 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_KP), DF(_KP), RESET, KC_TRNS},
|
||||
{KC_TRNS, DF(_KP), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
{_______, 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, _______},
|
||||
{_______, DF(_KP), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[_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},
|
||||
|
@ -108,6 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
}
|
||||
};
|
||||
|
||||
/* What is fn_actions actually used for??? */
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
|
|
|
@ -7,16 +7,10 @@ Christopher Browne
|
|||
This was originally based on the default keyboard map, but I have been
|
||||
doing sundry experimentation:
|
||||
|
||||
1. Experiments
|
||||
1. Useful Experiments
|
||||
----------------------------------------
|
||||
|
||||
* To figure things out about the toolset
|
||||
* I'm an Emacs guy, so will be needing a fair bit of tuning
|
||||
* It made sense to mess around some with keyboard maps.
|
||||
- I tried added Workman alongside Dvorak and Colemak
|
||||
- Boy, oh boy, these don't help!!!
|
||||
- I have done 30 years of learning of Emacs key mappings, and
|
||||
these alternative keyboards massively mess me up
|
||||
- I added a keypad, originally based on keymaps/numpad.c, but
|
||||
mighty substantially revised, as that one seems to be rotated 90
|
||||
degrees from usual conventions for number pads
|
||||
|
@ -30,6 +24,7 @@ doing sundry experimentation:
|
|||
- 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 [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 :-)
|
||||
|
||||
2. Some code structure ideas
|
||||
---------------------------------------------------
|
||||
|
@ -62,3 +57,24 @@ doing sundry experimentation:
|
|||
and shift ESC off the first column so KC_LCTL and KC_LALT can
|
||||
be on the first column.
|
||||
* I needed to swap ' and ENTER
|
||||
* I tried added Workman alongside Dvorak and Colemak
|
||||
- Boy, oh boy, these don't help!!!
|
||||
- I have done 30 years of learning of Emacs key mappings, and
|
||||
these alternative keyboards massively mess me up
|
||||
|
||||
4. TODO
|
||||
---------------------------------------------------------
|
||||
|
||||
* I use tmux quite a lot; the mollat keymap seems to have some
|
||||
interesting helpers. It might be interesting to add a "tmux
|
||||
layer," or to have a few keys in a layer oriented towards that
|
||||
* The mollat tmux layer also suggests some thoughts about Emacs
|
||||
helpers.
|
||||
* I do not presently have anything that handles X11 screen
|
||||
switching, as with Control-Alt-various
|
||||
* I ought to probably look into KC_LEAD, to have some key combos
|
||||
that do not need to be concurrent
|
||||
* The jeebak keymap seems to have some neat ideas:
|
||||
- Number layer which is aggressive about having numbers in several places
|
||||
- Touch layer seems interesting
|
||||
* Trying out sgoodwin's "hold Enter down to get Shift"
|
|
@ -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 = no # 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
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define FORCE_NKRO
|
||||
#define WORKMAN_SOUND COLEMAK_SOUND
|
||||
|
||||
#endif
|
|
@ -0,0 +1,314 @@
|
|||
// 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 _DEAD 1
|
||||
#define _QWERTY 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _PLOVER 5
|
||||
#define _ADJUST 16
|
||||
|
||||
enum planck_keycodes {
|
||||
WORKMAN = SAFE_RANGE,
|
||||
DEAD,
|
||||
QWERTY,
|
||||
LOWER,
|
||||
RAISE,
|
||||
PLOVER,
|
||||
EXT_PLV,
|
||||
TOG_PLV
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
/* Workman
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | H | T | G | Y | N | E | O | I | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | M | C | V | K | L | Dead | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_WORKMAN] = {
|
||||
{KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
|
||||
{MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, KC_DOT, KC_SLSH, KC_ENT},
|
||||
{KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Workman Dead Layer
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | % | & | ? | + | @ | $ | _ | [ | ] | ! | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | / | ( | = | 0 | { | } | 1 | * | ) | - | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | 6 | 7 | 8 | 9 | | | \ | 2 | 3 | 4 | 5 | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | < | ~ | ` | , | # | ^ | > | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DEAD] = {
|
||||
{XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX},
|
||||
{XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX},
|
||||
{XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX},
|
||||
{XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* 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 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||
{KC_LCTL, KC_RALT, 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 | | | Vol+ |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Prev | Next | Vol- | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_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_VOLU, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise - KWM Interaction
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Restrt| |TgSplt|Flotng|Parent|FlScrn|InsMrk| InsW | InsS | InsN | InsE | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | Mark |Rotate|Prefix| Term | BSP |SwpMrk|SwapW |SwapS |SwapN |SwapE | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |MarkW |MarkS |MarkN |MarkE |Monocl|Float |FocusW|FocusS|FocusN|FocusE| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX},
|
||||
{XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX},
|
||||
{_______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
|
||||
{TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Workmn|Plover| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_workman[][2] = SONG(WORKMAN_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_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 DEAD:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_DEAD);
|
||||
set_oneshot_layer(_DEAD, ONESHOT_START);
|
||||
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||
}
|
||||
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 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 PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case TOG_PLV:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_R);
|
||||
register_code(KC_W);
|
||||
register_code(KC_T);
|
||||
register_code(KC_C);
|
||||
register_code(KC_P);
|
||||
register_code(KC_O);
|
||||
clear_keyboard();
|
||||
}
|
||||
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
|
|
@ -0,0 +1,41 @@
|
|||
# jhenahan's layout
|
||||
|
||||
## Layout
|
||||
|
||||
The base layer is based on the
|
||||
[Workman Dead](https://github.com/ojbucao/Workman/tree/master/mac) layout. The
|
||||
primary interaction layer is a slightly modified Workman layout with a 'dead'
|
||||
key on the third row under the middle finger. The dead key activates a layer of
|
||||
special characters.
|
||||
|
||||
## [Layers](http://www.keyboard-layout-editor.com/#/gists/2b875f7d5d76fe4408c0a5b3bd76ddae)
|
||||
### Function Layer
|
||||
|
||||
This is very slightly modified from the default, mainly just to rearrange the media keys.
|
||||
|
||||
### [KWM](https://github.com/koekeishiya/kwm) Interaction Layer
|
||||
|
||||
`kwm` is a tiling window manager for OS X. The keys defined in my keymap
|
||||
correspond to the settings I use in
|
||||
[my `kwmrc` file](https://github.com/jhenahan/dotfiles/blob/master/kwm/kwmrc).
|
||||
|
||||
### QWERTY
|
||||
|
||||
Just in case.
|
||||
|
||||
### [Plover](http://www.openstenoproject.org/plover/)
|
||||
|
||||
This layout functions exactly as a Workman layout unless you're running the Plover
|
||||
application. Includes a key for toggling Plover while it's running.
|
||||
|
||||
Add this in the appropriate section of your `plover.cfg` to allow this altered layout:
|
||||
|
||||
``` ini
|
||||
[System: English Stenotype]
|
||||
keymap[keyboard] = [["#", ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "="]], ["S-", ["q", "a"]], ["T-", ["d"]], ["K-", ["s"]], ["P-", ["r"]], ["W-", ["h"]], ["H-", ["w"]], ["R-", ["t"]], ["A-", ["m"]], ["O-", ["c"]], ["*", ["y", "g", "j", "b"]], ["-E", ["l"]], ["-U", [","]], ["-F", ["f"]], ["-R", ["n"]], ["-P", ["u"]], ["-B", ["e"]], ["-L", ["p"]], ["-G", ["o"]], ["-T", [";"]], ["-S", ["i"]], ["-D", ["BackSpace"]], ["-Z", ["'"]], ["no-op", ["\\", "]", "x", ".", "/"]], ["arpeggiate", ["space"]]]
|
||||
```
|
||||
|
||||
### Adjust Layer
|
||||
|
||||
This layer is only slightly modified from the default to remove Dvorak and
|
||||
Colemak and replace them with Workman.
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
# 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
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
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)
|
||||
CONSOLE_ENABLE = yes # 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
|
||||
|
|
|
@ -59,13 +59,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D1
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLED_NUM 28 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
|
@ -73,10 +68,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
#ifndef NO_DEBUG
|
||||
# define NO_DEBUG
|
||||
#endif
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
// #ifndef NO_PRINT
|
||||
// # define NO_PRINT
|
||||
// #endif
|
||||
|
||||
/* Only print user print statements */
|
||||
#define USER_PRINT
|
||||
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
|
|
|
@ -2,48 +2,59 @@
|
|||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#include "led.h"
|
||||
#include "mousekey.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#include "song_list.h"
|
||||
#endif
|
||||
|
||||
#define LAYER_QWERTY 0
|
||||
#define LAYER_COLEMAK 1
|
||||
#define LAYER_DVORAK 2
|
||||
#define LAYER_UPPER 3
|
||||
#define LAYER_LOWER 4
|
||||
#define LAYER_FUNCTION 5
|
||||
#define LAYER_MOUSE 6
|
||||
#define LAYER_ADJUST 7
|
||||
|
||||
#define MACRO_QWERTY 0
|
||||
#define MACRO_COLEMAK 1
|
||||
#define MACRO_DVORAK 2
|
||||
#define MACRO_UPPER 3
|
||||
#define MACRO_LOWER 4
|
||||
#define MACRO_FUNCTION 5
|
||||
#define MACRO_MOUSE 6
|
||||
#define MACRO_TIMBRE_1 7
|
||||
#define MACRO_TIMBRE_2 8
|
||||
#define MACRO_TIMBRE_3 9
|
||||
#define MACRO_TIMBRE_4 10
|
||||
#define MACRO_TEMPO_U 11
|
||||
#define MACRO_TEMPO_D 12
|
||||
#define MACRO_TONE_DEFAULT 13
|
||||
#define MACRO_MUSIC_TOGGLE 14
|
||||
#define MACRO_AUDIO_TOGGLE 16
|
||||
#define MACRO_INC_VOICE 18
|
||||
#define MACRO_DEC_VOICE 19
|
||||
#define MACRO_BACKLIGHT 20
|
||||
#define MACRO_BREATH_TOGGLE 21
|
||||
#define MACRO_BREATH_SPEED_INC 23
|
||||
#define MACRO_BREATH_SPEED_DEC 24
|
||||
#define MACRO_BREATH_DEFAULT 25
|
||||
enum keyboard_layers {
|
||||
LAYER_QWERTY = 0,
|
||||
LAYER_UPPER,
|
||||
LAYER_LOWER,
|
||||
LAYER_FUNCTION,
|
||||
LAYER_MOUSE,
|
||||
LAYER_ADJUST,
|
||||
};
|
||||
enum keyboard_macros {
|
||||
MACRO_QWERTY = 0,
|
||||
MACRO_UPPER,
|
||||
MACRO_LOWER,
|
||||
MACRO_FUNCTION,
|
||||
MACRO_MOUSE,
|
||||
MACRO_TIMBRE_1,
|
||||
MACRO_TIMBRE_2,
|
||||
MACRO_TIMBRE_3,
|
||||
MACRO_TIMBRE_4,
|
||||
MACRO_TEMPO_U,
|
||||
MACRO_TEMPO_D,
|
||||
MACRO_TONE_DEFAULT,
|
||||
MACRO_MUSIC_TOGGLE,
|
||||
MACRO_AUDIO_TOGGLE,
|
||||
MACRO_INC_VOICE,
|
||||
MACRO_DEC_VOICE,
|
||||
MACRO_BACKLIGHT,
|
||||
MACRO_BREATH_TOGGLE,
|
||||
MACRO_BREATH_SPEED_INC,
|
||||
MACRO_BREATH_SPEED_DEC,
|
||||
MACRO_BREATH_DEFAULT,
|
||||
MACRO_MOUSE_MOVE_UL,
|
||||
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_COLMK M(MACRO_COLEMAK)
|
||||
#define M_DVORK M(MACRO_DVORAK)
|
||||
#define M_UPPER M(MACRO_UPPER)
|
||||
#define M_LOWER M(MACRO_LOWER)
|
||||
#define M_FUNCT M(MACRO_FUNCTION)
|
||||
|
@ -60,6 +71,19 @@
|
|||
#define M_BSPDU M(MACRO_BREATH_SPEED_INC)
|
||||
#define M_BSPDD M(MACRO_BREATH_SPEED_DEC)
|
||||
#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)
|
||||
|
@ -77,6 +101,7 @@
|
|||
#define SC_ACLS LALT(KC_F4)
|
||||
#define SC_CCLS LCTL(KC_F4)
|
||||
|
||||
#define TG_NKRO MAGIC_TOGGLE_NKRO
|
||||
#define OS_SHFT KC_FN0
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
@ -86,146 +111,108 @@
|
|||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTY
|
||||
* .-----------------------------------------------------------------------------------------------------------.
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | BACKSP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | UP | ENTER |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | SHIFT | LEFT | DOWN | RIGHT |
|
||||
* '-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[LAYER_QWERTY] = { // QWERTY
|
||||
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
|
||||
{ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
|
||||
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_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 },
|
||||
},
|
||||
|
||||
/* COLEMAK
|
||||
* .-----------------------------------------------------------------------------------------------------------.
|
||||
* | TAB | Q | W | F | P | G | J | L | U | Y | ; | ESC |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | BACKSP | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | K | M | , | . | UP | ENTER |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | SHIFT | LEFT | DOWN | RIGHT |
|
||||
* '-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[LAYER_COLEMAK] = { // COLEMAK
|
||||
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC },
|
||||
{ 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_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 },
|
||||
},
|
||||
|
||||
/* DVORAK
|
||||
* .-----------------------------------------------------------------------------------------------------------.
|
||||
* | TAB | ' | , | . | P | Y | F | G | C | R | L | BACKSP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | ESC | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | ENTER |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | UP | DOWN | LEFT | RIGHT |
|
||||
* '-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[LAYER_DVORAK] = { // DVORAK
|
||||
{ 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 },
|
||||
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT },
|
||||
},
|
||||
|
||||
/* UPPER
|
||||
* .-----------------------------------------------------------------------------------------------------------.
|
||||
* | PRINT | F1 | F2 | F3 | F4 | NUM LK | / | 7 | 8 | 9 | - | DEL |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | CAP LK | F5 | F6 | F7 | F8 | SCR LK | * | 4 | 5 | 6 | + | INS |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | F9 | F10 | F11 | F12 | PAUSE | | 1 | 2 | 3 | ENTER | HOME |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | | | | | | 0 | 0 | | RALT | . | ENTER | END |
|
||||
* '-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[LAYER_UPPER] = { // 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_CAPS, 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, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME },
|
||||
{ _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END },
|
||||
},
|
||||
|
||||
/* LOWER
|
||||
* .-----------------------------------------------------------------------------------------------------------.
|
||||
* | | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | ^ | * | + | - | / | \ | _ | ' | " | ` | PG DN |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | | | & | ! | ~ | ; | : | = | < | > | ? | HOME |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | | | | | | | | | | | | END |
|
||||
* '-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[LAYER_LOWER] = { // LOWER
|
||||
{ _______, 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_PPLS, KC_PMNS, 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_END },
|
||||
},
|
||||
|
||||
|
||||
/* FUNCTION
|
||||
* .-----------------------------------------------------------------------------------------------------------.
|
||||
* | NUM LK | F13 | F14 | F15 | F16 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | PAUSE |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | CAP LK | F17 | F18 | F19 | F20 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | PRINT |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | SCR LK | F21 | F22 | F23 | F24 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MUTE |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | LCTRL | LWIN | FN | LALT | UPPER | PLAY | PLAY | LOWER | VOL UP | VOL DN | NEXT | PREV |
|
||||
* '-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_FUNCTION] = { // FUNCTION
|
||||
{ KC_NLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS },
|
||||
{ KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR },
|
||||
{ KC_SLCK, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE },
|
||||
{ _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT },
|
||||
},
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
|
||||
[LAYER_MOUSE] = { // MOUSE
|
||||
{ KC_ESC, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC },
|
||||
{ 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, KC_WH_U, KC_WH_D },
|
||||
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_MS_U, KC_MS_D, KC_MS_L, 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
|
||||
.-----------------------------------------------------------------------------------------------------------.
|
||||
| TAB | Q | W | E | R | T | Y | U | I | O | P | BACKSP |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ESC | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| LSHIFT | Z | X | C | V | B | N | M | , | . | UP | ENTER |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT |
|
||||
'-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[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_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_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
|
||||
.-----------------------------------------------------------------------------------------------------------.
|
||||
| PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| PAUSE | F5 | F6 | F7 | F8 | SCR LK | KP * | KP 4 | KP 5 | KP 6 | KP + | INS |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | F9 | F10 | F11 | F12 | PAUSE | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | HOME |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END |
|
||||
'-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[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_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 },
|
||||
{ _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END }
|
||||
},
|
||||
/* LAYER = LAYER_LOWER
|
||||
.-----------------------------------------------------------------------------------------------------------.
|
||||
| ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | PG DN |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | | | & | ! | ~ | ; | : | = | < | > | ? | HOME |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END |
|
||||
'-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[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_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 },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END }
|
||||
},
|
||||
/* LAYER = LAYER_FUNCTION
|
||||
.-----------------------------------------------------------------------------------------------------------.
|
||||
| XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | VOL UP | MUTE |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT |
|
||||
'-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_FUNCTION] = {
|
||||
{ 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 },
|
||||
{ _______, 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 }
|
||||
},
|
||||
/* LAYER = LAYER_MOUSE
|
||||
.-----------------------------------------------------------------------------------------------------------.
|
||||
| ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | MS WHU |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | MS U | MS WHD |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R |
|
||||
'-----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[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 },
|
||||
{ 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 },
|
||||
{ _______, _______, _______, _______, _______, 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 | MUSIC | AUDIO |
|
||||
|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
| 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 | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | 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, MU_TOG , AU_TOG },
|
||||
{ XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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 }
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
@ -234,10 +221,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
float tone_my_startup[][2] = SONG(ODE_TO_JOY);
|
||||
float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY);
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
|
||||
float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE);
|
||||
float tone_music_on[][2] = SONG(DOE_A_DEER);
|
||||
float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
|
@ -257,7 +240,7 @@ void persistant_default_layer_set(uint16_t default_layer)
|
|||
}
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_MODS_ONESHOT(MOD_LSFT),
|
||||
[0] = ACTION_MODS_ONESHOT(MOD_RSFT),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
|
@ -267,46 +250,101 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
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:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_toggle();
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_BREATH_SPEED_INC:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_inc(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_BREATH_SPEED_DEC:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_dec(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_BREATH_DEFAULT:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_defaults();
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_QWERTY:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
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;
|
||||
|
||||
case MACRO_LOWER:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_LOWER);
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
else
|
||||
{
|
||||
layer_off(LAYER_LOWER);
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -314,6 +352,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_UPPER);
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
else
|
||||
|
@ -323,13 +363,32 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
}
|
||||
break;
|
||||
|
||||
case MACRO_LOWER:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_LOWER);
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
else
|
||||
{
|
||||
layer_off(LAYER_LOWER);
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_FUNCTION:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_enable();
|
||||
layer_on(LAYER_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(LAYER_FUNCTION);
|
||||
}
|
||||
break;
|
||||
|
@ -352,6 +411,58 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
}
|
||||
break;
|
||||
|
||||
case MACRO_MOUSE_MOVE_UL:
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_MOUSE_MOVE_UR:
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_MOUSE_MOVE_DL:
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_MOUSE_MOVE_DR:
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
#endif /* MOUSEKEY_ENABLE */
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1,233 @@
|
|||
// This is sgoodwin's layout file for the Quantum project.
|
||||
// It doesn't have Plover or Dvorak layers because he doesn't use that.
|
||||
// It Also doesn't allow for swapping alt with CMD because that only happens in error.
|
||||
|
||||
#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 _QWERTY 1
|
||||
#define _COLEMAK 0
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum planck_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* 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 | , | . | / |SHEnt |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||
{KC_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, MT(MOD_RSFT, KC_ENT) },
|
||||
{ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* 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 | , | . | / |SHEnt |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
|
||||
{ALL_T(KC_NO), 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] = {
|
||||
{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),_______, _______, _______},
|
||||
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, 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] = {
|
||||
{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, _______, _______, _______},
|
||||
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff| | |Qwerty|Colemk| | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_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 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 BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
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
|
|
@ -0,0 +1,10 @@
|
|||
# sgoodwin's Planck Layout
|
||||
|
||||
Includes:
|
||||
|
||||
1. No Dvorak or Plover
|
||||
2. No alt-swapping
|
||||
3. Right enter is shift when held down, enter when tapped.
|
||||
4. Bottom left corner in normal layers is Hyper and not brightness control.
|
||||
5. Brightness is instead in the bottom corner on raise/lower.
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the makefile.mk 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 = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # 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.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
|
@ -0,0 +1,146 @@
|
|||
//Author: tong92 <tong92power@gmail.com>
|
||||
|
||||
#include "planck.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define LOWER M(1)
|
||||
#define RAISE M(2)
|
||||
#define GO_DEFT M(99)
|
||||
#
|
||||
|
||||
//MIT Layout
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: Qwerty layer (Default)
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | q | w | e | r | t | y | u | i | o | p | BS |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Ctrl | a | s | d | f | g | h | j | k | l | ; |enter|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| z | x | c | v | b | n | m | , | . | / |Shift|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[0] ={
|
||||
{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_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT },
|
||||
{KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT},
|
||||
{MO(4), KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT}
|
||||
},
|
||||
/* 1: Lower layer
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[1] ={
|
||||
{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_PLUS,KC_LBRC,KC_RBRC,KC_BSLS },
|
||||
{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
|
||||
{XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
|
||||
},
|
||||
/* 2: Upper layer
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[2] ={
|
||||
{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_EQL, KC_LCBR,KC_RCBR,KC_PIPE },
|
||||
{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
|
||||
{XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
|
||||
},
|
||||
/* 4: fn layer (Window shortcuts)
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[4] ={
|
||||
{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT},
|
||||
{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
|
||||
{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX},
|
||||
{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DELT)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,M(0)}
|
||||
},
|
||||
/* 10: mouse layer
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | |M_AC0|M_AC1|M_AC2| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | GO_DEFT | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[10] ={
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET},
|
||||
{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX},
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX},
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX}
|
||||
}
|
||||
|
||||
};
|
||||
//Layout END
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
layer_on(1);
|
||||
update_tri_layer(1, 2, 10);
|
||||
} else {
|
||||
layer_off(1);
|
||||
update_tri_layer(1, 2, 10);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
layer_on(2);
|
||||
update_tri_layer(1, 2, 10);
|
||||
} else {
|
||||
layer_off(2);
|
||||
update_tri_layer(1, 2, 10);
|
||||
}
|
||||
break;
|
||||
case 99:
|
||||
if (record->event.pressed) {
|
||||
layer_off(10);
|
||||
layer_off(1);
|
||||
layer_off(2);
|
||||
layer_on(0);
|
||||
update_tri_layer(0 ,1 ,2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
|
@ -0,0 +1,66 @@
|
|||
# The Tong92 Layout
|
||||
- MIT Layout
|
||||
- my keymap for WIndow User
|
||||
- Lower && Upper Hold -> Mouse Layer
|
||||
- Mouse Layer : space -> Default Layer
|
||||
- No Audio
|
||||
|
||||
## 1. Default Layer - Qwerty
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
|Tab | q | w | e | r | t | y | u | i | o | p | BS |
|
||||
|-----------------------------------------------------------------------|
|
||||
|Ctrl | a | s | d | f | g | h | j | k | l | ; |enter|
|
||||
|-----------------------------------------------------------------------|
|
||||
|Shift| z | x | c | v | b | n | m | , | . | / |Shift|
|
||||
|-----------------------------------------------------------------------|
|
||||
| Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt |
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 2. Lower Layer
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT|
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 3. Upper Layer
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT|
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 4. Fn Layer - Window Shortcuts
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL |
|
||||
|-----------------------------------------------------------------------|
|
||||
| |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED |
|
||||
`-----------------------------------------------------------------------'
|
||||
|
||||
## 5. Mouse Layer
|
||||
|
||||
,-----------------------------------------------------------------------.
|
||||
| | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET|
|
||||
|-----------------------------------------------------------------------|
|
||||
| | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | | | | |M_AC0|M_AC1|M_AC2| | |
|
||||
|-----------------------------------------------------------------------|
|
||||
| | | | | |GO_DEFAULT | | | | | |
|
||||
`-----------------------------------------------------------------------'
|
|
@ -1,3 +0,0 @@
|
|||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
|
@ -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.
|
|
@ -1,6 +1,12 @@
|
|||
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
|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#include "eeconfig.h"
|
||||
#include "keycode.h"
|
||||
|
||||
#ifndef KEYCODE_CONFIG_H
|
||||
#define KEYCODE_CONFIG_H
|
||||
|
||||
uint16_t keycode_config(uint16_t keycode);
|
||||
|
||||
/* NOTE: Not portable. Bit field order depends on implementation */
|
||||
|
@ -19,3 +22,5 @@ typedef union {
|
|||
} keymap_config_t;
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#endif /* KEYCODE_CONFIG_H */
|
||||
|
|
|
@ -111,6 +111,7 @@ enum quantum_keycodes {
|
|||
MAGIC_UNSWAP_BACKSLASH_BACKSPACE,
|
||||
MAGIC_UNHOST_NKRO,
|
||||
MAGIC_UNSWAP_ALT_GUI,
|
||||
MAGIC_TOGGLE_NKRO,
|
||||
|
||||
// Leader key
|
||||
#ifndef DISABLE_LEADER
|
||||
|
|
|
@ -0,0 +1,255 @@
|
|||
#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H
|
||||
#define KEYMAP_CANADIAN_MULTILINGUAG_H
|
||||
|
||||
#include "keymap.h"
|
||||
|
||||
// Alt gr
|
||||
#ifndef ALTGR
|
||||
#define ALTGR(kc) RALT(kc)
|
||||
#endif
|
||||
#ifndef ALGR
|
||||
#define ALGR(kc) ALTGR(kc)
|
||||
#endif
|
||||
|
||||
#define CSA_ALTGR KC_RALT
|
||||
#define CSA_ALGR CSA_ALTGR
|
||||
|
||||
#ifndef GR2A
|
||||
#define GR2A(kc) RCTL(kc)
|
||||
#endif
|
||||
|
||||
// Normal characters
|
||||
// First row
|
||||
#define CSA_SLASH KC_GRV // /
|
||||
#define CSA_SLSH CSA_SLASH
|
||||
|
||||
// Second row
|
||||
#define CSA_DEAD_CIRCUMFLEX KC_LBRACKET // dead ^
|
||||
#define CSA_DCRC CSA_DEAD_CIRCUMFLEX
|
||||
#define CSA_C_CEDILLA KC_RBRACKET // Ç
|
||||
#define CSA_CCED CSA_C_CEDILLA
|
||||
|
||||
// Third row
|
||||
#define CSA_E_GRAVE KC_QUOT // è
|
||||
#define CSA_EGRV CSA_E_GRAVE
|
||||
#define CSA_A_GRAVE KC_BSLASH // à
|
||||
#define CSA_AGRV CSA_A_GRAVE
|
||||
|
||||
// Fourth row
|
||||
#define CSA_U_GRAVE KC_NONUS_BSLASH // ù
|
||||
#define CSA_UGRV CSA_U_GRAVE
|
||||
#define CSA_E_ACUTE KC_SLSH // é
|
||||
#define CSA_ECUT CSA_E_ACUTE
|
||||
|
||||
// Shifted characters
|
||||
// First row
|
||||
#define CSA_BACKSLASH LSFT(CSA_SLASH) /* \ */
|
||||
#define CSA_BSLS CSA_BACKSLASH
|
||||
#define CSA_QUESTION LSFT(KC_6) // ?
|
||||
#define CSA_QEST CSA_QUESTION
|
||||
|
||||
// Second row
|
||||
#define CSA_DEAD_TREMA LSFT(CSA_DEAD_CIRCUMFLEX) // dead trema/umlaut/diaresis for ä ë ï ö ü
|
||||
#define CSA_DTRM CSA_DEAD_TREMA
|
||||
|
||||
// Third row
|
||||
// all same as US-QWERTY, or capitalised character of the non-shifted key
|
||||
|
||||
// Fourth row
|
||||
#define CSA_APOSTROPHE LSFT(KC_COMMA) // '
|
||||
#define CSA_APOS CSA_APOSTROPHE
|
||||
#define CSA_DOUBLE_QUOTE LSFT(KC_DOT) // "
|
||||
#define CSA_DQOT CSA_DOUBLE_QUOTE
|
||||
|
||||
// Alt Gr-ed characters
|
||||
// First row
|
||||
#define CSA_PIPE ALTGR(CSA_SLASH) // |
|
||||
#define CSA_CURRENCY ALTGR(KC_4) // ¤
|
||||
#define CSA_CURR CSA_CURRENCY
|
||||
#define CSA_LEFT_CURLY_BRACE ALTGR(KC_7) // {
|
||||
#define CSA_LCBR CSA_LEFT_CURLY_BRACE
|
||||
#define CSA_RIGHT_CURLY_BRACE ALTGR(KC_8) // }
|
||||
#define CSA_RCBR CSA_RIGHT_CURLY_BRACE
|
||||
#define CSA_LBRACKET ALTGR(KC_9) // [
|
||||
#define CSA_LBRC CSA_LBRACKET
|
||||
#define CSA_RBRACKET ALTGR(KC_0) // ]
|
||||
#define CSA_RBRC CSA_RBRACKET
|
||||
#define CSA_NEGATION ALTGR(KC_EQUAL) // ¬
|
||||
#define CSA_NEGT CSA_NEGATION
|
||||
|
||||
// Second row
|
||||
// euro symbol not available on Linux? (X.org)
|
||||
#define CSA_EURO ALTGR(KC_E) // €
|
||||
#define CSA_DEAD_GRAVE ALTGR(CSA_DEAD_CIRCUMFLEX)
|
||||
#define CSA_DGRV CSA_DEAD_GRAVE // dead `
|
||||
#define CSA_DEAD_TILDE ALTGR(CSA_C_CEDILLA) // ~
|
||||
#define CSA_DTLD CSA_DEAD_TILDE
|
||||
|
||||
// Third row
|
||||
#define CSA_DEGREE ALTGR(KC_SCOLON) // °
|
||||
#define CSA_DEGR CSA_DEGREE
|
||||
|
||||
// Fourth row
|
||||
#define CSA_LEFT_GUILLEMET ALTGR(KC_Z) // «
|
||||
#define CSA_LGIL CSA_LEFT_GUILLEMET
|
||||
#define CSA_RIGHT_GUILLEMET ALTGR(KC_X) // »
|
||||
#define CSA_RGIL CSA_RIGHT_GUILLEMET
|
||||
#define CSA_LESS ALTGR(KC_COMMA) // <
|
||||
#define CSA_GREATER ALTGR(KC_DOT) // >
|
||||
#define CSA_GRTR CSA_GREATER
|
||||
|
||||
// Space bar
|
||||
#define CSA_NON_BREAKING_SPACE ALTGR(KC_SPACE)
|
||||
#define CSA_NBSP CSA_NON_BREAKING_SPACE
|
||||
|
||||
// GR2A-ed characters
|
||||
// First row
|
||||
#define CSA_SUPERSCRIPT_ONE GR2A(KC_1) // ¹
|
||||
#define CSA_SUP1 CSA_SUPERSCRIPT_ONE
|
||||
#define CSA_SUPERSCRIPT_TWO GR2A(KC_2) // ²
|
||||
#define CSA_SUP2 CSA_SUPERSCRIPT_TWO
|
||||
#define CSA_SUPERSCRIPT_THREE GR2A(KC_3) // ³
|
||||
#define CSA_SUP3 CSA_SUPERSCRIPT_THREE
|
||||
#define CSA_ONE_QUARTER GR2A(KC_4) // ¼
|
||||
#define CSA_1QRT CSA_ONE_QUARTER
|
||||
#define CSA_ONE_HALF GR2A(KC_5) // ½
|
||||
#define CSA_1HLF CSA_ONE_HALF
|
||||
#define CSA_THREE_QUARTERS GR2A(KC_6) // ¾
|
||||
#define CSA_3QRT CSA_THREE_QUARTERS
|
||||
// nothing on 7-0 and -
|
||||
#define CSA_DEAD_CEDILLA GR2A(KC_EQUAL) // dead ¸
|
||||
#define CSA_DCED CSA_DEAD_CEDILLA
|
||||
|
||||
// Second row
|
||||
#define CSA_OMEGA GR2A(KC_Q) // ω
|
||||
#define CSA_OMEG CSA_OMEGA
|
||||
#define CSA_L_STROKE GR2A(KC_W) // ł
|
||||
#define CSA_LSTK CSA_L_STROKE
|
||||
#define CSA_OE_LIGATURE GR2A(KC_E) // œ
|
||||
#define CSA_OE CSA_OE_LIGATURE
|
||||
#define CSA_PARAGRAPH GR2A(KC_R) // ¶
|
||||
#define CSA_PARG CSA_PARAGRAPH
|
||||
#define CSA_T_STROKE GR2A(KC_T) // ŧ
|
||||
#define CSA_LEFT_ARROW GR2A(KC_Y) // ←
|
||||
#define CSA_LARW CSA_LEFT_ARROW
|
||||
#define CSA_DOWN_ARROW GR2A(KC_U) // ↓
|
||||
#define CSA_DARW CSA_DOWN_ARROW
|
||||
#define CSA_RIGHT_ARROW GR2A(KC_I) // →
|
||||
#define CSA_RARW CSA_RIGHT_ARROW
|
||||
#define CSA_O_STROKE GR2A(KC_O) // ø
|
||||
#define CSA_OSTK CSA_O_STROKE
|
||||
#define CSA_THORN GR2A(KC_P) // þ
|
||||
#define CSA_THRN CSA_THORN
|
||||
// nothing on ^
|
||||
#define CSA_TILDE GR2A(CSA_C_CEDILLA) // dead ~
|
||||
#define CSA_TILD CSA_TILDE
|
||||
|
||||
// Third row
|
||||
#define CSA_AE_LIGATURE GR2A(KC_A) // æ
|
||||
#define CSA_AE CSA_AE_LIGATURE
|
||||
#define CSA_SHARP_S GR2A(KC_S) // ß
|
||||
#define CSA_SRPS CSA_SHARP_S
|
||||
#define CSA_ETH GR2A(KC_D) // ð
|
||||
// nothing on F
|
||||
#define CSA_ENG GR2A(KC_G) // ŋ
|
||||
#define CSA_H_SRTOKE GR2A(KC_H) // ħ
|
||||
#define CSA_HSTK CSA_H_SRTOKE
|
||||
#define CSA_IJ_LIGATURE GR2A(KC_J) // ij
|
||||
#define CSA_IJ CSA_IJ_LIGATURE
|
||||
#define CSA_KRA GR2A(KC_K) // ĸ
|
||||
#define CSA_L_FLOWN_DOT GR2A(KC_L) // ŀ
|
||||
#define CSA_LFLD CSA_L_FLOWN_DOT
|
||||
#define CSA_DEAD_ACUTE GR2A(KC_SCLN) // dead acute accent
|
||||
#define CSA_DACT CSA_DEAD_ACUTE
|
||||
// nothing on È & À
|
||||
|
||||
// Fourth row
|
||||
#define CSA_CENT GR2A(KC_C) // ¢
|
||||
#define CSA_LEFT_DOUBLE_QUOTE GR2A(KC_V) // “
|
||||
#define CSA_LDQT CSA_LEFT_DOUBLE_QUOTE
|
||||
#define CSA_RIGHT_DOUBLE_QUOTE GR2A(KC_B) // ”
|
||||
#define CSA_RDQT CSA_RIGHT_DOUBLE_QUOTE
|
||||
#define CSA_N_APOSTROPHE GR2A(KC_N) // ʼn (deprecated unicode codepoint)
|
||||
#define CSA_NAPO CSA_N_APOSTROPHE
|
||||
#define CSA_MU GR2A(KC_M) // μ
|
||||
#define CSA_HORIZONTAL_BAR GR2A(KC_COMMA) // ―
|
||||
#define CSA_HZBR CSA_HORIZONTAL_BAR
|
||||
#define CSA_DEAD_DOT_ABOVE GR2A(KC_DOT) // dead ˙
|
||||
#define CSA_DDTA CSA_DEAD_DOT_ABOVE
|
||||
|
||||
// GR2A-shifted characters (different from capitalised GR2A-ed characters)
|
||||
// First row
|
||||
#define CSA_SOFT_HYPHEN GR2A(LSFT(CSA_SLASH)) // soft-hyphen, appears as a hyphen in wrapped word
|
||||
#define CSA_SHYP CSA_SOFT_HYPHEN
|
||||
#define CSA_INVERTED_EXCLAIM GR2A(KC_EXCLAIM) // ¡
|
||||
#define CSA_IXLM CSA_INVERTED_EXCLAIM
|
||||
// nothing on 2
|
||||
#define CSA_POUND GR2A(LSFT(KC_3)) // £
|
||||
#define CSA_GBP CSA_POUND_SIGN
|
||||
// already on ALTGR(KC_E)
|
||||
#define CSA_EURO_BIS GR2A(LSFT(KC_4)) // €
|
||||
#define CSA_EURB CSA_EURO_BIS
|
||||
#define CSA_THREE_EIGHTHS GR2A(LSFT(KC_5)) // ⅜
|
||||
#define CSA_3ON8 CSA_THREE_EIGHTHS
|
||||
#define CSA_FIVE_EIGHTHS GR2A(LSFT(KC_6)) // ⅝
|
||||
#define CSA_5ON8 CSA_FIVE_EIGHTHS
|
||||
#define CSA_SEVEN_EIGHTHS GR2A(LSFT(KC_7)) // ⅞
|
||||
#define CSA_7ON8 CSA_SEVEN_EIGHTHS
|
||||
#define CSA_TRADEMARK GR2A(LSFT(KC_8)) // ™
|
||||
#define CSA_TM CSA_TRADEMARK
|
||||
#define CSA_PLUS_MINUS GR2A(LSFT(KC_9)) // ±
|
||||
#define CSA_PSMS CSA_PLUS_MINUS
|
||||
// nothing on 0
|
||||
#define CSA_INVERTED_QUESTION GR2A(LSFT(KC_MINUS)) // ¿
|
||||
#define CSA_IQST CSA_INVERTED_QUESTION
|
||||
#define CSA_DEAD_OGONEK GR2A(LSFT(KC_EQUAL)) // dead ˛
|
||||
#define CSA_DOGO CSA_DEAD_OGONEK
|
||||
|
||||
// Second row
|
||||
#define CSA_REGISTERED_TRADEMARK GR2A(LSFT(KC_R)) // ®
|
||||
#define CSA_RTM CSA_REGISTERED_TRADEMARK
|
||||
#define CSA_YEN GR2A(LSFT(KC_Y)) // ¥
|
||||
#define CSA_YUAN CSA_YEN
|
||||
#define CSA_UP_ARROW LSFT(CSA_DOWN_ARROW) // ↑
|
||||
#define CSA_DOTLESS_I GR2A(LSFT(KC_I)) // ı
|
||||
#define CSA_DLSI CSA_DOTLESS_I
|
||||
#define CSA_DEAD_RING GR2A(LSFT(CSA_DCRC)) // dead °
|
||||
#define CSA_DRNG CSA_DEAD_RING
|
||||
#define CSA_DEAD_MACRON GR2A(LSFT(CSA_C_CEDILLA)) // dead ¯
|
||||
#define CSA_DMCR CSA_DEAD_MACRON
|
||||
|
||||
// Third row
|
||||
#define CSA_SECTION GR2A(LSFT(KC_S)) // §
|
||||
#define CSA_SECT CSA_SECTION
|
||||
#define CSA_ORDINAL_INDICATOR_A GR2A(LSFT(KC_F)) // ª
|
||||
#define CSA_ORDA CSA_ORDINAL_INDICATOR_A
|
||||
#define CSA_DEAD_DOUBLE_ACUTE LSFT(CSA_DEAD_ACUTE) // ˝
|
||||
#define CSA_DDCT CSA_DEAD_DOUBLE_ACUTE
|
||||
#define CSA_DEAD_CARON GR2A(LSFT(CSA_E_GRAVE)) // dead ˇ
|
||||
#define CSA_DCAR CSA_DEAD_CARON
|
||||
#define CSA_DEAD_BREVE GR2A(LSFT(CSA_A_GRAVE)) // dead ˘
|
||||
#define CSA_DBRV CSA_DEAD_BREVE
|
||||
|
||||
// Fourth row
|
||||
#define CSA_BROKEN_PIPE GR2A(LSFT(CSA_U_GRAVE)) // ¦
|
||||
#define CSA_BPIP CSA_BROKEN_PIPE
|
||||
#define CSA_COPYRIGHT GR2A(LSFT(KC_C)) // ©
|
||||
#define CSA_CPRT CSA_COPYRIGHT
|
||||
#define CSA_LEFT_QUOTE GR2A(LSFT(KC_V)) // ‘
|
||||
#define CSA_LQOT CSA_LEFT_QUOTE
|
||||
#define CSA_RIGHT_QUOTE GR2A(LSFT(KC_B)) // ’
|
||||
#define CSA_RQOT CSA_RIGHT_QUOTE
|
||||
#define CSA_EIGHTH_NOTE GR2A(LSFT(KC_N)) // ♪
|
||||
#define CSA_8NOT CSA_EIGHTH_NOTE
|
||||
#define CSA_ORDINAL_INDICATOR_O GR2A(LSFT(KC_M)) // º
|
||||
#define CSA_ORDO CSA_ORDINAL_INDICATOR_O
|
||||
#define CSA_TIMES GR2A(LSFT(KC_COMMA)) // ×
|
||||
#define CSA_TIMS CSA_TIMES
|
||||
#define CSA_OBELUS GR2A(LSFT(KC_DOT)) // ÷
|
||||
#define CSA_OBEL CSA_OBELUS
|
||||
// more conventional name of the symbol
|
||||
#define CSA_DIVISION_SIGN CSA_OBELUS
|
||||
#define CSA_DVSN CSA_DIVISION_SIGN
|
||||
// TODO GR2A(LSFT(CSA_E_ACUTE))
|
||||
|
||||
#endif
|
|
@ -65,9 +65,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
|||
highest_td = idx;
|
||||
action = &tap_dance_actions[idx];
|
||||
|
||||
action->state.keycode = keycode;
|
||||
action->state.pressed = record->event.pressed;
|
||||
if (record->event.pressed) {
|
||||
action->state.keycode = keycode;
|
||||
action->state.count++;
|
||||
action->state.timer = timer_read();
|
||||
|
||||
|
@ -77,8 +77,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
|||
process_tap_dance_action_on_dance_finished (paction);
|
||||
reset_tap_dance (&paction->state);
|
||||
}
|
||||
|
||||
last_td = keycode;
|
||||
}
|
||||
last_td = keycode;
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@ void set_unicode_input_mode(uint8_t os_target)
|
|||
input_mode = os_target;
|
||||
}
|
||||
|
||||
uint8_t get_unicode_input_mode(void) {
|
||||
return input_mode;
|
||||
}
|
||||
|
||||
__attribute__((weak))
|
||||
void unicode_input_start (void) {
|
||||
switch(input_mode) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#endif
|
||||
|
||||
void set_unicode_input_mode(uint8_t os_target);
|
||||
uint8_t get_unicode_input_mode(void);
|
||||
void unicode_input_start(void);
|
||||
void unicode_input_finish(void);
|
||||
void register_hex(uint16_t hex);
|
||||
|
|
|
@ -199,7 +199,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||
return false;
|
||||
break;
|
||||
#endif
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI:
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO:
|
||||
if (record->event.pressed) {
|
||||
// MAGIC actions (BOOTMAGIC without the boot)
|
||||
if (!eeconfig_is_enabled()) {
|
||||
|
@ -207,48 +207,73 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||
}
|
||||
/* keymap config */
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
if (keycode == MAGIC_SWAP_CONTROL_CAPSLOCK) {
|
||||
keymap_config.swap_control_capslock = 1;
|
||||
} else if (keycode == MAGIC_CAPSLOCK_TO_CONTROL) {
|
||||
keymap_config.capslock_to_control = 1;
|
||||
} else if (keycode == MAGIC_SWAP_LALT_LGUI) {
|
||||
keymap_config.swap_lalt_lgui = 1;
|
||||
} else if (keycode == MAGIC_SWAP_RALT_RGUI) {
|
||||
keymap_config.swap_ralt_rgui = 1;
|
||||
} else if (keycode == MAGIC_NO_GUI) {
|
||||
keymap_config.no_gui = 1;
|
||||
} else if (keycode == MAGIC_SWAP_GRAVE_ESC) {
|
||||
keymap_config.swap_grave_esc = 1;
|
||||
} else if (keycode == MAGIC_SWAP_BACKSLASH_BACKSPACE) {
|
||||
keymap_config.swap_backslash_backspace = 1;
|
||||
} else if (keycode == MAGIC_HOST_NKRO) {
|
||||
keymap_config.nkro = 1;
|
||||
} else if (keycode == MAGIC_SWAP_ALT_GUI) {
|
||||
keymap_config.swap_lalt_lgui = 1;
|
||||
keymap_config.swap_ralt_rgui = 1;
|
||||
}
|
||||
/* UNs */
|
||||
else if (keycode == MAGIC_UNSWAP_CONTROL_CAPSLOCK) {
|
||||
keymap_config.swap_control_capslock = 0;
|
||||
} else if (keycode == MAGIC_UNCAPSLOCK_TO_CONTROL) {
|
||||
keymap_config.capslock_to_control = 0;
|
||||
} else if (keycode == MAGIC_UNSWAP_LALT_LGUI) {
|
||||
keymap_config.swap_lalt_lgui = 0;
|
||||
} else if (keycode == MAGIC_UNSWAP_RALT_RGUI) {
|
||||
keymap_config.swap_ralt_rgui = 0;
|
||||
} else if (keycode == MAGIC_UNNO_GUI) {
|
||||
keymap_config.no_gui = 0;
|
||||
} else if (keycode == MAGIC_UNSWAP_GRAVE_ESC) {
|
||||
keymap_config.swap_grave_esc = 0;
|
||||
} else if (keycode == MAGIC_UNSWAP_BACKSLASH_BACKSPACE) {
|
||||
keymap_config.swap_backslash_backspace = 0;
|
||||
} else if (keycode == MAGIC_UNHOST_NKRO) {
|
||||
keymap_config.nkro = 0;
|
||||
} else if (keycode == MAGIC_UNSWAP_ALT_GUI) {
|
||||
keymap_config.swap_lalt_lgui = 0;
|
||||
keymap_config.swap_ralt_rgui = 0;
|
||||
switch (keycode)
|
||||
{
|
||||
case MAGIC_SWAP_CONTROL_CAPSLOCK:
|
||||
keymap_config.swap_control_capslock = true;
|
||||
break;
|
||||
case MAGIC_CAPSLOCK_TO_CONTROL:
|
||||
keymap_config.capslock_to_control = true;
|
||||
break;
|
||||
case MAGIC_SWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
break;
|
||||
case MAGIC_NO_GUI:
|
||||
keymap_config.no_gui = true;
|
||||
break;
|
||||
case MAGIC_SWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = true;
|
||||
break;
|
||||
case MAGIC_SWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = true;
|
||||
break;
|
||||
case MAGIC_HOST_NKRO:
|
||||
keymap_config.nkro = true;
|
||||
break;
|
||||
case MAGIC_SWAP_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
break;
|
||||
case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
|
||||
keymap_config.swap_control_capslock = false;
|
||||
break;
|
||||
case MAGIC_UNCAPSLOCK_TO_CONTROL:
|
||||
keymap_config.capslock_to_control = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_LALT_LGUI:
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_RALT_RGUI:
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
break;
|
||||
case MAGIC_UNNO_GUI:
|
||||
keymap_config.no_gui = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_GRAVE_ESC:
|
||||
keymap_config.swap_grave_esc = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
|
||||
keymap_config.swap_backslash_backspace = false;
|
||||
break;
|
||||
case MAGIC_UNHOST_NKRO:
|
||||
keymap_config.nkro = false;
|
||||
break;
|
||||
case MAGIC_UNSWAP_ALT_GUI:
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
break;
|
||||
case MAGIC_TOGGLE_NKRO:
|
||||
keymap_config.nkro = !keymap_config.nkro;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
clear_keyboard(); // clear to prevent stuck keys
|
||||
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
@ -271,7 +296,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||
unregister_mods(MOD_BIT(KC_LSFT));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
// break;
|
||||
}
|
||||
|
||||
case KC_RSPC: {
|
||||
|
@ -293,7 +318,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||
unregister_mods(MOD_BIT(KC_RSFT));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
// break;
|
||||
}
|
||||
default: {
|
||||
shift_interrupted[0] = true;
|
||||
|
|
129
readme.md
|
@ -58,7 +58,7 @@ Here are the steps
|
|||
3. Followed by `git reset --hard`
|
||||
3. Start the "Bash On Ubuntu On Windows" from the start menu
|
||||
4. With the bash open, navigate to your Git checkout. The harddisk can be accessed from `/mnt` for example `/mnt/c` for the `c:\` drive.
|
||||
5. Run `sudo util/install_dependencies.sh`.
|
||||
5. Run `sudo util/install_dependencies.sh`.
|
||||
6. After a while the installation will finish, and you are good to go
|
||||
|
||||
**Note** From time to time, the dependencies might change, so just run `install_dependencies.sh` again if things are not working.
|
||||
|
@ -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).
|
||||
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.
|
||||
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.
|
||||
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!
|
||||
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.
|
||||
6. Open the `\util` folder.
|
||||
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. 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
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
@ -92,12 +94,12 @@ You can also try these instructions:
|
|||
3. Install [DFU-Programmer][dfu-prog].
|
||||
|
||||
If you are going to flash Infinity based keyboards you will also need dfu-util
|
||||
|
||||
|
||||
brew install dfu-util
|
||||
|
||||
### Linux
|
||||
|
||||
To ensure you are always up to date, you can just run `sudo utils/install_dependencies.sh`. That should always install all the dependencies needed.
|
||||
To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed.
|
||||
|
||||
You can also install things manually, but this documentation might not be always up to date with all requirements.
|
||||
|
||||
|
@ -158,7 +160,7 @@ In every keymap folder, the following files are recommended:
|
|||
* `config.h` - the options to configure your keymap
|
||||
* `keymap.c` - all of your keymap code, required
|
||||
* `Makefile` - the features of QMK that are enabled, required to run `make` in your keymap folder
|
||||
* `readme.md` - a description of your keymap, how others might use it, and explanations of features
|
||||
* `readme.md` - a description of your keymap, how others might use it, and explanations of features
|
||||
|
||||
## The `make` command
|
||||
|
||||
|
@ -179,7 +181,7 @@ The following instruction refers to these folders.
|
|||
|
||||
If the `keymap` folder contains a file name `Makefile`
|
||||
|
||||
1. Change the directory to the `keymap` folder
|
||||
1. Change the directory to the `keymap` folder
|
||||
2. Run `make <subproject>-<programmer>`
|
||||
|
||||
Otherwise, if there's no `Makefile` in the `keymap` folder
|
||||
|
@ -278,11 +280,23 @@ This allows you to use the system and audio control key codes.
|
|||
|
||||
`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`
|
||||
|
||||
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`
|
||||
|
||||
|
@ -290,7 +304,7 @@ Enables your LED to breath while your computer is sleeping. Timer1 is being used
|
|||
|
||||
`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`
|
||||
|
||||
|
@ -433,7 +447,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
|
|||
|
||||
Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds.
|
||||
|
||||
To use it, use `KC_LSPO` (Left Shift, Parens Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parens Close) for your right Shift.
|
||||
To use it, use `KC_LSPO` (Left Shift, Parens Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parens Close) for your right Shift.
|
||||
|
||||
It's defaulted to work on US keyboards, but if your layout uses different keys for parenthesis, you can define those in your `config.h` like this:
|
||||
|
||||
|
@ -530,11 +544,11 @@ For the sake of flexibility, tap-dance actions can be either a pair of keycodes,
|
|||
|
||||
### Examples
|
||||
|
||||
Here's a simple example for a single definition:
|
||||
Here's a simple example for a single definition:
|
||||
|
||||
1. In your `makefile`, add `TAP_DANCE_ENABLE = yes`
|
||||
2. In your `config.h` (which you can copy from `qmk_firmware/keyboards/planck/config.h` to your keymap directory), add `#define TAPPING_TERM 200`
|
||||
3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
|
||||
3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
|
||||
|
||||
```c
|
||||
//Tap Dance Declarations
|
||||
|
@ -550,10 +564,10 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||
};
|
||||
|
||||
//In Layer declaration, add tap dance item in place of a key code
|
||||
TD(TD_ESC_CAPS)
|
||||
TD(TD_ESC_CAPS)
|
||||
```
|
||||
|
||||
Here's a more complex example involving custom actions:
|
||||
Here's a more complex example involving custom actions:
|
||||
|
||||
```c
|
||||
enum {
|
||||
|
@ -828,11 +842,11 @@ To enable them, first add a new element to the `planck_keycodes` enum -- `DYNAMI
|
|||
Afterwards create a new layer called `_DYN`:
|
||||
|
||||
#define _DYN 6 /* almost any other free number should be ok */
|
||||
|
||||
|
||||
Below these two modifications include the `dynamic_macro.h` header:
|
||||
|
||||
#include "dynamic_macro.h"`
|
||||
|
||||
|
||||
Then define the `_DYN` layer with the following keys: `DYN_REC_START1`, `DYN_MACRO_PLAY1`,`DYN_REC_START2` and `DYN_MACRO_PLAY2`. It may also contain other keys, it doesn't matter apart from the fact that you won't be able to record these keys in the dynamic macros.
|
||||
|
||||
[_DYN]= {
|
||||
|
@ -841,7 +855,7 @@ Then define the `_DYN` layer with the following keys: `DYN_REC_START1`, `DYN_MAC
|
|||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
|
||||
Add the following code to the very beginning of your `process_record_user()` function:
|
||||
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
|
@ -877,6 +891,66 @@ In `quantum/keymap_extras/`, you'll see various language files - these work the
|
|||
|
||||
You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
|
||||
|
||||
## Backlight Breathing
|
||||
|
||||
In order to enable backlight breathing, the following line must be added to your config.h file.
|
||||
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
The following function calls are used to control the breathing effect.
|
||||
|
||||
* ```breathing_enable()``` - Enable the free-running breathing effect.
|
||||
* ```breathing_disable()``` - Disable the free-running breathing effect immediately.
|
||||
* ```breathing_self_disable()``` - Disable the free-running breathing effect after the current effect ends.
|
||||
* ```breathing_toggle()``` - Toggle the free-running breathing effect.
|
||||
* ```breathing_defaults()``` - Reset the speed and brightness settings of the breathing effect.
|
||||
|
||||
The following function calls are used to control the maximum brightness of the breathing effect.
|
||||
|
||||
* ```breathing_intensity_set(value)``` - Set the brightness of the breathing effect when it is at its max value.
|
||||
* ```breathing_intensity_default()``` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
|
||||
|
||||
The following function calls are used to control the cycling speed of the breathing effect.
|
||||
|
||||
* ```breathing_speed_set(value)``` - Set the speed of the breathing effect - how fast it cycles.
|
||||
* ```breathing_speed_inc(value)``` - Increase the speed of the breathing effect by a fixed value.
|
||||
* ```breathing_speed_dec(value)``` - Decrease the speed of the breathing effect by a fixed value.
|
||||
* ```breathing_speed_default()``` - Reset the speed of the breathing effect to the default value.
|
||||
|
||||
The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
|
||||
|
||||
case MACRO_FUNCTION:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_enable();
|
||||
layer_on(LAYER_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(LAYER_FUNCTION);
|
||||
}
|
||||
break;
|
||||
|
||||
The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
|
||||
|
||||
case MACRO_RAISED:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_RAISED);
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
||||
}
|
||||
else
|
||||
{
|
||||
layer_off(LAYER_RAISED);
|
||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
||||
}
|
||||
break;
|
||||
|
||||
## Other firmware shortcut keycodes
|
||||
|
||||
* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`)
|
||||
|
@ -1043,7 +1117,7 @@ For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring
|
|||
In order to use the underglow timer functions, you need to have `#define RGBLIGHT_TIMER` in your `config.h`, and have audio disabled (`AUDIO_ENABLE = no` in your Makefile).
|
||||
|
||||
Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
|
||||
|
||||
|
||||
#define RGB_DI_PIN F4 // The pin your RGB strip is wired to
|
||||
#define RGBLIGHT_TIMER // Require for fancier stuff (not compatible with audio)
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
|
@ -1090,15 +1164,15 @@ If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty
|
|||
|
||||
The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
|
||||
|
||||
Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
|
||||
Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
|
||||
|
||||
The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
|
||||
|
||||
For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
|
||||
|
||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
|
||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
|
||||
|
||||
`BACKLIGHT_BREATHING` is a fancier backlight feature, and uses one of the timers.
|
||||
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
|
||||
|
||||
`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
|
||||
|
||||
|
@ -1145,14 +1219,14 @@ Each of the `kxx` variables needs to be unique, and usually follows the format `
|
|||
|
||||
# Unit Testing
|
||||
|
||||
If you are new to unit testing, then you can find many good resources on internet. However most of it is scattered around in small pieces here and there, and there's also many different opinions, so I won't give any recommendations.
|
||||
If you are new to unit testing, then you can find many good resources on internet. However most of it is scattered around in small pieces here and there, and there's also many different opinions, so I won't give any recommendations.
|
||||
|
||||
Instead I recommend these two books, explaining two different styles of Unit Testing in detail.
|
||||
|
||||
* "Test Driven Development: By Example: Kent Beck"
|
||||
* "Growing Object-Oriented Software, Guided By Tests: Steve Freeman, Nat Pryce"
|
||||
|
||||
If you prefer videos there are Uncle Bob's [Clean Coders Videos](https://cleancoders.com/), which unfortunately cost quite a bit, especially if you want to watch many of them. But James Shore has a free [Let's Play](http://www.jamesshore.com/Blog/Lets-Play) video series.
|
||||
If you prefer videos there are Uncle Bob's [Clean Coders Videos](https://cleancoders.com/), which unfortunately cost quite a bit, especially if you want to watch many of them. But James Shore has a free [Let's Play](http://www.jamesshore.com/Blog/Lets-Play) video series.
|
||||
|
||||
## Google Test and Google Mock
|
||||
It's possible to Unit Test your code using [Google Test](https://github.com/google/googletest). The Google Test framework also includes another component for writing testing mocks and stubs, called "Google Mock". For information how to write the actual tests, please refer to the documentation on that site.
|
||||
|
@ -1161,7 +1235,7 @@ It's possible to Unit Test your code using [Google Test](https://github.com/goog
|
|||
|
||||
Note that Google Test and therefore any test has to be written in C++, even if the rest of the QMK codebases is written in C. This should hopefully not be a problem even if you don't know any C++, since there's quite clear documentation and examples of the required C++ features, and you can write the rest of the test code almost as you would write normal C. Note that some compiler errors which you might get can look quite scary, but just read carefully what it says, and you should be ok.
|
||||
|
||||
One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
|
||||
One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
|
||||
|
||||
## Adding tests for new or existing features
|
||||
|
||||
|
@ -1189,7 +1263,6 @@ If there are problems with the tests, you can find the executable in the `./buil
|
|||
|
||||
## Full Integration tests
|
||||
|
||||
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
|
||||
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
|
||||
|
||||
In that model you would emulate the input, and expect a certain output from the emulated keyboard.
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "action_util.h"
|
||||
#include "action_layer.h"
|
||||
#include "timer.h"
|
||||
#include "keycode_config.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
|
||||
static inline void add_key_byte(uint8_t code);
|
||||
static inline void del_key_byte(uint8_t code);
|
||||
|
@ -139,7 +143,7 @@ void send_keyboard_report(void) {
|
|||
void add_key(uint8_t key)
|
||||
{
|
||||
#ifdef NKRO_ENABLE
|
||||
if (keyboard_protocol && keyboard_nkro) {
|
||||
if (keyboard_protocol && keymap_config.nkro) {
|
||||
add_key_bit(key);
|
||||
return;
|
||||
}
|
||||
|
@ -150,7 +154,7 @@ void add_key(uint8_t key)
|
|||
void del_key(uint8_t key)
|
||||
{
|
||||
#ifdef NKRO_ENABLE
|
||||
if (keyboard_protocol && keyboard_nkro) {
|
||||
if (keyboard_protocol && keymap_config.nkro) {
|
||||
del_key_bit(key);
|
||||
return;
|
||||
}
|
||||
|
@ -231,7 +235,7 @@ uint8_t has_anymod(void)
|
|||
uint8_t get_first_key(void)
|
||||
{
|
||||
#ifdef NKRO_ENABLE
|
||||
if (keyboard_protocol && keyboard_nkro) {
|
||||
if (keyboard_protocol && keymap_config.nkro) {
|
||||
uint8_t i = 0;
|
||||
for (; i < KEYBOARD_REPORT_BITS && !keyboard_report->nkro.bits[i]; i++)
|
||||
;
|
||||
|
|
|
@ -56,8 +56,8 @@ void xitoa(long value, char radix, char width);
|
|||
#define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__)
|
||||
|
||||
void __xprintf(const char *format_p, ...); /* Send formatted string to the registered device */
|
||||
void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */
|
||||
void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */
|
||||
// void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */
|
||||
// void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */
|
||||
|
||||
/* Format string is placed in the ROM. The format flags is similar to printf().
|
||||
|
||||
|
@ -88,7 +88,7 @@ void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send format
|
|||
/*-----------------------------------------------------------------------------*/
|
||||
char xatoi(char **str, long *ret);
|
||||
|
||||
/* Get value of the numeral string.
|
||||
/* Get value of the numeral string.
|
||||
|
||||
str
|
||||
Pointer to pointer to source string
|
||||
|
|