Merge remote-tracking branch 'upstream/master'
|
@ -29,3 +29,4 @@ CMakeLists.txt
|
|||
.idea
|
||||
.browse.VC.db*
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
|
|
|
@ -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 }
|
||||
|
@ -85,4 +89,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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;
|
||||
};
|
|
@ -0,0 +1,66 @@
|
|||
// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer.
|
||||
|
||||
#include "atreus.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_colemak.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
#define ALPH 0
|
||||
#define NUMS 1
|
||||
#define CURS 2
|
||||
#define SYMB 3
|
||||
#define FKEY 4
|
||||
|
||||
// Some handy macros to keep the keymaps clean and easier to maintain
|
||||
#define KM_SAVE LGUI(CM_S)
|
||||
#define KM_CLSE LGUI(CM_W)
|
||||
#define KM_OPEN LGUI(CM_O)
|
||||
|
||||
#define KM_COPY LGUI(KC_C)
|
||||
#define KM_CUT LGUI(KC_X)
|
||||
#define KM_PAST LGUI(KC_V)
|
||||
#define KM_UNDO LGUI(KC_Z)
|
||||
#define KM_REDO LGUI(LSFT(KC_Z))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[ALPH] = {
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P},
|
||||
{KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN},
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
|
||||
{KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL}
|
||||
},
|
||||
[NUMS] = {
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH},
|
||||
{KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR},
|
||||
{KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS}
|
||||
},
|
||||
[CURS] = {
|
||||
{KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS},
|
||||
{KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS},
|
||||
{KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[SYMB] = {
|
||||
{KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC},
|
||||
{KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD},
|
||||
{KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC},
|
||||
{KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[FKEY] = {
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
}};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {}
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
|
@ -0,0 +1,45 @@
|
|||
Jeremy's Atreus Key Mapping
|
||||
===========================
|
||||
|
||||
I am a programmer by trade that suffers from the beginning stages of RSI. As a programmer I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, for me. I made heavy use of momentary layer toggling.
|
||||
|
||||
My layout is also geared toward a software based Colemak mapping. I would like it to be hardware, but I use my Laptop on the go frequently and thus my laptop keyboard. I have moved the keycaps to reflect the Colemak layout. My laptop is a MacBook Pro (2015).
|
||||
|
||||
## Main Layers
|
||||
|
||||
1. [Letters](http://www.keyboard-layout-editor.com/#/gists/6861cb9df09ce78efaddf8aa7471e3ac)
|
||||
2. [Symbols](http://www.keyboard-layout-editor.com/#/gists/8956a18b508a78e93b9c38ec3fcccaa5)
|
||||
3. [Navigation](http://www.keyboard-layout-editor.com/#/gists/6ed492b714a7f54eb1c5de09b87fd8c4)
|
||||
4. [Numbers](http://www.keyboard-layout-editor.com/#/gists/399ceb5624e8388e48a3a5eacac8e973)
|
||||
5. [Function Keys](http://www.keyboard-layout-editor.com/#/gists/7fd7dc24c7048316f3724b1893c64e89)
|
||||
|
||||
## Notes
|
||||
|
||||
### General
|
||||
|
||||
Some characters can be accessed multiple ways. This was done because you may be in a given layer, such as numbers, where when doing math, you may need quick access to the parentheses characters for grouping. This prevents some layer switching.
|
||||
|
||||
I own an ErgoDox and plan on porting this as a base layer, then using the extra keys the ErgoDox provides accordingly. My goal, though, is to be fully functional on this base setup and build everything into muscle memory.
|
||||
|
||||
### Symbol Layer
|
||||
|
||||
1. I placed characters that deal with an if statement close together, such as !, & and |.
|
||||
2. All matching brace/bracket characters are together as well.
|
||||
|
||||
### Number Layer
|
||||
|
||||
1. Everything I did was a compromise when trying to mimic a ten-key. I did the best I could.
|
||||
2. Operators are duplicated on the right and left. I do not find it comfortable to use my pinky much, so I tend to use my left hand for +, -, * and / but those were also placed on the right hand to mimic the ten-key.
|
||||
3. Parentheses were added for typing on the calculator.
|
||||
|
||||
### Cursor Layer
|
||||
|
||||
1. It includes basic audio controls because they didn't really fit anywhere else
|
||||
2. It contains basic file manipulation. I'm not sure that was a good idea. I do save all the time, but Cmd+S isn't exactly hard.
|
||||
3. It contains the backspace and delete keys right on top of the left and right arrows.
|
||||
4. Cmd and Opt keys are duplicated. This makes for very easy navigation, for example on a Mac, Opt+Left/Right moves word by word. It also backspaces or deletes word by word.
|
||||
|
||||
### Function Layer
|
||||
|
||||
1. Almost all other layers I saw grouped the F keys into a bunch of three. This only gives nine function keys in order if you attempt to stay as close to the home row as possible. I went with a group of four, which gives all twelve function keys to the right hand, one row below and above the home row.
|
||||
2. I duplicated the Command and Option keys the same as on the cursor layer. This makes it dead easy to hit modified function keys such as Cmd+Opt+F5. It's also easy to toss in a Shift modifier in there with the right thumb since the bottom row is preserved.
|
|
@ -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)
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
# The default keymap for cluecard
|
||||
|
||||
Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects.
|
||||
So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness
|
||||
buttons. You can of course also turn them on and off with the on/off button.
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
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
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2
|
||||
|
||||
#endif
|
|
@ -0,0 +1,28 @@
|
|||
#include "cluecard.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
RGB_TOG, RGB_SAI, RGB_VAI, \
|
||||
RGB_HUD, RGB_HUI, \
|
||||
RGB_MOD, RGB_SAD, RGB_VAD, \
|
||||
BL_STEP, \
|
||||
KC_NO, KC_NO, KC_NO \
|
||||
)
|
||||
};
|
||||
|
||||
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85};
|
||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
# RGB effect test keymap for cluecard
|
||||
|
||||
This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each
|
||||
effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check
|
||||
the `rgblight.c` file.
|
||||
|
||||
The hue, saturation and brightness buttons will work depending on which effect is active.
|
|
@ -0,0 +1,24 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
// swap-hands action needs a matrix to define the swap
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Left hand, matrix positions */
|
||||
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
|
||||
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
|
||||
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
|
||||
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
|
||||
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
|
||||
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
|
||||
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
|
||||
/* Right hand, matrix positions */
|
||||
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
|
||||
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
|
||||
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
|
||||
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
|
||||
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
|
||||
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
|
||||
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
||||
};
|
||||
|
|
@ -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)
|
|
@ -71,6 +71,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
|
|||
# comment out to disable the options.
|
||||
#
|
||||
|
||||
SLEEP_LED_ENABLE = no
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
||||
|
|
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 = no
|
||||
|
||||
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)
|
||||
|
@ -24,6 +25,8 @@ OPT_DEFS += -DKEYLOGGER_ENABLE
|
|||
CONSOLE_ENABLE = yes
|
||||
endif
|
||||
|
||||
OPT_DEFS += -DUSER_PRINT
|
||||
|
||||
KEYMAP_VERSION = $(shell \
|
||||
if [ -d "${KEYMAP_PATH}/.git" ]; then \
|
||||
cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
## v1.8
|
||||
|
||||
*2016-10-03*
|
||||
|
||||
### ADORE
|
||||
|
||||
* Major rearrangements were made, to reduce pinky use, and to balance out the hand usage.
|
||||
|
||||
### Tools
|
||||
|
||||
* The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered.
|
||||
* The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned.
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
* Fixed the [Steno](#steno-layer) toggle key.
|
||||
|
||||
## v1.7
|
||||
|
||||
*2016-09-18*
|
||||
|
||||
### Overall changes
|
||||
|
||||
* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
|
||||
* The number/function key behavior was changed: function keys are now on the **Media**.
|
||||
* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers.
|
||||
* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped.
|
||||
* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it.
|
||||
|
||||
### ADORE
|
||||
|
||||
* `Y` and `X` have been swapped again.
|
||||
|
||||
### Media/Navigation layer
|
||||
|
||||
* The function keys are now on this layer.
|
||||
* Mouse keys have been removed.
|
||||
* Media start/stop/prev/next have been removed.
|
||||
* `Print screen` has been removed.
|
||||
* There is only one screen lock key now.
|
||||
|
||||
### Heatmap
|
||||
|
||||
* Fixed a few issues in the finger-stats calculation.
|
||||
* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool.
|
||||
* The heatmap tool will now colorize the stats by default.
|
||||
* The periodic stats are now printed in a more compact format.
|
||||
|
||||
### Tools
|
||||
|
||||
* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes.
|
||||
* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator.
|
||||
* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side.
|
||||
|
||||
## v1.6
|
||||
|
||||
*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/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off.
|
||||
* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now.
|
||||
|
||||
### 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.
|
||||
* The [ADORE](#adore-layer) layer received a major update, see the layout image above.
|
||||
* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
|
||||
* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer).
|
||||
* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
|
||||
* There is some experimental support for entering Unicode symbols.
|
||||
|
||||
## 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.
|
||||
* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key.
|
||||
* 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*
|
||||
|
||||
* 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*
|
||||
|
||||
* 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.
|
||||
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
|
||||
* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
|
||||
* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
|
||||
* `LEAD v` types the firmware version, and the keymap version.
|
||||
* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
|
||||
* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
|
||||
|
||||
## 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.
|
||||
* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
|
||||
* `LEAD y` types `\o/`.
|
||||
* Some keys on the [Base](#base-layer) layer have been moved around:
|
||||
- `?` moved to the left pinky, left of `Q`.
|
||||
- `=` shifted one row down, but `F11` stayed where it was.
|
||||
- `-` on the left half was replaced by `Tab`.
|
||||
- `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
|
||||
- `:` now inputs `;` when shifted.
|
||||
* `ESC` cancels the **Hungarian** layer too, not just modifiers.
|
||||
|
||||
## v1.0
|
||||
|
||||
*2016-05-26*
|
||||
|
||||
Initial version.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 63 KiB |
|
@ -3,28 +3,31 @@
|
|||
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
|
||||
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [ADORE layer](#adore-layer)
|
||||
- [Hungarian layer](#hungarian-layer)
|
||||
- [Navigation and media layer](#navigation-and-media-layer)
|
||||
- [Steno layer](#steno-layer)
|
||||
- [LED states](#led-states)
|
||||
* [Tools](#tools)
|
||||
- [Heatmap](#heatmap)
|
||||
- [Layer notification](#layer-notification)
|
||||
* [Special features](#special-features)
|
||||
- [Unicode Symbol Input](#unicode-symbol-input)
|
||||
* [Building](#building)
|
||||
- [Using on Windows](#using-on-windows)
|
||||
* [Changelog](#changelog)
|
||||
* [Changelog](https://github.com/algernon/ergodox-layout/blob/master/NEWS.md#readme)
|
||||
* [License](#license)
|
||||
|
||||
# Layouts
|
||||
|
@ -35,15 +38,15 @@ Some of the things in the layout only work when one uses Spacemacs and GNOME und
|
|||
|
||||
At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave:
|
||||
|
||||
* The keys on the number row double as function keys, when held for a bit longer than an usual tap. This allows me to use the function keys without having to switch layers.
|
||||
* The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer.
|
||||
* The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap.
|
||||
* The `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,29 +55,17 @@ 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.
|
||||
|
||||
The symbols on the front in the image above have the same color as the key that activates them, with the exception of the **Arrow** layer, which is just black on the front.
|
||||
|
||||
## ADORE layer
|
||||
|
||||
[![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a)
|
||||
|
||||
While using the standard Dvorak layout, I encountered a number of inconveniences, and on this layer, I am playing with ideas to make the layout feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, had shortcomings I was not happy with. So now this is something inbetween, with own observations thrown in. How it works out in the long run remains to be seen.
|
||||
My experimental layout, that I keep tweaking. No full description here, because things are very much in flux.
|
||||
|
||||
[cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm
|
||||
|
||||
Based on a week and a half of typing, the keys were rearranged, and the home row neatly spelled out **ADORE**, that gave the layout its name.
|
||||
|
||||
## Hungarian layer
|
||||
|
||||
[![Hungarian layer](images/hun-layer.png)](http://www.keyboard-layout-editor.com/#/gists/b160f6ec90d58c127c114c89f66e9dc9)
|
||||
|
||||
On this layer, the accented characters are at the same position as their base variant. For some, which can have other diatribes, the long one is on top, short's on bottom. Tapping any of the accented characters takes us back to the base layer.
|
||||
|
||||
## Navigation and media layer
|
||||
|
||||
[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892)
|
||||
|
||||
This layer is primarily for navigating with the cursor or the mouse, and some media things.
|
||||
Note that the **HUN** layer does not work well with ADORE: it still has the same layout as on the [Base](#base-layer) layer. This will remain until ADORE becomes the default.
|
||||
|
||||
## Steno layer
|
||||
|
||||
|
@ -89,8 +80,9 @@ The primary purpose of the LEDs is to show the modifier status, a secondary, to
|
|||
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 **Hungarian** layer is active, the *green* and *blue* LEDs are on.
|
||||
* When the **Media** layer is active, the *red* and *green* ones are on.
|
||||
* When the **ARROW** layer is active, the *red* and *blue* ones are on.
|
||||
* 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 +108,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/
|
||||
|
||||
|
@ -124,6 +116,10 @@ The generated heatmap looks somewhat like this:
|
|||
|
||||
![Heatmap](images/heatmap.png)
|
||||
|
||||
## Layer notification
|
||||
|
||||
There is a very small tool in `tools/layer-notify`, that listens to the HID console, looking for layer change events, and pops up a notification for every detected change. It is a very simple tool, mainly serving as an example.
|
||||
|
||||
# Building
|
||||
|
||||
To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this:
|
||||
|
@ -149,62 +145,6 @@ $ make keyboard=ergodox keymap=algernon
|
|||
|
||||
The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line.
|
||||
|
||||
# Changelog
|
||||
|
||||
## v1.5 - 2016-08-12
|
||||
|
||||
* The **1HAND** layer has been removed.
|
||||
* A `Delete` key is now available on the right thumb cluster.
|
||||
* The [ADORE](#adore-layer) layer received a major update, see the layout image above.
|
||||
* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
|
||||
* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer).
|
||||
* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
|
||||
* There is some experimental support for entering Unicode symbols.
|
||||
|
||||
## 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.
|
||||
* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key.
|
||||
* 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
|
||||
|
||||
* 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
|
||||
|
||||
* 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.
|
||||
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
|
||||
* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
|
||||
* The **Emacs** layer is gone, replaced by a simplified [navigation and media](#navigation-and-media-layer) layer.
|
||||
* `LEAD v` types the firmware version, and the keymap version.
|
||||
* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
|
||||
* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
|
||||
|
||||
## 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.
|
||||
* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
|
||||
* `LEAD y` types `\o/`.
|
||||
* Some keys on the [Base](#base-layer) layer have been moved around:
|
||||
- `?` moved to the left pinky, left of `Q`.
|
||||
- `=` shifted one row down, but `F11` stayed where it was.
|
||||
- `-` on the left half was replaced by `Tab`.
|
||||
- `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
|
||||
- `:` now inputs `;` when shifted.
|
||||
* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers.
|
||||
|
||||
## v1.0 - 2016-05-26
|
||||
|
||||
Initial version.
|
||||
|
||||
# License
|
||||
|
||||
The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version.
|
||||
|
|
|
@ -13,18 +13,15 @@
|
|||
[
|
||||
{
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"#\n3\nF3",
|
||||
"*\n5\nF5",
|
||||
{
|
||||
"x": 10.5,
|
||||
"c": "#a7d0db",
|
||||
"t": "#000000",
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
|
@ -32,54 +29,44 @@
|
|||
2
|
||||
]
|
||||
},
|
||||
"*\n8\nF8"
|
||||
"#\n4\nF4"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 2.5
|
||||
},
|
||||
"@\n2\nF2",
|
||||
"@\n7\nF7",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 1
|
||||
},
|
||||
"$\n4\nF4",
|
||||
"^\n3\nF3",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"&\n7\nF7",
|
||||
"!\n2\nF2",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 1
|
||||
},
|
||||
"(\n9\nF9"
|
||||
"&\n6\nF6"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"%\n5\nF5",
|
||||
"$\n1\nF1",
|
||||
{
|
||||
"c": "#f9cd31",
|
||||
"a": 7,
|
||||
"f": 2
|
||||
"f": 3
|
||||
},
|
||||
"STENO",
|
||||
"F11",
|
||||
{
|
||||
"x": 4.5,
|
||||
"f": 6
|
||||
"f": 3
|
||||
},
|
||||
"<i class='mss mss-Unicode-Option-3'></i>",
|
||||
"F12",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 4,
|
||||
"f": 3,
|
||||
"fa": [
|
||||
|
@ -88,128 +75,119 @@
|
|||
2
|
||||
]
|
||||
},
|
||||
"^\n6\nF6"
|
||||
"%\n0\nF10"
|
||||
],
|
||||
[
|
||||
{
|
||||
"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"
|
||||
"f": 3,
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"!\n1\nF1",
|
||||
" \n9\nF9",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
")\n0\nF10",
|
||||
" \n8\nF8",
|
||||
{
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"F11"
|
||||
"STENO"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"L",
|
||||
"C",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"C"
|
||||
"L"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b",
|
||||
"a": 4
|
||||
},
|
||||
">\n.",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"W",
|
||||
{
|
||||
"x": 8.5
|
||||
"x": 1,
|
||||
"a": 6
|
||||
},
|
||||
"H",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 8.5
|
||||
},
|
||||
"G",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"P"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"M",
|
||||
"F",
|
||||
{
|
||||
"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
|
||||
},
|
||||
"F"
|
||||
"M"
|
||||
],
|
||||
[
|
||||
{
|
||||
"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,",
|
||||
"X",
|
||||
{
|
||||
"x": 14.5,
|
||||
"a": 6
|
||||
"a": 4
|
||||
},
|
||||
"Y",
|
||||
"/\n?",
|
||||
{
|
||||
"a": 4,
|
||||
"w": 1.5
|
||||
},
|
||||
"|\n\\"
|
||||
"~\n`"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"E",
|
||||
|
@ -221,15 +199,11 @@
|
|||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 2.5
|
||||
},
|
||||
"O",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000",
|
||||
"n": true
|
||||
},
|
||||
"I",
|
||||
|
@ -239,18 +213,14 @@
|
|||
},
|
||||
"R",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 1
|
||||
},
|
||||
"N"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"U",
|
||||
{
|
||||
|
@ -261,8 +231,6 @@
|
|||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"c": "#ffb2d2",
|
||||
"t": "#0d0d0b",
|
||||
"fa": [
|
||||
6
|
||||
],
|
||||
|
@ -298,29 +266,29 @@
|
|||
{
|
||||
"y": -0.625,
|
||||
"x": 6.5,
|
||||
"c": "#93c9b7",
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"f": 9,
|
||||
"h": 1.5
|
||||
},
|
||||
"(",
|
||||
"<i class='fa fa-columns'></i>",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
")"
|
||||
"<i class='fa fa-table'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"a": 4,
|
||||
"f": 3
|
||||
},
|
||||
"\"\n'",
|
||||
{
|
||||
"x": 10.5
|
||||
"x": 10.5,
|
||||
"a": 6,
|
||||
"f": 3
|
||||
},
|
||||
"V"
|
||||
],
|
||||
|
@ -328,73 +296,67 @@
|
|||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"a": 6
|
||||
},
|
||||
"Z",
|
||||
"Q",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"a": 4
|
||||
},
|
||||
"<\n,",
|
||||
{
|
||||
"x": 8.5,
|
||||
"a": 6
|
||||
},
|
||||
"K",
|
||||
{
|
||||
"x": 8.5
|
||||
"x": 1
|
||||
},
|
||||
"G",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
},
|
||||
"J"
|
||||
"Y"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"a": 4
|
||||
},
|
||||
"X",
|
||||
">\n.",
|
||||
{
|
||||
"x": 6.5
|
||||
"x": 6.5,
|
||||
"a": 6
|
||||
},
|
||||
"B"
|
||||
],
|
||||
[
|
||||
{
|
||||
"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
|
||||
"x": 14.5
|
||||
},
|
||||
"Q",
|
||||
"J",
|
||||
{
|
||||
"c": "#ffb07b",
|
||||
"t": "#000000",
|
||||
"f": 9,
|
||||
"w": 1.5
|
||||
"g": true,
|
||||
"w": 1.5,
|
||||
"a": 4
|
||||
},
|
||||
"<i class='kb kb-Multimedia-Stop'></i>"
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"c": "#d9dae0",
|
||||
"g": true,
|
||||
"a": 7,
|
||||
"f": 3
|
||||
|
@ -413,7 +375,6 @@
|
|||
"",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#d4872a",
|
||||
"g": false,
|
||||
"a": 5
|
||||
},
|
||||
|
@ -424,7 +385,6 @@
|
|||
"_\n-",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#d9dae0",
|
||||
"g": true,
|
||||
"a": 7
|
||||
},
|
||||
|
@ -452,7 +412,6 @@
|
|||
"ry": 4.25,
|
||||
"y": -1,
|
||||
"x": 1,
|
||||
"c": "#f9cd31",
|
||||
"g": false
|
||||
},
|
||||
"Alt",
|
||||
|
@ -469,7 +428,6 @@
|
|||
],
|
||||
[
|
||||
{
|
||||
"c": "#d4872a",
|
||||
"a": 7,
|
||||
"f": 9,
|
||||
"h": 2
|
||||
|
@ -480,15 +438,13 @@
|
|||
},
|
||||
"<i class='fa fa-angle-double-up'></i>",
|
||||
{
|
||||
"c": "#f9cd31",
|
||||
"f": 3
|
||||
},
|
||||
"Ctrl"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 2,
|
||||
"c": "#e26757"
|
||||
"x": 2
|
||||
},
|
||||
"ESC"
|
||||
],
|
||||
|
@ -498,20 +454,18 @@
|
|||
"rx": 13,
|
||||
"y": -1,
|
||||
"x": -3,
|
||||
"c": "#f9cd31",
|
||||
"f": 2
|
||||
},
|
||||
"MEDIA",
|
||||
{},
|
||||
"1HAND"
|
||||
"DEL"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3
|
||||
},
|
||||
"LEAD",
|
||||
"HUN",
|
||||
{
|
||||
"c": "#d4872a",
|
||||
"f": 9,
|
||||
"h": 2
|
||||
},
|
||||
|
@ -525,9 +479,8 @@
|
|||
[
|
||||
{
|
||||
"x": -3,
|
||||
"c": "#f9cd31",
|
||||
"f": 2
|
||||
},
|
||||
"HUN"
|
||||
"LEAD"
|
||||
]
|
||||
]
|
|
@ -13,18 +13,15 @@
|
|||
[
|
||||
{
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"#\n3\nF3",
|
||||
"*\n5\nF5",
|
||||
{
|
||||
"x": 10.5,
|
||||
"c": "#a7d0db",
|
||||
"t": "#000000",
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
|
@ -32,54 +29,44 @@
|
|||
2
|
||||
]
|
||||
},
|
||||
"*\n8\nF8"
|
||||
"#\n4\nF4"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 2.5
|
||||
},
|
||||
"@\n2\nF2",
|
||||
"@\n7\nF7",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 1
|
||||
},
|
||||
"$\n4\nF4",
|
||||
"^\n3\nF3",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"&\n7\nF7",
|
||||
"!\n2\nF2",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 1
|
||||
},
|
||||
"(\n9\nF9"
|
||||
"&\n6\nF6"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"%\n5\nF5",
|
||||
"$\n1\nF1",
|
||||
{
|
||||
"c": "#f9cd31",
|
||||
"a": 7,
|
||||
"f": 2
|
||||
"f": 3
|
||||
},
|
||||
"STENO",
|
||||
"F11",
|
||||
{
|
||||
"x": 4.5,
|
||||
"f": 6
|
||||
"f": 3
|
||||
},
|
||||
"<i class='mss mss-Unicode-Option-3'></i>",
|
||||
"F12",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 4,
|
||||
"f": 3,
|
||||
"fa": [
|
||||
|
@ -88,36 +75,41 @@
|
|||
2
|
||||
]
|
||||
},
|
||||
"^\n6\nF6"
|
||||
"%\n0\nF10"
|
||||
],
|
||||
[
|
||||
{
|
||||
"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,
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
|
||||
},
|
||||
"!\n1\nF1",
|
||||
" \n9\nF9",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
")\n0\nF10",
|
||||
" \n8\nF8",
|
||||
{
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"F11"
|
||||
"STENO"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"t": "#000000",
|
||||
"a": 4
|
||||
},
|
||||
">\n.",
|
||||
|
@ -131,15 +123,11 @@
|
|||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b",
|
||||
"a": 4
|
||||
},
|
||||
"<\n,",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"P",
|
||||
|
@ -148,33 +136,27 @@
|
|||
},
|
||||
"G",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 1
|
||||
},
|
||||
"R"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"Y",
|
||||
{
|
||||
"c": "#93c9b7",
|
||||
"a": 4,
|
||||
"h": 1.5
|
||||
},
|
||||
"{\n[",
|
||||
"{\n(\n[",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"}\n]",
|
||||
"}\n)\n]",
|
||||
{
|
||||
"c": "#7adabd",
|
||||
"a": 6
|
||||
},
|
||||
"F"
|
||||
|
@ -182,14 +164,12 @@
|
|||
[
|
||||
{
|
||||
"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,
|
||||
"f": 3
|
||||
},
|
||||
|
@ -209,8 +189,6 @@
|
|||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"t": "#000000",
|
||||
"a": 6
|
||||
},
|
||||
"E",
|
||||
|
@ -222,15 +200,11 @@
|
|||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 2.5
|
||||
},
|
||||
"O",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000",
|
||||
"n": true
|
||||
},
|
||||
"U",
|
||||
|
@ -240,18 +214,14 @@
|
|||
},
|
||||
"H",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 1
|
||||
},
|
||||
"N"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"I",
|
||||
{
|
||||
|
@ -262,8 +232,6 @@
|
|||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"c": "#ffb2d2",
|
||||
"t": "#0d0d0b",
|
||||
"fa": [
|
||||
6
|
||||
],
|
||||
|
@ -299,23 +267,22 @@
|
|||
{
|
||||
"y": -0.625,
|
||||
"x": 6.5,
|
||||
"c": "#93c9b7",
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"f": 9,
|
||||
"h": 1.5
|
||||
},
|
||||
"(",
|
||||
"<i class='fa fa-columns'></i>",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
")"
|
||||
"<i class='fa fa-table'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 3.5,
|
||||
"c": "#a7d0db",
|
||||
"f": 3,
|
||||
"a": 6
|
||||
},
|
||||
"J",
|
||||
|
@ -327,15 +294,11 @@
|
|||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 2.5
|
||||
},
|
||||
"Q",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 1
|
||||
},
|
||||
"K",
|
||||
{
|
||||
|
@ -343,18 +306,14 @@
|
|||
},
|
||||
"M",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#bfbad1",
|
||||
"t": "#0d0d0b"
|
||||
"x": 1
|
||||
},
|
||||
"V"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#7adabd",
|
||||
"t": "#000000"
|
||||
"x": 5.5
|
||||
},
|
||||
"X",
|
||||
{
|
||||
|
@ -365,14 +324,11 @@
|
|||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"c": "#ffb07b",
|
||||
"f": 9,
|
||||
"w": 1.5
|
||||
},
|
||||
"\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
|
||||
{
|
||||
"c": "#ffb2d2",
|
||||
"t": "#0d0d0b",
|
||||
"a": 4,
|
||||
"f": 3
|
||||
},
|
||||
|
@ -383,8 +339,6 @@
|
|||
},
|
||||
"Z",
|
||||
{
|
||||
"c": "#ffb07b",
|
||||
"t": "#000000",
|
||||
"f": 9,
|
||||
"w": 1.5
|
||||
},
|
||||
|
@ -394,7 +348,6 @@
|
|||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"c": "#d9dae0",
|
||||
"g": true,
|
||||
"a": 7,
|
||||
"f": 3
|
||||
|
@ -413,7 +366,6 @@
|
|||
"",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#d4872a",
|
||||
"g": false,
|
||||
"a": 5
|
||||
},
|
||||
|
@ -424,7 +376,6 @@
|
|||
"_\n-",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#d9dae0",
|
||||
"g": true,
|
||||
"a": 7
|
||||
},
|
||||
|
@ -452,7 +403,6 @@
|
|||
"ry": 4.25,
|
||||
"y": -1,
|
||||
"x": 1,
|
||||
"c": "#f9cd31",
|
||||
"g": false
|
||||
},
|
||||
"Alt",
|
||||
|
@ -469,7 +419,6 @@
|
|||
],
|
||||
[
|
||||
{
|
||||
"c": "#d4872a",
|
||||
"a": 7,
|
||||
"f": 9,
|
||||
"h": 2
|
||||
|
@ -480,15 +429,13 @@
|
|||
},
|
||||
"<i class='fa fa-angle-double-up'></i>",
|
||||
{
|
||||
"c": "#f9cd31",
|
||||
"f": 3
|
||||
},
|
||||
"Ctrl"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 2,
|
||||
"c": "#e26757"
|
||||
"x": 2
|
||||
},
|
||||
"ESC"
|
||||
],
|
||||
|
@ -498,12 +445,11 @@
|
|||
"rx": 13,
|
||||
"y": -1,
|
||||
"x": -3,
|
||||
"c": "#f9cd31",
|
||||
"f": 2
|
||||
},
|
||||
"MEDIA",
|
||||
{},
|
||||
"1HAND"
|
||||
"DEL"
|
||||
],
|
||||
[
|
||||
{
|
||||
|
@ -511,7 +457,6 @@
|
|||
},
|
||||
"LEAD",
|
||||
{
|
||||
"c": "#d4872a",
|
||||
"f": 9,
|
||||
"h": 2
|
||||
},
|
||||
|
@ -525,7 +470,6 @@
|
|||
[
|
||||
{
|
||||
"x": -3,
|
||||
"c": "#f9cd31",
|
||||
"f": 2
|
||||
},
|
||||
"HUN"
|
|
@ -0,0 +1,73 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
LAST_APPSEL_START=0
|
||||
|
||||
cmd_wm () {
|
||||
WIN="$(xdotool getactivewindow)"
|
||||
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
|
||||
xdotool windowsize ${WIN} 100% 100%
|
||||
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
|
||||
}
|
||||
|
||||
_cmd_appsel () {
|
||||
wmctrl -x -a $1 || true
|
||||
xdotool key Escape
|
||||
}
|
||||
|
||||
cmd_appsel_music () {
|
||||
wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
|
||||
xdotool key Escape
|
||||
}
|
||||
|
||||
cmd_appsel_slack () {
|
||||
_cmd_appsel slack
|
||||
}
|
||||
|
||||
cmd_appsel_emacs () {
|
||||
_cmd_appsel emacs24
|
||||
}
|
||||
|
||||
cmd_appsel_term () {
|
||||
_cmd_appsel gnome-terminal
|
||||
}
|
||||
|
||||
cmd_appsel_chrome () {
|
||||
_cmd_appsel chromium
|
||||
}
|
||||
|
||||
cmd_appsel_start () {
|
||||
APPSEL_START=$(date +%s)
|
||||
if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
|
||||
return
|
||||
fi
|
||||
LAST_APPSEL_START=$APPSEL_START
|
||||
notify-send -t 1000 "Please select an application!" -c device -u low \
|
||||
-i /usr/share/icons/Adwaita/24x24/devices/video-display.png
|
||||
}
|
||||
|
||||
cmd_help () {
|
||||
cat <<EOF
|
||||
Use the source, Luke!
|
||||
EOF
|
||||
}
|
||||
|
||||
while read l; do
|
||||
case "$l" in
|
||||
"CMD:"*)
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
|
||||
cmd="$(echo $l | cut -d: -f2-)"
|
||||
|
||||
echo "Got command: ${cmd}"
|
||||
|
||||
if type cmd_${cmd} >/dev/null 2>&1; then
|
||||
cmd_${cmd}
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
|
||||
|
||||
sudo "${HL}" | grep --line-buffered LAYER: | \
|
||||
(while read line; do
|
||||
case $line in
|
||||
LAYER:*)
|
||||
layer="$(echo $(echo $line | cut -d: -f2-))"
|
||||
notify-send -i mark-location-symbolic "Switched to layer: $layer"
|
||||
;;
|
||||
esac
|
||||
done)
|
|
@ -1,145 +1,344 @@
|
|||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import argparse
|
||||
import time
|
||||
|
||||
from math import floor
|
||||
from os.path import dirname
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
from blessings import Terminal
|
||||
|
||||
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 coord(col, row):
|
||||
return cr_coord_map[row][col]
|
||||
|
||||
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_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)
|
||||
|
||||
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, 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)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group (2)), int(m.group (1)))
|
||||
if restrict_row != None and r != int(restrict_row):
|
||||
continue
|
||||
if (c, r) in keylog:
|
||||
keylog[(c, r)] = keylog[(c, r)] + 1
|
||||
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:
|
||||
keylog[(c, r)] = 1
|
||||
total = total + 1
|
||||
return total / 2, keylog
|
||||
blk[attr] = fn(None, val)
|
||||
|
||||
def l_flat(s):
|
||||
f = s.split("\n")
|
||||
return ", ".join (f)
|
||||
def coord(self, col, row):
|
||||
return self.coords[row][col]
|
||||
|
||||
def main(base_fn, log_fn, restrict_row = None):
|
||||
@staticmethod
|
||||
def set_attr(orig, new):
|
||||
return new
|
||||
|
||||
with open(base_fn, "r") as f:
|
||||
layout = json.load (f)
|
||||
def set_bg(self, coords, color):
|
||||
(block, n) = coords
|
||||
self.set_attr_at(block, n, "c", self.set_attr, color)
|
||||
#self.set_attr_at(block, n, "g", self.set_attr, False)
|
||||
|
||||
## 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)
|
||||
def set_tap_info(self, coords, count, cap):
|
||||
(block, n) = coords
|
||||
def _set_tap_info(o, _count, _cap):
|
||||
ns = 4 - o.count ("\n")
|
||||
return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100)
|
||||
|
||||
total, log = load_keylog (log_fn, restrict_row)
|
||||
max_cnt = 0
|
||||
for (c, r) in log:
|
||||
max_cnt = max(max_cnt, log[(c, r)])
|
||||
if not cap:
|
||||
cap = 1
|
||||
self.heatmap[block][n + 1] = _set_tap_info (self.heatmap[block][n + 1], count, cap)
|
||||
|
||||
# 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)
|
||||
@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)
|
||||
|
||||
print json.dumps(layout)
|
||||
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" % (int(r), int(g), int(b))
|
||||
|
||||
def __init__(self, layout):
|
||||
self.log = {}
|
||||
self.total = 0
|
||||
self.max_cnt = 0
|
||||
self.layout = layout
|
||||
|
||||
def update_log(self, coords):
|
||||
(c, r) = coords
|
||||
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, 3, 3, 1, 1, 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][0] = usage[1][0] + self.log[(c, r)]
|
||||
elif r == 4 and (c == 4 or c == 9): # bottom row thumb keys
|
||||
if c <= 6: # left side
|
||||
usage[0][4] = usage[0][4] + self.log[(c, r)]
|
||||
else:
|
||||
usage[1][0] = usage[1][0] + self.log[(c, r)]
|
||||
else:
|
||||
fc = c
|
||||
hand = 0
|
||||
if 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 = {
|
||||
"total-keys": total,
|
||||
"hands": {
|
||||
"left": {
|
||||
"usage": round(float(hand_usage[0]) / total * 100, 2),
|
||||
"fingers": {
|
||||
"pinky": 0,
|
||||
"ring": 0,
|
||||
"middle": 0,
|
||||
"index": 0,
|
||||
"thumb": 0,
|
||||
}
|
||||
},
|
||||
"right": {
|
||||
"usage": round(float(hand_usage[1]) / total * 100, 2),
|
||||
"fingers": {
|
||||
"thumb": 0,
|
||||
"index": 0,
|
||||
"middle": 0,
|
||||
"ring": 0,
|
||||
"pinky": 0,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
hmap = ['left', 'right']
|
||||
fmap = ['pinky', 'ring', 'middle', 'index', 'thumb',
|
||||
'thumb', 'index', 'middle', 'ring', '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]] = round(float(hand[finger_idx]) / total * 100, 2)
|
||||
return stats
|
||||
|
||||
def dump_all(out_dir, heatmaps):
|
||||
stats = {}
|
||||
t = Terminal()
|
||||
t.clear()
|
||||
sys.stdout.write("\x1b[2J\x1b[H")
|
||||
|
||||
print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir))
|
||||
|
||||
keys = list(heatmaps.keys())
|
||||
keys.sort()
|
||||
|
||||
for layer in keys:
|
||||
if len(heatmaps[layer].log) == 0:
|
||||
continue
|
||||
|
||||
with open ("%s/%s.json" % (out_dir, layer), "w") as f:
|
||||
json.dump(heatmaps[layer].get_heatmap(), f)
|
||||
stats[layer] = heatmaps[layer].get_stats()
|
||||
|
||||
left = stats[layer]['hands']['left']
|
||||
right = stats[layer]['hands']['right']
|
||||
|
||||
print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer,
|
||||
total=int(stats[layer]['total-keys'] / 2)))
|
||||
print (('{t.underline} | ' + \
|
||||
'left ({l[usage]:6.2f}%) | ' + \
|
||||
'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right))
|
||||
print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \
|
||||
' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \
|
||||
' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \
|
||||
' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \
|
||||
' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \
|
||||
'').format(left=left['fingers'], right=right['fingers'], t=t))
|
||||
|
||||
def process_line(line, heatmaps, opts, stamped_log = None):
|
||||
m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line)
|
||||
if not m:
|
||||
return False
|
||||
if stamped_log is not None:
|
||||
if line.startswith("KL:"):
|
||||
print ("%10.10f %s" % (time.time(), line),
|
||||
file = stamped_log, end = '')
|
||||
else:
|
||||
print (line,
|
||||
file = stamped_log, end = '')
|
||||
stamped_log.flush()
|
||||
|
||||
(c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4))
|
||||
if (c, r) not in opts.allowed_keys:
|
||||
return False
|
||||
|
||||
heatmaps[l].update_log ((c, r))
|
||||
|
||||
return True
|
||||
|
||||
def setup_allowed_keys(opts):
|
||||
if len(opts.only_key):
|
||||
incmap={}
|
||||
for v in opts.only_key:
|
||||
m = re.search ('(\d+),(\d+)', v)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group(1)), int(m.group(2)))
|
||||
incmap[(c, r)] = True
|
||||
else:
|
||||
incmap={}
|
||||
for r in range(0, 6):
|
||||
for c in range(0, 14):
|
||||
incmap[(c, r)] = True
|
||||
|
||||
for v in opts.ignore_key:
|
||||
m = re.search ('(\d+),(\d+)', v)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group(1)), int(m.group(2)))
|
||||
del(incmap[(c, r)])
|
||||
|
||||
return incmap
|
||||
|
||||
def main(opts):
|
||||
heatmaps = {"Dvorak": Heatmap("Dvorak"),
|
||||
"ADORE": Heatmap("ADORE")
|
||||
}
|
||||
cnt = 0
|
||||
out_dir = opts.outdir
|
||||
|
||||
if not os.path.exists(out_dir):
|
||||
os.makedirs(out_dir)
|
||||
|
||||
opts.allowed_keys = setup_allowed_keys(opts)
|
||||
|
||||
if not opts.one_shot:
|
||||
|
||||
try:
|
||||
with open("%s/stamped-log" % out_dir, "r") as f:
|
||||
while True:
|
||||
line = f.readline()
|
||||
if not line:
|
||||
break
|
||||
if not process_line(line, heatmaps, opts):
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
|
||||
stamped_log = open ("%s/stamped-log" % (out_dir), "a+")
|
||||
else:
|
||||
stamped_log = None
|
||||
|
||||
while True:
|
||||
line = sys.stdin.readline()
|
||||
if not line:
|
||||
break
|
||||
if not process_line(line, heatmaps, opts, stamped_log):
|
||||
continue
|
||||
|
||||
cnt = cnt + 1
|
||||
|
||||
if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot:
|
||||
cnt = 0
|
||||
dump_all(out_dir, heatmaps)
|
||||
|
||||
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 ('--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-key', dest = 'ignore_key', action = 'append', type = str,
|
||||
default = [], help = 'Ignore the key at position (x, y)')
|
||||
parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str,
|
||||
default = [], help = 'Only include key at position (x, y)')
|
||||
parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true',
|
||||
help = 'Do not load previous data, and do not update it, either.')
|
||||
args = parser.parse_args()
|
||||
if len(args.ignore_key) and len(args.only_key):
|
||||
print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!",
|
||||
file = sys.stderr)
|
||||
sys.exit(1)
|
||||
main(args)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#! /bin/sh
|
||||
WIN="$(xdotool getactivewindow)"
|
||||
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
|
||||
xdotool windowsize ${WIN} 100% 100%
|
||||
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
|
|
@ -0,0 +1,107 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
charmap = {
|
||||
'9': [[1, 0]],
|
||||
'7': [[2, 0]], '@': [[2, 5], [2, 0]],
|
||||
'5': [[3, 0]], '*': [[2, 5], [3, 0]],
|
||||
'3': [[4, 0]], '^': [[2, 5], [4, 0]],
|
||||
'1': [[5, 0]], '$': [[2, 5], [5, 0]],
|
||||
'0': [[8, 0]], '%': [[2, 5], [8, 0]],
|
||||
'2': [[9, 0]], '!': [[2, 5], [9, 0]],
|
||||
'4': [[10, 0]], '#': [[2, 5], [10, 0]],
|
||||
'6': [[11, 0]], '&': [[2, 5], [11, 0]],
|
||||
'8': [[12, 0]],
|
||||
|
||||
'\\': [[0, 1]], '|': [[2, 5], [0, 1]],
|
||||
'x': [[1, 1]], 'X': [[2, 5], [1, 1]],
|
||||
'w': [[2, 1]], 'W': [[2, 5], [2, 1]],
|
||||
'c': [[3, 1]], 'C': [[2, 5], [3, 1]],
|
||||
'h': [[4, 1]], 'H': [[2, 5], [4, 1]],
|
||||
'f': [[5, 1]], 'F': [[2, 5], [5, 1]],
|
||||
'[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]],
|
||||
']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]],
|
||||
'm': [[8, 1]], 'M': [[2, 5], [8, 1]],
|
||||
'g': [[9, 1]], 'G': [[2, 5], [9, 1]],
|
||||
'l': [[10, 1]], 'L': [[2, 5], [10, 1]],
|
||||
'p': [[11, 1]], 'P': [[2, 5], [11, 1]],
|
||||
'/': [[12, 1]], '?': [[2, 5], [12, 1]],
|
||||
'`': [[13, 1]], '~': [[2, 5], [13, 1]],
|
||||
|
||||
'\t': [[0, 2]],
|
||||
'a': [[1, 2]], 'A': [[2, 5], [1, 2]],
|
||||
'o': [[2, 2]], 'O': [[2, 5], [2, 2]],
|
||||
'e': [[3, 2]], 'E': [[2, 5], [3, 2]],
|
||||
'i': [[4, 2]], 'I': [[2, 5], [4, 2]],
|
||||
'u': [[5, 2]], 'U': [[2, 5], [5, 2]],
|
||||
'd': [[8, 2]], 'D': [[2, 5], [8, 2]],
|
||||
'r': [[9, 2]], 'R': [[2, 5], [9, 2]],
|
||||
't': [[10, 2]], 'T': [[2, 5], [10, 2]],
|
||||
'n': [[11, 2]], 'N': [[2, 5], [11, 2]],
|
||||
's': [[12, 2]], 'S': [[2, 5], [12, 2]],
|
||||
'=': [[13, 2]], '+': [[2, 5], [13, 2]],
|
||||
|
||||
'z': [[1, 3]], 'Z': [[2, 5], [1, 3]],
|
||||
'q': [[2, 3]], 'Q': [[2, 5], [2, 3]],
|
||||
'\'': [[3, 3]], '"': [[2, 5], [3, 3]],
|
||||
',': [[4, 3]], '<': [[2, 5], [4, 3]],
|
||||
'.': [[5, 3]], '>': [[2, 5], [5, 3]],
|
||||
'b': [[8, 3]], 'B': [[2, 5], [8, 3]],
|
||||
'k': [[9, 3]], 'K': [[2, 5], [9, 3]],
|
||||
'v': [[10, 3]], 'V': [[2, 5], [10, 3]],
|
||||
'y': [[11, 3]], 'Y': [[2, 5], [11, 3]],
|
||||
'j': [[12, 3]], 'J': [[2, 5], [12, 3]],
|
||||
|
||||
':': [[4, 4]], ';': [[4, 4], [4, 4]],
|
||||
'-': [[9, 4]], '_': [[2, 5], [9, 4]],
|
||||
|
||||
' ': [[10, 5]],
|
||||
'\n': [[11, 5]],
|
||||
|
||||
## Layered things
|
||||
# Hungarian
|
||||
'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]],
|
||||
'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]],
|
||||
'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]],
|
||||
'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]],
|
||||
'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]],
|
||||
'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]],
|
||||
'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]],
|
||||
'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]],
|
||||
'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]],
|
||||
}
|
||||
|
||||
def lookup_char(layer, ch):
|
||||
if ch in charmap:
|
||||
return charmap[ch]
|
||||
return None
|
||||
|
||||
def process_char(layer, ch, out=sys.stdout):
|
||||
keys = lookup_char(layer, ch)
|
||||
if not keys:
|
||||
print ("Unknown char: %s" % ch, file=sys.stderr)
|
||||
else:
|
||||
for (c, r) in keys:
|
||||
print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out)
|
||||
print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out)
|
||||
|
||||
def process_file(fn, layer, out=sys.stdout):
|
||||
with open(fn, "r") as f:
|
||||
ch = f.read(1)
|
||||
while ch:
|
||||
process_char(layer, ch, out)
|
||||
ch = f.read(1)
|
||||
|
||||
if sys.argv[1] == '-':
|
||||
out='/dev/stdin'
|
||||
else:
|
||||
out=sys.argv[1]
|
||||
|
||||
if len(sys.argv) >= 2:
|
||||
layer = 'ADORE'
|
||||
else:
|
||||
layer = sys.argv[2]
|
||||
|
||||
process_file(out, layer = layer)
|
|
@ -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),UC(0x2194),UC(0x21D4),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,39 @@ 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);
|
||||
};
|
||||
|
||||
// Override method to use NEO_A instead of KC_A
|
||||
uint16_t hex_to_keycode(uint8_t hex)
|
||||
{
|
||||
if (hex == 0x0) {
|
||||
return KC_0;
|
||||
} else if (hex < 0xA) {
|
||||
return KC_1 + (hex - 0x1);
|
||||
} else {
|
||||
switch(hex) {
|
||||
case 0xA:
|
||||
return NEO_A;
|
||||
case 0xB:
|
||||
return NEO_B;
|
||||
case 0xC:
|
||||
return NEO_C;
|
||||
case 0xD:
|
||||
return NEO_D;
|
||||
case 0xE:
|
||||
return NEO_E;
|
||||
case 0xF:
|
||||
return NEO_F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H,
|
||||
CTL_T(KC_GRV),KC_NUBS,KC_NO, KC_NO, KC_LALT,
|
||||
KC_PSCREEN, KC_PSCREEN,
|
||||
TO(PROG, ON_PRESS),
|
||||
TO(PROG),
|
||||
KC_SPC, MO(NAVI), KC_LGUI,
|
||||
// right hand
|
||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC,
|
||||
|
@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_RALT,KC_LBRC,KC_RBRC,KC_NO, CTL_T(KC_QUOT),
|
||||
MT(0x5, KC_NO), MT(0x5, KC_NO),
|
||||
TO(PROG, ON_PRESS),
|
||||
TO(PROG),
|
||||
KC_RGUI, MO(PROG), KC_SPC
|
||||
),
|
||||
|
||||
|
@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
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,
|
||||
TO(NAVI, ON_PRESS),
|
||||
TO(NAVI),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_EQUAL,
|
||||
|
@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS,
|
||||
KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
TO(NAVI, ON_PRESS),
|
||||
TO(NAVI),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
TO(BASE, ON_PRESS),
|
||||
TO(BASE),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
|
@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
TO(BASE, ON_PRESS),
|
||||
TO(BASE),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
#define EPRM M(1) // Macro 1: Reset EEPROM
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
|
@ -62,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* | EPRM | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
|
@ -79,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_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,
|
||||
EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
|
@ -149,6 +151,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -158,6 +165,7 @@ void matrix_init_user(void) {
|
|||
|
||||
};
|
||||
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
## Changelog
|
||||
|
||||
* Sep 22, 2016:
|
||||
* Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
|
||||
* Feb 2, 2016 (V1.1):
|
||||
* Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* Setup to approximate a Kinesis Advantage with an eye to use in a
|
||||
* Mac/OSX environment
|
||||
* This version adds a hand swap feature to flip the keyboard */
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,---------------. ,---------------.
|
||||
* |Ctrl/Esc| Alt | | Alt |Ctrl/Esc|
|
||||
* | LGUI |Al/Esc| |Al/Esc| RGUI |
|
||||
* ,------|--------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* |Backsp| Del |------| |------| Enter | Space|
|
||||
|
@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
CTL_T(KC_ESC), ALT_T(KC_APP),
|
||||
KC_HOME,
|
||||
KC_BSPC,KC_DEL,KC_END,
|
||||
// right hand
|
||||
KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT,
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_ENT, KC_SPC
|
||||
),
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
|
||||
KC_LGUI, ALT_T(KC_ESC),
|
||||
KC_HOME,
|
||||
KC_BSPC, KC_DEL, KC_END,
|
||||
// right hand
|
||||
KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT,
|
||||
MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
|
||||
ALT_T(KC_ESC), KC_RGUI,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_ENT, KC_SPC
|
||||
),
|
||||
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
|
@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,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_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
|
||||
KC_PAUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
|
||||
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS,
|
||||
KC_TRNS, KC_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,
|
||||
|
@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
|
@ -135,10 +140,6 @@ KEYMAP(
|
|||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
|
@ -154,6 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
The kastyle keymap was originally intended to remap the ErgoDox EZ to more
|
||||
closely approximate the layout of a Kinesis Advantage. Notable changes
|
||||
over the stock ErgoDox layout include:
|
||||
|
||||
* Re-arragnement of tab, enter, space, and delete to match the Kinesis
|
||||
* Addition of print screen, pause, etc. keys following the kines-ish keymap
|
||||
on L1
|
||||
* GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys
|
||||
are mapped to allow Esc on tap (good for Vi users)
|
||||
* Most notably, the addition of a momentary one-handed mode for quick and
|
||||
easy access to keys on the other half of the keyboard, e.g. while using a
|
||||
mouse in one hand, one may add text to a dialogue box with the other without
|
||||
having to reach across the keyboard or remove one's hand from the mouse.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Ergodox EZ for OS X
|
||||
|
||||
This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
|
||||
|
||||
If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/).
|
|
@ -0,0 +1,144 @@
|
|||
// Media keys work on OSX, but not on Windows.
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // Default layer
|
||||
#define AUXI 1 // Auxiliary layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ~` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | -_ | += | Bkspc |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | Del | Y | U | I | O | P | |\ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | L1 | A | S | D | F | G |------| |------| H | J | K | L | ;: | Enter |
|
||||
* |--------+------+------+------+------+------| {[ | | }] |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | <, | >. | ?/ | "' |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | | | | Esc | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | |Power | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | LGui | LAlt |------| |------| Bkspc |Space |
|
||||
* | | | | | Del | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1),
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_LCTL, KC_TRNS,KC_TRNS,KC_TRNS,KC_ESC,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_LGUI,KC_LALT,KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC,
|
||||
KC_DELETE, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT,
|
||||
KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_QUOT,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_PWR, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_DELETE, KC_BSPC, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Auxiliary Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | TRNS | | | Mute | VolDn| VolUp| Play | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | TRNS | |LShift| LCtrl| | |------| |------| LEFT | DOWN | UP |RIGHT | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LShift | | | | | | | | | MPrv | MNxt | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | LGui | LAlt |------| |------| Bkspc| Space|
|
||||
* | | | | | Del | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// AUXILIARY
|
||||
[AUXI] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_LSHIFT,KC_LCTL, KC_TRNS, KC_TRNS,
|
||||
KC_LSHIFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_LGUI, KC_LALT, KC_TRNS,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_PWR, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_DELETE, KC_BSPC, KC_SPC
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
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)
|
|
@ -0,0 +1,231 @@
|
|||
/*
|
||||
* This is built out of frustration with OSX / Sierra caps lock delay.
|
||||
* Fake it till you make it!
|
||||
*/
|
||||
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "timer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
#define BLINK_BASE 150U // timer threshold for blinking on MDIA layer
|
||||
|
||||
typedef enum onoff_t {OFF, ON} onoff;
|
||||
|
||||
#define caps_led_on ergodox_right_led_2_on
|
||||
#define caps_led_off ergodox_right_led_2_off
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | ` | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | CapsL | A | S | D | F | G |------| |------| H | J | K | L | ; | " |
|
||||
* |--------+------+------+------+------+------| ~L1 | | ~L1 |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Ctrl | Opt | Cmd | Left | Right| | Down | Up | Ctrl | Cmd | Opt |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | L1 | | Alt | Ctrl ]
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* |Backsp| Del |------| |------| Enter | Spc |
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC,
|
||||
M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G),
|
||||
KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), KC_FN0,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT,
|
||||
KC_TRNS, KC_FN1,
|
||||
KC_HOME,
|
||||
KC_BSPC, KC_DEL, KC_END,
|
||||
// right hand
|
||||
KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS,
|
||||
M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT,
|
||||
KC_FN0, M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT,
|
||||
KC_RALT, KC_RCTL,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_ENT, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L0 | L2 | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_GRV ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_FN3, KC_FN2,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, 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,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and tenkey
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | BOOTL | | Mute | Vol- | Vol+ | F14 | F15 | | | | NumLk| / | * | - | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 7 | 8 | 9 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+-----+-------+------+------+--------|
|
||||
* | | | | | | |------| |------| | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 1 | 2 | 3 | Enter| |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | 0 | . | Enter| |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L1 | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND TENKEY
|
||||
[MDIA] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, KC_F15,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
|
||||
KC_FN4, KC_NO,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_NO, KC_NO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NO,
|
||||
KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NO,
|
||||
KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO,
|
||||
KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_NO,
|
||||
KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_LAYER_MOMENTARY(SYMB), // FN0 - Momentary Layer 1 (Symbols)
|
||||
ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols)
|
||||
ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media)
|
||||
ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols)
|
||||
ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia)
|
||||
ACTION_LAYER_MOMENTARY(MDIA) // FN5 - Momentary Layer 2 (Mdia)
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static onoff caps_state = OFF;
|
||||
switch(id) {
|
||||
case KC_CAPS:
|
||||
if (record->event.pressed) {
|
||||
// Toggle caps state;
|
||||
if (caps_state == OFF) {
|
||||
// Turn it on then!
|
||||
caps_led_on();
|
||||
caps_state = ON;
|
||||
} else {
|
||||
caps_led_off();
|
||||
caps_state = OFF;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (record->event.pressed) {
|
||||
bool shifted = false;
|
||||
if (caps_state == ON && get_mods() == 0) {
|
||||
register_code(KC_LSFT);
|
||||
shifted = true;
|
||||
}
|
||||
register_code(id);
|
||||
if(shifted) {
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
} else {
|
||||
unregister_code(id);
|
||||
}
|
||||
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);
|
||||
|
||||
static onoff board_led_state = OFF;
|
||||
static uint16_t dt = 0;
|
||||
static uint8_t oldlayer = 0;
|
||||
|
||||
if(oldlayer != layer) {
|
||||
// Layer was just toggled.
|
||||
if(layer == BASE) {
|
||||
ergodox_board_led_off();
|
||||
board_led_state = OFF;
|
||||
} else {
|
||||
ergodox_board_led_on();
|
||||
board_led_state = ON;
|
||||
}
|
||||
} else if (layer >= MDIA) {
|
||||
// We need to do blinking.
|
||||
if(timer_elapsed(dt) > BLINK_BASE) {
|
||||
// toggle
|
||||
dt = timer_read();
|
||||
if(board_led_state == OFF) {
|
||||
ergodox_board_led_on();
|
||||
board_led_state = ON;
|
||||
} else {
|
||||
ergodox_board_led_off();
|
||||
board_led_state = OFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
oldlayer = layer;
|
||||
}
|
After Width: | Height: | Size: 181 KiB |
|
@ -0,0 +1,38 @@
|
|||
# The extra special ergodox build for MacOS Sierra caps lock users
|
||||
|
||||
###Do you
|
||||
- Hate the OSX / MacOS caps lock delay?
|
||||
- Have an ergodox?
|
||||
|
||||
###Then this might just be for you!
|
||||
|
||||
[This](http://apple.stackexchange.com/questions/81234/how-to-remove-caps-lock-delay-on-apple-macbook-pro-aluminum-keyboard)
|
||||
and [this](http://sleepycow.org/2014/07/removing-the-caps-lock-delay-on-a-macbook/)
|
||||
are good workarounds for the caps lock delay, however none of these
|
||||
work on Sierra. This abomination of a keymap simulates capslock to the best
|
||||
of its abilities.
|
||||
This means that it keeps track of caps lock state internally rather than
|
||||
sending a caps lock keypress to the OS. It is smart enough to check for
|
||||
modifiers, such as Control being held down, and stop it with the hanky panky
|
||||
and just send on the key event unmolested even if FakeCaps is enabled. And
|
||||
since the macro isn't even registered on the non-alphas, it will not affect
|
||||
them regardless. Only in the event that FakeCaps is enabled and an alpha key
|
||||
is pressed will it sneak in a shift keydown before the alpha keydown and
|
||||
immediately afterward sneaks in a shift keyup. Generally this works well,
|
||||
however there is one known issue:
|
||||
|
||||
- Holding down a key will only have the first character in caps. For instance,
|
||||
with caps lock on, if you hold down the 'a' key, you get:
|
||||
|
||||
```
|
||||
Aaaaaaaaaaaaaaaaaa
|
||||
```
|
||||
|
||||
I have only tested this on an original Ergodox with a Teensy 2.0.
|
||||
|
||||
####Some other small tweaks
|
||||
- Layer 0 board light is off
|
||||
- Layer 1 board light is on solid
|
||||
- Layer 2 board light blinks at speed controlled by BLINK_BASE
|
||||
|
||||
![osx whiskey tango foxtrot](osx_whiskey_tango_foxtrot_capslock.png)
|
|
@ -0,0 +1,7 @@
|
|||
## v0.3
|
||||
|
||||
*2016-10-11*
|
||||
|
||||
### Starting point
|
||||
|
||||
* The starting point of this keymap. A beginner layout, and a couple placeholders.
|
|
@ -0,0 +1,9 @@
|
|||
CONSOLE_ENABLE = no # for debugging
|
||||
|
||||
SLEEP_LED_ENABLE = no # no led blinking while sleeping
|
||||
NKRO_ENABLE = yes # disable for windows
|
||||
TAP_DANCE_ENABLE = yes # tap-tap-tap
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
|
@ -0,0 +1,65 @@
|
|||
pvinis' keymap
|
||||
==============
|
||||
|
||||
This is a getting-used-to keymap for the [ErgoDox EZ][ez]. It's very much a work in progress.
|
||||
|
||||
[ez]: https://ergodox-ez.com/
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Todo](#todo)
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [Beginner layer](#beginner-layer)
|
||||
- [QWERTY layer](#qwerty-layer)
|
||||
- [CARPALX layer](#carpalx-layer)
|
||||
- [System Control layer](#system-control-layer)
|
||||
- [Template layers](#template-layers)
|
||||
* [Building](#building)
|
||||
|
||||
# Todo
|
||||
|
||||
- [ ] Generate images from keymap
|
||||
- [ ] Implement algernon's heatmap
|
||||
- [ ] Implement `KC_POP`
|
||||
|
||||
# Layouts
|
||||
|
||||
## Base layer
|
||||
|
||||
This is the base layer that contains the common buttons of all keymaps. Right now, it has the top left button as a `flash` button when it's tapped 4 times, and the two thumb islands. The islands contain the `space` and `enter` keys on the right, the `backspace` and `shift` on the left, and all the 1x1 keys are just layer switches.
|
||||
Every time I connect the keyboard, I press the `BEGIN` layer switch, and then start typing.
|
||||
Recently, I added a few application "shortcuts", that basically call `ctrl`+`alt`+`cmd`+`<key>`, and `<key>` is `S` for Slack, `X` for Xcode, `M` for Messenger. Using [Hammerspoon][hammerspoon], I show/hide the application.
|
||||
|
||||
[hammerspoon]: http://www.hammerspoon.org/
|
||||
|
||||
## Beginner layer
|
||||
|
||||
This is a basic keymap I use right now until I'm comfortable typing on the Ergodox. Currently uses a QWERTY layout, and the `([{}])` on the middle keys. Not a perfect layout, and its going to go away at some point, but for now thats my daily driver.
|
||||
|
||||
## QWERTY layer
|
||||
|
||||
This is basically the same as the `BEGIN` layer, but it might go away. I'm not using it, but I should have a QWERTY layout on the keyboard, in case someone else wants to try it out, or if I completely forget how keyboards work! At some point, this and the `BEGIN` layer will become one.
|
||||
|
||||
## CARPALX layer
|
||||
|
||||
This is here as a placeholder. I want to transition to [Carpalx QGMLWY][carpalx] or [White][white] at some point. They both look very interesting and more comfortable to type on, but after I'm confident with typing on the Ergodox.
|
||||
|
||||
[carpalx]: http://mkweb.bcgsc.ca/carpalx/?full_optimization
|
||||
[white]: https://github.com/mw8/white_keyboard_layout
|
||||
|
||||
## System Control layer
|
||||
|
||||
This one is a layer that, in time, will have controls like mouse movement, volume up/down, mute, sleep, restart, shutdown, etc.
|
||||
|
||||
## Template layers
|
||||
|
||||
I have two commented out layers that are just templates, so I can easily create a new layer.
|
||||
|
||||
# Building
|
||||
|
||||
```
|
||||
$ git clone https://github.com/jackhumbert/qmk_firmware.git
|
||||
$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis
|
||||
$ make
|
||||
```
|
|
@ -0,0 +1,430 @@
|
|||
// pvinis' ergodox keymap
|
||||
|
||||
#include "ergodox.h"
|
||||
#include "mousekey.h"
|
||||
|
||||
// easier name for left ctrl-alt-gui
|
||||
#define ALLM(kc) LCAG(kc)
|
||||
|
||||
// layers
|
||||
enum {
|
||||
BASE = 0,
|
||||
BEGIN,
|
||||
QWERTY,
|
||||
CARPALX,
|
||||
SYSCTL,
|
||||
};
|
||||
|
||||
// extra keys
|
||||
enum {
|
||||
NONE = 0,
|
||||
|
||||
// mouse
|
||||
MS_UL, // up left
|
||||
MS_UR, // up right
|
||||
MS_DL, // down left
|
||||
MS_DR, // down right
|
||||
|
||||
// tap dance
|
||||
TD_FLSH, // flash keyboard
|
||||
};
|
||||
|
||||
// application selection
|
||||
// this is sending ctrl-alt-gui-<key>, and this is picked up by hammerspoon
|
||||
#define AP_SLCK ALLM(KC_S)
|
||||
#define AP_XCOD ALLM(KC_X)
|
||||
#define AP_MSGR ALLM(KC_M)
|
||||
|
||||
// keymaps
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* BASE
|
||||
* the base of the keyboard.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |4x FLASH| | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |BEGIN |QWERTY| |SYSCTL| |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | |CARPAL| |Slack | | |
|
||||
* |Backsp|LShift|------| |------| Enter |Space |
|
||||
* | | |SYSCTL| |Msngr | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP(
|
||||
TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,TG(BEGIN) ,TG(QWERTY)
|
||||
,TG(CARPALX)
|
||||
,KC_BSPC ,KC_LSFT ,TG(SYSCTL)
|
||||
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,TG(SYSCTL) ,KC_NO
|
||||
,AP_SLCK
|
||||
,AP_MSGR ,KC_ENT ,KC_SPC
|
||||
),
|
||||
|
||||
/* BEGIN
|
||||
* a beginner's keymap i currently use.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter |
|
||||
* |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | ` | Cmd | | Cmd | | | | | ' | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[BEGIN] = KEYMAP(
|
||||
KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6
|
||||
,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
|
||||
,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
||||
,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN
|
||||
,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL
|
||||
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS
|
||||
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT
|
||||
,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT
|
||||
,KC_UP ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
|
||||
/* QWERTY
|
||||
* the default qwerty keymap. not really used, but i'll keep it here for now.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | 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 | , | . | / | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[QWERTY] = KEYMAP(
|
||||
KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS
|
||||
,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
||||
,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS
|
||||
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS
|
||||
,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
|
||||
/* CARPALX
|
||||
* the keymap i would like to transition to.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | D | S | T | N | R |------| |------| I | A | E | O | H | |
|
||||
* |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------|
|
||||
* | | Z | X | C | V | J | | | | K | P | , | . | / | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Up | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[CARPALX] = KEYMAP(
|
||||
KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS
|
||||
,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R
|
||||
,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS
|
||||
,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS
|
||||
,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
/* SYSCTL
|
||||
* a keymap to control my system.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | Mute |VolDn |VolUp | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | |MsUpL | MsUp |MsUpR | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | Lock |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | |MsDnL | MsDn | | | Sleep |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | Power|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | |MidClk|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Left |Right |
|
||||
* | | |------| |------| Click| Click|
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[SYSCTL] = KEYMAP(
|
||||
KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
/*,KC_POP*/,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO
|
||||
/*,KC_PTRN*/,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LCTL(LSFT(KC_PWR))
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_SLEP
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
),
|
||||
|
||||
/* TEMPLATE
|
||||
* keymap template with transparent and non-transparent keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
/*
|
||||
[TEMPLATE] = KEYMAP(
|
||||
KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
[TEMPLATE] = KEYMAP(
|
||||
KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
// keyboard initialization
|
||||
void matrix_init_user() {
|
||||
ergodox_led_all_on();
|
||||
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
|
||||
ergodox_led_all_set(i);
|
||||
wait_ms(5);
|
||||
}
|
||||
wait_ms(1000);
|
||||
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
|
||||
ergodox_led_all_set(i);
|
||||
wait_ms(10);
|
||||
}
|
||||
ergodox_led_all_off();
|
||||
}
|
||||
|
||||
// extra keys
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
|
||||
// mouse
|
||||
case MS_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 MS_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 MS_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 MS_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;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
// tap dances
|
||||
|
||||
// flash keyboard on 4x tap, with leds
|
||||
void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_3_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_1_off();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
reset_keyboard();
|
||||
reset_tap_dance(state);
|
||||
}
|
||||
}
|
||||
|
||||
void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ergodox_right_led_1_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
|
||||
};
|
|
@ -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
|
||||
|
||||
|
|
|
@ -26,3 +26,4 @@ SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
|||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= yes # Unicode
|
||||
ONEHAND_ENABLE ?= yes # Allow swapping hands of keyboard
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
|
@ -0,0 +1,102 @@
|
|||
GameNum firmware
|
||||
======================
|
||||
## Board overview
|
||||
|
||||
The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited.
|
||||
It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers.
|
||||
The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games.
|
||||
The RTS layer is meant to be used rotating the device 90 degrees counterclockwise.
|
||||
|
||||
The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK.
|
||||
|
||||
## Build considerations
|
||||
|
||||
Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind.
|
||||
Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz.
|
||||
The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled.
|
||||
'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro.
|
||||
|
||||
## schematic of the switches and diodes
|
||||
|
||||
![schematic overview](http://i.imgur.com/fleitoA.jpg)
|
||||
|
||||
Keep in mind that the minus of the diodes should point towards the pro micros inputs.
|
||||
|
||||
##LED hookup
|
||||
|
||||
![led overview](http://i.imgur.com/U6m865n.jpg)
|
||||
|
||||
## Adding more layers
|
||||
|
||||
Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`.
|
||||
Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers.
|
||||
|
||||
Next thing to do is to add the actual layer for the keymap.
|
||||
|
||||
```
|
||||
[DEF] = KEYMAP(
|
||||
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
||||
KC_7, KC_8, KC_9, KC_PLUS, \
|
||||
KC_4, KC_5, KC_6, \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_0, KC_DOT, KC_ENT \
|
||||
)
|
||||
```
|
||||
|
||||
This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D:
|
||||
In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does!
|
||||
|
||||
Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer.
|
||||
The number that is at the end of the keycode corresponds with the code in the function.
|
||||
`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well.
|
||||
|
||||
Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`.
|
||||
Look for this piece of code:
|
||||
|
||||
```
|
||||
DDRD |= (1<<4);
|
||||
PORTD &= ~(1<<4);
|
||||
```
|
||||
|
||||
Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<<y);` defines that pin as an output. `PORTx &= ~(1<<y);` sets the pin to LOW turning off the LED.
|
||||
|
||||
Now go back to `keymap.c` and look for the `process_record_user` function. The function is basically a switch case that checks if you pushed one of the defined layer-switch buttons. When it sees that you pushed one of them it sets the pins of the LED's either low or high.
|
||||
|
||||
```
|
||||
case KC_FN1:
|
||||
if (record->event.pressed) {
|
||||
PORTC &= ~(1 << 6); // PC6 goes low
|
||||
PORTD |= (1<<4); //PD4 goes high
|
||||
}
|
||||
break;
|
||||
```
|
||||
|
||||
This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit.
|
||||
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder.
|
||||
Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with.
|
||||
Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you.
|
||||
Once your dev env is set up, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file.
|
||||
|
||||
### Default
|
||||
|
||||
To build with the default keymap, simply run `make`.
|
||||
|
||||
### Other Keymaps
|
||||
|
||||
To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
|
||||
|
||||
```
|
||||
$ make keymap=[default|jack|<name>]
|
||||
```
|
||||
|
||||
Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
|
||||
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
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 0x1234
|
||||
#define PRODUCT_ID 0x5678
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Seth-Senpai
|
||||
#define PRODUCT GameNum
|
||||
#define DESCRIPTION Numpad with gamelayers
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/*
|
||||
* 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 { B6, B2, B3, B1, F7 }
|
||||
#define MATRIX_COL_PINS { D7, E6, B4, B5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
// #define BACKLIGHT_PIN C6
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* 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,14 @@
|
|||
#include "gamenum.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
DDRC |= (1<<6);
|
||||
PORTC &= ~(1<<6);
|
||||
|
||||
DDRD |= (1<<4);
|
||||
PORTD &= ~(1<<4);
|
||||
|
||||
matrix_init_user();
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef GAMENUM_H
|
||||
#define GAMENUM_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, \
|
||||
k41, k42, k43 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03}, \
|
||||
{ k10, k11, k12, k13}, \
|
||||
{ k20, k21, k22, KC_NO}, \
|
||||
{ k30, k31, k32, KC_NO}, \
|
||||
{ KC_NO, k41, k42, k43} \
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,68 @@
|
|||
#include "gamenum.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define DEF 0
|
||||
#define HDN 1
|
||||
#define OSY 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[DEF] = KEYMAP(
|
||||
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
||||
KC_7, KC_8, KC_9, KC_PLUS, \
|
||||
KC_4, KC_5, KC_6, \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_0, KC_DOT, KC_ENT \
|
||||
),
|
||||
[HDN] = KEYMAP(
|
||||
KC_FN1, KC_1, KC_2, KC_3, \
|
||||
KC_Q, KC_W, KC_E, KC_R, \
|
||||
KC_A, KC_S, KC_D, \
|
||||
KC_Z, KC_X, KC_C, \
|
||||
KC_LSFT, KC_LALT, KC_SPC \
|
||||
),
|
||||
[OSY] = KEYMAP(
|
||||
KC_A, KC_Q, KC_1, KC_FN2, \
|
||||
KC_S, KC_W, KC_2, KC_LALT, \
|
||||
KC_D, KC_E, KC_3, \
|
||||
KC_F, KC_R, KC_4, \
|
||||
KC_SPC, KC_T, KC_TAB \
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_SET(HDN, ON_PRESS),
|
||||
[1] = ACTION_LAYER_SET(OSY, ON_PRESS),
|
||||
[2] = ACTION_LAYER_SET(DEF, ON_PRESS),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case KC_FN0:
|
||||
if (record->event.pressed) {
|
||||
PORTC |= (1 << 6); // PC6 goes high
|
||||
}
|
||||
break;
|
||||
case KC_FN1:
|
||||
if (record->event.pressed) {
|
||||
PORTC &= ~(1 << 6); // PC6 goes high
|
||||
PORTD |= (1<<4);
|
||||
}
|
||||
break;
|
||||
case KC_FN2:
|
||||
if (record->event.pressed) {
|
||||
PORTD &= ~(1 << 4); // PC6 goes high
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 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=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../Makefile
|
||||
endif
|
||||
|
||||
|
|
@ -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.
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* dbroqua HHKB Layout
|
||||
*/
|
||||
#include "hhkb.h"
|
||||
|
||||
#define BASE 0
|
||||
#define FN 1
|
||||
#define MOUSE 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* BASE Level: Default Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn |
|
||||
* +-----------------------------------------------------------------------------------------+
|
||||
* | Gui | Alt | Space | AltGr |Mouse|
|
||||
* `----------------------------------------------------------------´
|
||||
*/
|
||||
[BASE] = KEYMAP(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \
|
||||
KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE)
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | | | Home| PgUp| Left |Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | | | End |PgDwn| Down| | |
|
||||
* +-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |
|
||||
* `----------------------------------------------------------------´
|
||||
*/
|
||||
[FN] = KEYMAP(
|
||||
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
|
||||
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* MOUSE Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | WUp | | | | | | | | Btn1| Up | Btn2| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | WLt | WDn | WRt | | | | | | | Left |Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | Btn3| Down| | |
|
||||
* +-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |
|
||||
* `----------------------------------------------------------------´
|
||||
*/
|
||||
[MOUSE] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \
|
||||
KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// 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;
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
# Dbroqua Layout
|
||||
|
||||
* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01
|
||||
|
||||
# Programming Instructions:
|
||||
Enter into programming mode and run the following command.
|
||||
```
|
||||
$ sudo KEYMAP=dbroqua make dfu
|
||||
```
|
|
@ -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
|