[keymap] ninjonas userspace and keymaps for hotdox, lily58, & pinky3 (#6649)

* [keyboard] introducing ninjonas userspace & keymaps for hotdox, lily58, and pinky3

* [fix(#6649)] removed M_EPRM and used builtin EEP_RST keycode as-per review.

* [chore(#6649)] forgot to update keymap legend on lily58
This commit is contained in:
Jonas Avellana 2019-09-02 08:40:01 -06:00 committed by Drashna Jaelre
parent 0e153781f0
commit f2ea65db6b
20 changed files with 1577 additions and 0 deletions

View File

@ -0,0 +1,106 @@
# ninjonas Keymap for [ErgoDox (HotDox)](https://www.alpacakeyboards.com/)
## Setup
- Ensure you've cloned the [qmk](https://github.com/qmk/qmk_firmware) repo
- Create directory `ninjonas` on `/keyboards/hotdox/keymaps/`
- Run `copy_keymap.sh`. This copies the contents of this repo into `%qmk_firmware%/ninjonas/` directory
- To push your keymap to your keyboard run this command `make clean hotdox:ninjonas:dfu`
- this compiles your keymap and creates a `hotdox_ninjonas.hex` file and will atempt to flash your board
- if you get the following message:
```
dfu-programmer: no device present.
Error: Bootloader not found. Trying again in 5s.
```
- Press the reset button underneath your ErgoDox keyboard
- The following messages should show up and your board has successfuly been flashed
```
Bootloader Version: 0x00 (0)
Erasing flash... Success
Checking memory from 0x0 to 0x6FFF... Empty.
Checking memory from 0x0 to 0x5D7F... Empty.
0% 100% Programming 0x5D80 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
0% 100% Reading 0x7000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
Validating... Success
0x5D80 bytes written into 0x7000 bytes memory (83.48%).
```
- The alterenative is follow the steps on [Hotdox flashing guide](https://www.alpacakeyboards.com/flash/hot-dox-ergodox-76-flashing-instructions)
## Keymap
This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](https://github.com/ninjonas/qmk-yonas/tree/master/users/ninjonas).
### QWERTY
```c
/* Keymap 0: QWERTY
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Esc | A | S | D | F | G |------| |-------| H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------'
* |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV|
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Up | Down | | Left | Right|
* ,------|------|------| |------+------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Del |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `--------------------'
*/
```
### LOWER
```c
/* Keymap 1: LOWER
*
* ,--------------------------------------------------. ,----------------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------|
* | | | |KC_BRU| Play | Mute | | | | PgUp | Home | Up | End | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | |KC_BRD| Next |VolUp |------| |-------| PgDn | Left | Down |Right |K_LOCK | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | | | Prev |VolDn | | | | | | | | | |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------'
* | | | | | | | | | |M_CODE | |
* `----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
```
### RAISE
```c
/* Keymap 2: RAISE
*
* ,--------------------------------------------------. ,----------------------------------------------------.
* | | | | |K_CSCN| | | | | | | | | | |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------|
* | M_MAKE | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | M_VRSN | | MS_L | MS_D | MS_R | WH_D |------| |-------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | M_FLSH | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
```

View File

@ -0,0 +1,348 @@
/* Copyright 2019 @ninjonas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "ninjonas.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Esc | A | S | D | F | G |------| |-------| H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------'
* |M_SHFT| | Alt | | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV|
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Up | Down | | Left | Right|
* ,------|------|------| |------+------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Del |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `--------------------'
*/
[_QWERTY] = LAYOUT_ergodox_wrapper(
// LEFT HAND
_____________________NUM_LEFT_______________________, KC_MPLY,
_____________________QWERTY_L1______________________, KC_NO,
_____________________QWERTY_L2______________________,
_____________________QWERTY_L3______________________, T_LBRC,
M_SHFT, KC_NO, ________MOD_LEFT_________,
// LEFT THUMB
KC_UP, KC_DOWN,
KC_HOME,
LT_RAI, KC_BSPC,
KC_END,
//RIGHT HAND
K_LOCK, _____________________NUM_RIGHT______________________,
KC_NO, _____________________QWERTY_R1______________________,
_____________________QWERTY_R2______________________,
T_RBRC, _____________________QWERTY_R3______________________,
________MOD_RIGHT________, M_ZOOM, M_PYNV,
// RIGHT THUMB
KC_LEFT, KC_RGHT,
KC_PGUP,
KC_PGDN,
KC_DEL, LT_LOW
),
/* DVORAK
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------|
* | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Esc | A | O | E | U | I |------| |-------| D | H | T | N | S | / |
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | = |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------'
* |M_SHFT| | Alt | | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV|
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Up | Down | | Left | Right|
* ,------|------|------| |------+------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Del |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `--------------------'
*/
[_DVORAK] = LAYOUT_ergodox_wrapper(
// LEFT HAND
_____________________NUM_LEFT_______________________, KC_MPLY,
_____________________DVORAK_L1______________________, KC_NO,
_____________________DVORAK_L2______________________,
_____________________DVORAK_L3______________________, T_LBRC,
M_SHFT, KC_NO, ________MOD_LEFT_________,
// LEFT THUMB
KC_UP, KC_DOWN,
KC_HOME,
LT_RAI, KC_BSPC,
KC_END,
//RIGHT HAND
K_LOCK, _____________________NUM_RIGHT______________________,
KC_NO, _____________________DVORAK_R1______________________,
_____________________DVORAK_R2______________________,
T_RBRC, _____________________DVORAK_R3______________________,
________MOD_RIGHT________, M_ZOOM, M_PYNV,
// RIGHT THUMB
KC_LEFT, KC_RGHT,
KC_PGUP,
KC_PGDN,
KC_DEL, LT_LOW
),
/* COLEMAK
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+------+--------|
* | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Esc | A | R | S | T | D |------| |-------| H | N | E | I | O | ' |
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | K | M | , | . | / | = |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------'
* |M_SHFT| | Alt | | Ctl | | BkSP | Del |LOWER |M_ZOOM|M_PYNV|
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Up | Down | | Left | Right|
* ,------|------|------| |------+------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Del |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `--------------------'
*/
[_COLEMAK] = LAYOUT_ergodox_wrapper(
// LEFT HAND
_____________________NUM_LEFT_______________________, KC_MPLY,
_____________________COLEMAK_L1_____________________, KC_NO,
_____________________COLEMAK_L2_____________________,
_____________________COLEMAK_L3_____________________, T_LBRC,
M_SHFT, KC_NO, ________MOD_LEFT_________,
// LEFT THUMB
KC_UP, KC_DOWN,
KC_HOME,
LT_RAI, KC_BSPC,
KC_END,
//RIGHT HAND
K_LOCK, _____________________NUM_RIGHT______________________,
KC_NO, _____________________COLEMAK_R1_____________________,
_____________________COLEMAK_R2_____________________,
T_RBRC, _____________________COLEMAK_R3_____________________,
________MOD_RIGHT________, M_ZOOM, M_PYNV,
// RIGHT THUMB
KC_LEFT, KC_RGHT,
KC_PGUP,
KC_PGDN,
KC_DEL, LT_LOW
),
/* LOWER
*
* ,--------------------------------------------------. ,----------------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------|
* | | | |KC_BRU| Play | Mute | | | | PgUp | Home | Up | End | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | |KC_BRD| Next |VolUp |------| |-------| PgDn | Left | Down |Right |K_LOCK | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | | | Prev |VolDn | | | | | | | | | |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------'
* | | | | | | | | | |M_CODE | |
* `----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_LOWER] = LAYOUT_ergodox_wrapper(
//LEFT HAND
_____________________FUNC_LEFT______________________, _______,
_______, _______, _______, _________MEDIA_1_________, _______,
_______, _______, _______, _________MEDIA_2_________,
_______, _______, _______, _________MEDIA_3_________, _______,
_______, _______, _______, _______, _______,
// LEFT THUMB
_______, _______,
_______,
_______, _______,
_______,
//RIGHT HAND
_______, _____________________FUNC_RIGHT_____________________,
_______, _______________NAV_1______________, _______, _______,
_______________NAV_2______________, K_LOCK, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, M_CODE, _______,
// RIGHT THUMB
_______, _______,
_______,
_______,
_______, _______
),
/* RAISE
*
* ,--------------------------------------------------. ,----------------------------------------------------.
* | | | | |K_CSCN| | | | | | | | | | |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------|
* | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | MS_L | MS_D | MS_R | WH_D |------| |-------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_RAISE] = LAYOUT_ergodox_wrapper(
//LEFT HAND
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, K_CSCN, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX,
XXXXXXX, XXXXXXX, _____________MOUSE_2______________,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// LEFT THUMB
_______, _______,
_______,
_______, _______,
_______,
//RIGHT HAND
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, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// RIGHT THUMB
_______, _______,
_______,
_______,
_______, _______
),
/* ADJUST
*
* ,--------------------------------------------------. ,----------------------------------------------------.
* | | | | | | | | | | | | |COLMAK|DVORAK |QWERTY |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------|
* | M_MAKE | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | M_VRSN | | | | | |------| |-------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | M_FLSH | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[_ADJUST] = LAYOUT_ergodox_wrapper(
//LEFT HAND
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
M_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
M_VRSN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// LEFT THUMB
_______, _______,
_______,
_______, _______,
_______,
//RIGHT HAND
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY,
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,
// RIGHT THUMB
_______, _______,
_______,
_______,
_______, _______
),
/* Keymap XX: TEMPLATE
*
* ,--------------------------------------------------. ,----------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------|
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | | | | |------| |-------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
[_XXLAYER] = LAYOUT_ergodox_wrapper(
//LEFT HAND
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
// LEFT THUMB
_______, _______,
_______,
_______, _______,
_______,
//RIGHT HAND
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
// RIGHT THUMB
_______, _______,
_______,
_______,
_______, _______
),
*/
};

View File

@ -0,0 +1,136 @@
# ninjonas Keymap for [Lily58 Pro](https://github.com/kata0510/Lily58)
## Keymap
This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../users/ninjonas).
> Make sure you update QMK's lily58 config.h TAPPING_TERM to 200ms or this won't compile
More information about the Lily58 pro keyboard can be found [here](https://yuchi-kbd.hatenablog.com/entry/2018/12/23/214342)
### QWERTY
```c
/* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | = |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
### DVORAK
```c
/* DVORAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | A | O | E | U | I |-------. ,-------| D | H | T | N | S | / |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| ; | Q | J | K | X |-------| |-------| B | M | W | V | Z | = |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
### COLEMAK
```c
/* COLEMAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | = |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
### LOWER
```c
/* LOWER
* ,------------------------------------------. ,------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+-------+------+------| |------+------+------+------+-------+------|
* | | | |KC_BRIU| Play | Mute | | PgUp | Home | Up | End | | |
* |------+------+------+-------+------+------| |------+------+------+------+-------+------|
* | | | |KC_BRID| Next |VolUp |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | |
* |------+------+------+-------+------+------| | | |------+------+------+------+-------+------|
* | |M_SHFT| | | Prev |VolDn |-------| |-------| | | | |M_ZOOM |M_PYNV|
* `------------------------------------------/ / \ \------------------------------------------'
* | | | | / / \ \ | |M_CODE| |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
### RAISE
```c
/* RAISE
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | |K_CSCN| | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | MS_L | MS_D | MS_R | WH_D |-------. ,-------| | | | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | | | | / / \ \ | | | |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
### ADJUST
```c
/* ADJUST
* ,------------------------------------------. ,-----------------------------------------.
* |EEP_RST| | | | | | | | | |COLMAK|DVORAK|QWERTY|
* |-------+------+------+------+------+------| |------+------+------+------+------+------|
* |M_MAKE | | | | | | | | | | | | |
* |-------+------+------+------+------+------| |------+------+------+------+------+------|
* |M_VRSN | | | | | |-------. ,-------| | | | | | |
* |-------+------+------+------+------+------| | | |------+------+------+------+------+------|
* |M_FLSH | | | | | |-------| |-------| | | | | | |
* `------------------------------------------/ / \ \-----------------------------------------'
* | | | | / / \ \ | | | |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
<!--
### TEMPLATE
```c
/* TEMPLATE
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | |-------. ,-------| | | | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | | | | / / \ \ | | | |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
```
-->

View File

@ -0,0 +1,31 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define SSD1306OLED
#define USE_SERIAL_PD2
#define TAPPING_FORCE_HOLD

View File

@ -0,0 +1,152 @@
/* Copyright 2019 @ninjonas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "ninjonas.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | = |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | Alt | | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_QWERTY] = LAYOUT_wrapper(
_____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \
_____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, \
_____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, \
_____________________QWERTY_L3______________________, T_LBRC, T_RBRC, _____________________QWERTY_R3______________________, \
________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \
),
/* DVORAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | A | O | E | U | I |-------. ,-------| D | H | T | N | S | / |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| ; | Q | J | K | X |-------| |-------| B | M | W | V | Z | = |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | Alt | | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_DVORAK] = LAYOUT_wrapper(
_____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \
_____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, \
_____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, \
_____________________DVORAK_L3______________________, T_LBRC, T_RBRC, _____________________DVORAK_R3______________________, \
________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \
),
/* COLEMAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | = |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | Alt | | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_COLEMAK] = LAYOUT_wrapper(
_____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \
_____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, \
_____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, \
_____________________COLEMAK_L3_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R3_____________________, \
________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \
),
/* LOWER
* ,------------------------------------------. ,------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+-------+------+------| |------+------+------+------+-------+------|
* | | | |KC_BRIU| Play | Mute | | PgUp | Home | Up | End | | |
* |------+------+------+-------+------+------| |------+------+------+------+-------+------|
* | | | |KC_BRID| Next |VolUp |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | |
* |------+------+------+-------+------+------| | | |------+------+------+------+-------+------|
* |M_SHFT| | | | Prev |VolDn |-------| |-------| | | | |M_ZOOM |M_PYNV|
* `------------------------------------------/ / \ \------------------------------------------'
* | | | | / / \ \ | |M_CODE| |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_LOWER] = LAYOUT_wrapper( \
_____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, \
_______, _______, _______, _________MEDIA_1_________, _______________NAV_1______________, _______, _______, \
_______, _______, _______, _________MEDIA_2_________, _______________NAV_2______________, K_LOCK, _______, \
M_SHFT, _______, _______, _________MEDIA_3_________, _______, _______, _______, _______, _______, _______, M_ZOOM, M_PYNV, \
__________________________________, _______, _______, M_CODE, _______ \
),
/* RAISE
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | |K_CSCN| | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | MS_L | MS_D | MS_R | WH_D |-------. ,-------| | | | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | | | | / / \ \ | | | |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_RAISE] = LAYOUT_wrapper( \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, K_CSCN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
__________________________________, __________________________________ \
),
/* ADJUST
* ,------------------------------------------. ,-----------------------------------------.
* |EEP_RST| | | | | | | | | |COLMAK|DVORAK|QWERTY|
* |-------+------+------+------+------+------| |------+------+------+------+------+------|
* | M_MAKE| | | | | | | | | | | | |
* |-------+------+------+------+------+------| |------+------+------+------+------+------|
* | M_VRSN| | | | | |-------. ,-------| | | | | | |
* |-------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | M_FLSH| | | | | |-------| |-------| | | | | | |
* `------------------------------------------/ / \ \-----------------------------------------'
* | | | | / / \ \ | | | |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_ADJUST] = LAYOUT_wrapper( \
EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, \
M_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
M_VRSN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
__________________________________, __________________________________ \
),
};

View File

@ -0,0 +1,37 @@
#include QMK_KEYBOARD_H
#include <stdio.h>
#include "lily58.h"
#include "ninjonas.h"
char layer_state_str[24];
const char *read_layer_state(void) {
switch (biton32(layer_state))
{
case _RAISE:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
break;
case _LOWER:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
break;
case _ADJUST:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
break;
default:
switch (biton32(default_layer_state)) {
case _COLEMAK:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
break;
case _DVORAK:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak");
break;
case _QWERTY:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Qwerty");
break;
default:
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
}
}
return layer_state_str;
}

View File

@ -0,0 +1,5 @@
# If you want to change the display of OLED, you need to change here
SRC += ./lib/glcdfont.c \
layer_state_reader.c \
./lib/logo_reader.c \
./lib/keylogger.c \

View File

@ -0,0 +1,142 @@
# ninjonas Keymap for [Pinky3](https://github.com/tamanishi/Pinky3)
## Keymap
This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../../users/ninjonas).
More information about the Pinky3 keyboard can be found [here](https://github.com/tamanishi/Pinky3)
### QWERTY
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| Tab| Q| W| E| R| T| Play| | Mute| Y| U| I| O| P| \|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| Esc/Caps| A| S| D| F| G| [| | ]| H| J| K| L| ;| '|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| Shift| Z| X| C| V| B| Spc/RAI| | Ent/LOW| N| M| ,| .| /| =|
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| ALT| | CTRL| Spc/NUM| | Ent/FUNC| BckSpace| Del| LOWER|
`---------------------------------------' `---------------------------------------'
*/
```
### DVORAK
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| Tab| '| ,| .| P| Y| Play| | Mute| F| G| C| R| L| \|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| Esc/Caps| A| O| E| U| I| [| | ]| D| H| T| N| S| /|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| Shift| ;| Q| J| K| X| Spc/RAI| | Ent/LOW| B| M| W| V| Z| =|
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| ALT| | CTRL| Spc/NUM| | Ent/FUNC| BckSpace| Del| LOWER|
`---------------------------------------' `---------------------------------------'
*/
```
### COLEMAK
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| Tab| Q| W| F| P| G| Play| | Mute| J| L| U| Y| ;| \|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| Esc/Caps| A| R| S| T| D| [| | ]| H| N| E| I| O| '|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| Shift| Z| X| C| V| B| Spc/RAI| | Ent/LOW| K| M| ,| .| /| =|
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| ALT| | CTRL| Spc/NUM| | Ent/FUNC| BckSpace| Del| LOWER|
`---------------------------------------' `---------------------------------------'
*/
```
### LOWER
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| | | | BriUp| Play| Mute| K_CSCN| | | PgUp| Home| Up| End| | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | BriDn| Next| VolUp| | | | PgDn| Left| Down| Right| K_LOCK| |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| M_SHFT| | | | Prev| VolDn| | | | | | | | M_ZOOM| M_PYNV|
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| | | | | | | | M_CODE| |
`---------------------------------------' `---------------------------------------'
*/
```
### RAISE
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| | | MS_1| MS_U| MS_2| WH_U| | | | | | | | | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | MS_L| MS_D| MS_R| WH_D| | | | | | | | | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | | | | | | | | | | | | |
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| | | | | | | | | |
`---------------------------------------' `---------------------------------------'
*/
```
### ADJUST
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| M_MAKE| EEP_RST| | | | | | | | | | | COLEMAK| DVORAK| QWERTY|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| M_VRSN| | | | | | | | | | | | | | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| M_FLSH| | | | | | | | | | | | | | |
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| | | | | | | | | |
`---------------------------------------' `---------------------------------------'
*/
```
### NUMBERS
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| `| 1| 2| 3| 4| 5| | | | 6| 7| 8| 9| 0| -|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| ~| !| @| #| $| %| | | | ^| &| *| (| )| _|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | | | | | | | | | | | | |
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| | | | | | | | | |
`---------------------------------------' `---------------------------------------'
*/
```
### FUNCTIONS
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| F11| F2| F3| F4| F4| F5| | | | F6| F7| F8| F9| F10| F12|
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | | | | | | | | | | | | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | | | | | | | | | | | | |
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| | | | | | | | | |
`---------------------------------------' `---------------------------------------'
*/
```
<!--
### TEMPLATE
```c
/*
,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
| | | | | | | | | | | | | | | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | | | | | | | | | | | | |
|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
| | | | | | | | | | | | | | | |
`---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------'
| | | | | | | | | |
`---------------------------------------' `---------------------------------------'
*/
```
-->

View File

@ -0,0 +1,31 @@
/* Copyright 2018 'Masayuki Sunahara'
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
//#define USE_MATRIX_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define USE_SERIAL_PD2
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 200
#define RETRO_TAPPPING

View File

@ -0,0 +1,135 @@
/* Copyright 2019 @ninjonas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "ninjonas.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.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_wrapper(
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
_____________________QWERTY_L1______________________, KC_MPLY, KC_MUTE, _____________________QWERTY_R1______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________QWERTY_L2______________________, T_LBRC, T_RBRC, _____________________QWERTY_R2______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________QWERTY_L3______________________, LT_RAI, LT_LOW, _____________________QWERTY_R3______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________MOD_LEFT_________, LT_NUM, LT_FUNC, ________MOD_RIGHT________ \
//`---------------------------------------' `---------------------------------------'
),
[_DVORAK] = LAYOUT_wrapper(
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
_____________________DVORAK_L1______________________, KC_MPLY, KC_MUTE, _____________________DVORAK_R1______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________DVORAK_L2______________________, T_LBRC, T_RBRC, _____________________DVORAK_R2______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________DVORAK_L3______________________, LT_RAI, LT_LOW, _____________________DVORAK_R3______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________MOD_LEFT_________, LT_NUM, LT_FUNC, ________MOD_RIGHT________ \
//`---------------------------------------' `---------------------------------------'
),
[_COLEMAK] = LAYOUT_wrapper(
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
_____________________COLEMAK_L1_____________________, KC_MPLY, KC_MUTE, _____________________COLEMAK_R1_____________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________COLEMAK_L2_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R2_____________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________COLEMAK_L3_____________________, LT_RAI, LT_LOW, _____________________COLEMAK_R3_____________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________MOD_LEFT_________, LT_NUM, LT_FUNC, ________MOD_RIGHT________ \
//`---------------------------------------' `---------------------------------------'
),
[_LOWER] = LAYOUT_wrapper( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
XXXXXXX, XXXXXXX, XXXXXXX, _________MEDIA_1_________, K_CSCN, XXXXXXX, _______________NAV_1______________, XXXXXXX, XXXXXXX,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
XXXXXXX, XXXXXXX, XXXXXXX, _________MEDIA_2_________, XXXXXXX, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
M_SHFT, XXXXXXX, XXXXXXX, _________MEDIA_3_________, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, M_ZOOM, M_PYNV,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, _______, _______, M_CODE, _______ \
//`---------------------------------------' `---------------------------------------'
),
[_RAISE] = LAYOUT_wrapper( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________XXXXXXX________________________, _______, _______, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, __________________________________ \
//`---------------------------------------' `---------------------------------------'
),
[_ADJUST] = LAYOUT_wrapper( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
M_VRSN, _____________________XXXXXXX________________________, XXXXXXX, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, __________________________________ \
//`---------------------------------------' `---------------------------------------'
),
[_NUMBERS] = LAYOUT_wrapper( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
_____________________NUM_LEFT_______________________, XXXXXXX, XXXXXXX, _____________________NUM_RIGHT______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________SYM_LEFT_______________________, XXXXXXX, XXXXXXX, _____________________SYM_RIGHT______________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
____________________________________________________, _______, _______, ____________________________________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, __________________________________ \
//`---------------------------------------' `---------------------------------------'
),
[_FUNCTIONS] = LAYOUT_wrapper( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
_____________________FUNC_LEFT______________________, XXXXXXX, XXXXXXX, _____________________FUNC_RIGHT_____________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________XXXXXXX________________________, XXXXXXX, XXXXXXX, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_____________________XXXXXXX________________________, _______, _______, _____________________XXXXXXX________________________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
__________________________________, __________________________________ \
//`---------------------------------------' `---------------------------------------'
),
/*
[_TEMPLATE] = LAYOUT( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
_______, _______, _______, _______, _______, _______, _______, _______ \
//`---------------------------------------' `---------------------------------------'
)
*/
};

1
users/ninjonas/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
secrets.c

85
users/ninjonas/README.md Normal file
View File

@ -0,0 +1,85 @@
# QMK User Configuration for [ninjonas](https://github.com/ninjonas/qmk-yonas)
Tired of copying and pasting the same macros and tap dances for all my keymaps. Utilizing user keymaps functionality.
See: https://docs.qmk.fm/#/feature_userspace
## [ninjonas.c](ninjonas.c)
- ninjonas [QMK user configuration](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_userspace.md)
- On `keymap.c` include `ninjonas.h`
```c
#include "ninjonas.h"
```
## Features
### [Keys](ninjonas.h#L44)
|Code | Description |
|---|---|
|K_LOCK | MacOS shortcut to execute lock command  + ctrl + Q |
|K_CSCN | MacOS shortcut to copy a portion of the screen to the clipboard |
### [Layers](ninjonas.h#L48)
|Code | Description |
|---|---|
|LT_LOW | Tap for ENTER, hold for RAISE |
|LT_FUNC | Tap for ENTER, hold for FUNCTIONS |
|LT_RAI | Tap for SPACE, hold for LOWER |
|LT_NUM | Tap for SPACE, hold for NUMBERS |
|LT_LOW + LT_RAI | Hold for ADJUST |
|L_LOWER | Dedicated key to momentarily toggle to use LOWER layer |
### [Layout Blocks](ninjonas.h#L57)
Predefined keyboard layout templates to speed up configuring split keyboards
|Code | Description |
|---|---|
|QWERTY | Qwerty Layout |
|DVORAK | Dvorak Layout |
|COLEMAK | Colemak Layout |
|NUM | Number Rows |
|FUNC | Function Rows |
|SYM | Symbol Rows \(When holding shift on numbers\) |
|NAV | Navigation Cluster |
|MOUSE | Mouse Cluster |
|MEDIA | Media Cluster |
|MOD | Modifier Cluster |
### [Macros](process_records.c)
|Code | Description |
|---|---|
|M_PYNV | macro to activate pyenv with the name `jira` |
|M_MAKE | macro to send QMK make command to compile keyboard |
|M_FLSH | macro to send QMK make command to compile keyboard with the correct bootloader |
|M_VRSN | macro to send QMK version |
|M_SHFT | Sends  + alt + shift to a keycode to activate [ShiftIt](https://github.com/fikovnik/ShiftIt) |
|M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory |
### [Tap-Dance](tap_dances.h)
|Code | Description |
|---|---|
|T_ESC | Tap once for ESC, double tap for CAPS_LOCK |
|T_LBRC | Tap once for [, double for back browser |
|T_RBRC | Tap once for ], double for forward browser |
|T_TAB | Tap once for TAB, double for CTRL + TAB |
|T_GRV | Tap once for GRV, double for  + GRV |
|T_GUI | Tap once for , double to open spotlight |
|T_W | Tap for W, double tap for  + W |
|T_Q | Tap for Q, double tap for  + Q |
### Secrets
There's times where you have macros you don't want to share like emails, passwords 😱, & and private strings. Based off [drashna's secret macros](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md), it's now possible to do this. All you need to do is create a `secrets.c` file. Below is an example of how this is used.
```c
// secrets.c
#include "ninjonas.h"
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// Sends zoom URL
case M_ZOOM:
if (record->event.pressed) {
SEND_STRING("SECRET_STRING_HERE" SS_TAP(X_ENTER));
}
break;
}
return true;
}
```

14
users/ninjonas/config.h Normal file
View File

@ -0,0 +1,14 @@
#ifdef TAPPING_TERM
#undef TAPPING_TERM
#define TAPPING_TERM 200
#endif
// Mouse Settings: Smoothing out mouse movement on keypress
#ifndef MOUSEKEY_INTERVAL
#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 16
#endif
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0

68
users/ninjonas/ninjonas.c Normal file
View File

@ -0,0 +1,68 @@
/* Copyright 2019 @ninjonas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ninjonas.h"
layer_state_t layer_state_set_user (layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
// BEGIN: SSD1306OLED
// SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
#if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA)
extern uint8_t is_master;
void matrix_init_user(void) {
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
iota_gfx_init(!has_usb()); // turns on the display
}
// When add source files to SRC in rules.mk, you can use functions.
const char *read_layer_state(void);
const char *read_logo(void);
//void set_keylog(uint16_t keycode, keyrecord_t *record); // Moved to process_records.h
const char *read_keylog(void);
const char *read_keylogs(void);
void matrix_scan_user(void) {
iota_gfx_task();
}
void matrix_render_user(struct CharacterMatrix *matrix) {
if (is_master) {
// If you want to change the display of OLED, you need to change here
matrix_write_ln(matrix, read_layer_state());
matrix_write_ln(matrix, read_keylog());
matrix_write_ln(matrix, read_keylogs());
} else {
matrix_write(matrix, read_logo());
}
}
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
memcpy(dest->display, source->display, sizeof(dest->display));
dest->dirty = true;
}
}
void iota_gfx_task_user(void) {
struct CharacterMatrix matrix;
matrix_clear(&matrix);
matrix_render_user(&matrix);
matrix_update(&display, &matrix);
}
#endif
// END: SSD1306OLED

112
users/ninjonas/ninjonas.h Normal file
View File

@ -0,0 +1,112 @@
/* Copyright 2019 @ninjonas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#include "version.h"
#include "eeprom.h"
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
#include "tap_dances.h"
#endif
#if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA)
#include "lufa.h"
#include "split_util.h"
#endif
#ifdef SSD1306OLED
#include "ssd1306.h"
#endif
#define _QWERTY 0
#define _DVORAK 1
#define _COLEMAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 5
#ifdef KEYBOARD_pinky_3
#define _NUMBERS 6
#define _FUNCTIONS 7
#endif
// Shortcut Keys
#define K_LOCK LGUI(LCTL(KC_Q)) // Locks screen on MacOS
#define K_CSCN LGUI(LCTL(LSFT(KC_4))) // Copy a portion of the screen to the clipboard
// Layer Keys
#define L_LOWER MO(_LOWER)
#define LT_LOW LT(_LOWER, KC_ENT)
#define LT_RAI LT(_RAISE, KC_SPC)
#ifdef KEYBOARD_pinky_3
#define LT_NUM LT(_NUMBERS, KC_SPC)
#define LT_FUNC LT(_FUNCTIONS, KC_ENT)
#endif
// Layout blocks
#define _____________________QWERTY_L1______________________ T_TAB, T_Q, T_W, KC_E, KC_R, KC_T
#define _____________________QWERTY_L2______________________ T_ESC, KC_A, KC_S, KC_D, KC_F, KC_G
#define _____________________QWERTY_L3______________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B
#define _____________________QWERTY_R1______________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
#define _____________________QWERTY_R2______________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL
#define _____________________DVORAK_L1______________________ T_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
#define _____________________DVORAK_L2______________________ T_ESC, KC_A, KC_O, KC_E, KC_U, KC_I
#define _____________________DVORAK_L3______________________ KC_LSFT, KC_SCLN, T_Q, KC_J, KC_K, KC_X
#define _____________________DVORAK_R1______________________ KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS
#define _____________________DVORAK_R2______________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH
#define _____________________DVORAK_R3______________________ KC_B, KC_M, T_W, KC_V, KC_Z, KC_EQL
#define _____________________COLEMAK_L1_____________________ T_TAB, T_Q, T_W, KC_F, KC_P, KC_G
#define _____________________COLEMAK_L2_____________________ T_ESC, KC_A, KC_R, KC_S, KC_T, KC_D
#define _____________________COLEMAK_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B
#define _____________________COLEMAK_R1_____________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS
#define _____________________COLEMAK_R2_____________________ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT
#define _____________________COLEMAK_R3_____________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL
#define _____________________NUM_LEFT_______________________ T_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
#define _____________________NUM_RIGHT______________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS
#define _____________________FUNC_LEFT______________________ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define _____________________FUNC_RIGHT_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12
#define _____________________SYM_LEFT_______________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
#define _____________________SYM_RIGHT______________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS
#define ____________________________________________________ _______, _______, _______, _______, _______, _______
#define _____________________XXXXXXX________________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define _______________NAV_1______________ KC_PGUP, KC_HOME, KC_UP, KC_END
#define _______________NAV_2______________ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT
#define _____________MOUSE_1______________ KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_D
#define _____________MOUSE_2______________ KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U
#define __________________________________ _______, _______, _______, _______
#define _____________XXXXXXX______________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define _________MEDIA_1_________ KC_BRIU, KC_MPLY, KC_MUTE
#define _________MEDIA_2_________ KC_BRID, KC_MFFD, KC__VOLUP
#define _________MEDIA_3_________ XXXXXXX, KC_MRWD, KC__VOLDOWN
#define ________MOD_LEFT_________ KC_LALT, T_GUI, KC_LCTL
#define ________MOD_RIGHT________ KC_BSPC, KC_DEL, L_LOWER
// Layout wrappers
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)

View File

@ -0,0 +1,98 @@
#include "ninjonas.h"
__attribute__((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
__attribute__((weak))
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
#ifdef SSD1306OLED
set_keylog(keycode, record);
#endif
}
switch (keycode) {
// Sends pyenv to activate 'jira' environment
case M_PYNV:
if (record->event.pressed) {
SEND_STRING("pyenv activate jira" SS_TAP(X_ENTER));
}
break;
// Sends  + alt + shift to a keycode to activate shiftit. See: https://github.com/fikovnik/ShiftIt
case M_SHFT:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_LALT);
register_code(KC_LCTL);
} else {
unregister_code(KC_LGUI);
unregister_code(KC_LALT);
unregister_code(KC_LCTL);
}
break;
// Sends QMK make command to compile keyboard
case M_MAKE:
if (record->event.pressed) {
SEND_STRING("rm -f *.hex && rm -rf .build/ && make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER));
}
break;
// Sends QMK make command with the correct bootloader
case M_FLSH:
if (!record->event.pressed) {
SEND_STRING("rm -f *.hex && rm -rf .build/ && make " QMK_KEYBOARD ":" QMK_KEYMAP
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
":dfu "
#elif defined(BOOTLOADER_CATERINA)
":avrdude "
#endif
SS_TAP(X_ENTER)
);
// Send reset_keyboard command instead of pressing reset button
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
reset_keyboard();
#endif
}
break;
// Sends QMK version
case M_VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
}
break;
// Opens Visual Studio Code on current directory
case M_CODE:
if (record->event.pressed) {
SEND_STRING("code ." SS_TAP(X_ENTER));
}
break;
// BEGIN: Layer macros
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
break;
// END: Layer macros
}
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record);
}

View File

@ -0,0 +1,24 @@
#pragma once
#include "ninjonas.h"
enum custom_keycodes {
// Layer Macros
QWERTY = SAFE_RANGE,
DVORAK,
COLEMAK,
// Custom Macros
M_ZOOM,
M_PYNV,
M_SHFT,
M_MAKE,
M_FLSH,
M_VRSN,
M_CODE,
};
#ifdef SSD1306OLED
void set_keylog(uint16_t keycode, keyrecord_t *record);
#endif
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);

18
users/ninjonas/rules.mk Normal file
View File

@ -0,0 +1,18 @@
BOOTMAGIC_ENABLE = no # Disable Boot Magic (https://beta.docs.qmk.fm/features/feature_bootmagic)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
TAP_DANCE_ENABLE = yes # Enable Tap Dance.
Link_Time_Optimization = no # if firmware size over limit, try this option
ifeq ($(strip $(Link_Time_Optimization)),yes)
EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
endif
SRC += ninjonas.c \
process_records.c \
tap_dances.c
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
SRC += secrets.c
endif

View File

@ -0,0 +1,12 @@
#include "ninjonas.h"
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
[TD_LBRC_BACK] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, LGUI(KC_LBRC)),
[TD_RBRC_FWD] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, LGUI(KC_RBRC)),
[TD_TAB_CTRLTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LCTL(KC_TAB)),
[TD_GRV_CTRLGRV] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, LGUI(KC_GRV)),
[TD_GUI_GUISPC] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, LGUI(KC_SPC)),
[TD_W_CTRLW] = ACTION_TAP_DANCE_DOUBLE(KC_W, LGUI(KC_W)),
[TD_Q_GUIQ] = ACTION_TAP_DANCE_DOUBLE(KC_Q, LGUI(KC_Q)),
};

View File

@ -0,0 +1,22 @@
#pragma once
#include "ninjonas.h"
enum custom_tapdances{
TD_ESC_CAPS = 0,
TD_LBRC_BACK,
TD_RBRC_FWD,
TD_TAB_CTRLTAB,
TD_GRV_CTRLGRV,
TD_GUI_GUISPC,
TD_W_CTRLW,
TD_Q_GUIQ,
};
#define T_ESC TD(TD_ESC_CAPS) // Tap for ESC, double tap for CAPSLOCK
#define T_LBRC TD(TD_LBRC_BACK) // Tap for [, double tap for back browser
#define T_RBRC TD(TD_RBRC_FWD) // Tap for ], double tap for forward browser
#define T_TAB TD(TD_TAB_CTRLTAB) // Tap for TAB, double tap for CTRL + TAB
#define T_GRV TD(TD_GRV_CTRLGRV) // Tap for GRV, double tap for  + GRV
#define T_GUI TD(TD_GUI_GUISPC) // Tap for , double tap for  + Space
#define T_W TD(TD_W_CTRLW) // Tap for W, double tap for  + W
#define T_Q TD(TD_Q_GUIQ) // Tap for Q, double tap for  + Q