2019-09-02 20:40:01 +06:00
# 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
2019-09-26 10:28:06 +06:00
#include "ninjonas.h"
2019-09-02 20:40:01 +06:00
```
2019-09-26 10:28:06 +06:00
## Supported Keyboards
- [Crkbd ](../../keyboards/crkbd/keymaps/ninjonas )
- [Hotdox ](../../keyboards/hotdox/keymaps/ninjonas )
- [Pinky3 ](../../keyboards/pinky/3/keymaps/ninjonas )
- [Lily58 ](../../keyboards/lily58/keymaps/ninjonas )
2020-02-01 12:38:05 +06:00
- [Kyria ](../../keyboards/kyria/keymaps/ninjonas )
2019-09-26 10:28:06 +06:00
2019-09-02 20:40:01 +06:00
## Features
2020-02-17 15:30:03 +06:00
### [Keys](ninjonas.h)
2019-09-02 20:40:01 +06:00
|Code | Description |
|---|---|
2020-02-17 15:30:03 +06:00
|K_LOCK | MacOS shortcut to execute lock command Cmd + CTRL + Q |
2019-09-02 20:40:01 +06:00
|K_CSCN | MacOS shortcut to copy a portion of the screen to the clipboard |
2019-09-26 10:28:06 +06:00
|K_MDSH | MacOS shortcut to get em-dash `– ` |
|K_RAPP | MacOS shortcut to switch apps to the right |
|K_LAPP | MacOS shortcut to switch apps to the left |
2020-02-17 15:30:03 +06:00
|K_CPRF | Cmd + Shift + M. Used for switching Google Chrome profiles |
2019-09-02 20:40:01 +06:00
2020-02-17 15:30:03 +06:00
### [Layers](ninjonas.h)
2019-09-02 20:40:01 +06:00
|Code | Description |
|---|---|
|LT_LOW | Tap for ENTER, hold for RAISE |
|LT_RAI | Tap for SPACE, hold for LOWER |
|LT_LOW + LT_RAI | Hold for ADJUST |
2019-09-26 10:28:06 +06:00
|LM_LOW | Dedicated key to momentarily toggle to use LOWER layer |
|LM_RAI | Dedicated key to momentarily toggle to use RAISE layer |
2020-02-01 12:38:05 +06:00
|LG_LOW | Press to toggle LOWER layer |
|LG_RAI | Press to toggle RAISE layer |
2019-09-02 20:40:01 +06:00
2020-02-17 15:30:03 +06:00
### [Mod-Taps](ninjonas.h)
2019-10-07 23:42:03 +06:00
|Code | Description |
|---|---|
2020-02-17 15:30:03 +06:00
|MT_DEL | Tap for Delete, hold for Cmd + ALT + SHIFT |
2019-10-07 23:42:03 +06:00
|MT_EQL | Tap for =, hold for ALT + SHIFT |
2020-02-17 15:30:03 +06:00
### [Layout Blocks](ninjonas.h)
2019-09-02 20:40:01 +06:00
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 |
2020-02-17 15:30:03 +06:00
|NUMPAD | Numpad Cluster |
2019-09-02 20:40:01 +06:00
### [Macros](process_records.c)
|Code | Description |
|---|---|
2020-02-01 12:38:05 +06:00
|M_PYNV | Macro to activate pyenv with the name `jira` |
|M_MAKE | Macro to send QMK make command to compile keyboard |
|M_MALL | Macro to send QMK make command to all [ninjonas ](#Supported%20Keyboards ) keyboards |
|M_FLSH | Macro to send QMK make command to compile keyboard with the correct bootloader |
|M_VRSN | Macro to send QMK version |
2020-02-17 15:30:03 +06:00
|M_SHFT | Sends Cmd + alt + shift to a keycode to activate [ShiftIt ](https://github.com/fikovnik/ShiftIt ) |
2019-09-02 20:40:01 +06:00
|M_CODE | Opens [Visual Studio Code ](https://code.visualstudio.com/ ) on current directory |
2019-10-07 23:42:03 +06:00
|M_TERM | Launches Spotlight and calls Terminal |
2020-02-01 12:38:05 +06:00
|M_COPA | Single key copy/paste |
2019-09-30 23:50:27 +06:00
|M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets ](#secrets ) |
2019-09-02 20:40:01 +06:00
### [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 |
2020-02-17 15:30:03 +06:00
|T_GRV | Tap once for GRV, double for Cmd + GRV |
|T_GUI | Tap once for Cmd, double to open spotlight |
|T_W | Tap for W, double tap for Cmd + W |
|T_Q | Tap for Q, double tap for Cmd + Q |
|T_CPNU | Tap for Cmd + V, hold for Cmd + C, double tap for NUMPAD layer |
|T_Y | Tap for Y, double tap for NUMPAD layer |
2019-09-02 20:40:01 +06:00
### Secrets
2019-09-30 23:50:27 +06:00
There's times where you have macros you don't want to share like emails, an address you need but you always forget, 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.
2019-09-02 20:40:01 +06:00
```c
// secrets.c
2019-10-07 23:42:03 +06:00
#include "ninjonas.h"
2019-09-30 23:50:27 +06:00
static const char * const secret[] = {
"BLANK1",
"BLANK2",
"BLANK3",
"BLANK4",
"BLANK5"
};
2019-09-02 20:40:01 +06:00
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
2019-09-30 23:50:27 +06:00
case M_XXX1...M_XXX5:
2019-09-02 20:40:01 +06:00
if (record->event.pressed) {
2019-09-30 23:50:27 +06:00
send_string(secret[keycode - M_XXX1]);
2019-09-02 20:40:01 +06:00
}
break;
}
return true;
}
2019-09-30 23:50:27 +06:00
2019-09-02 20:40:01 +06:00
```