qmk_firmware/users/ninjonas/README.md

102 lines
3.6 KiB
Markdown
Raw Normal View History

# 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
[Keymap] ninjonas keymap for crkbd & ninjonas userspace updates (#6797) * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [refactor(crkbd)] reducing file size by selecting RGB animations * [refactor(crkbd)] added shiftit key * [refactor(crkbd)] added shiftit key * [chore(crkbd)] adding SLEEP_LED_ENABLE on rules.mk * [refactor(crkbd)] added keylog & removed static rainbow RGB * [feat(crkbd)] introduced em-dash '—' keymap * [feat(crkbd)] added screenshot functionality * [refactor(lily58,pinky3)] moving media keys * [refactor(lily58)] Added emdash key * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore(crkbd,lily48)] Updating README.md * [feat] added K_LAPP & K_RAPP to mimic command + tab * [feat] added K_LAPP & K_RAPP to mimic command + tab * [fix(#6797)] resolving changes requested by @drashna * [fix(#6797)] first cut on using QMK OLED Driver * [fix(#6797)] cleaning up rules.mk * [fix(#6797)] making scrolling logo work * [fix(#6797)] Using OLED Driver for Lily58 * [fix(#6797)] Moved OLED driver implementation to ninjonas userspace * [fix(#6797)] Bringing back crkbd & lily58 logos * [fix(#6797)] Turning off OLED based off @drashna's workaround in #5982 * [fix(#6797)] whoops! forgot to checkin crkbd/config.h * [fix(#6797)] fixing issue with OLED randomly turning on * [fix(#6797)] using default glcdfont.c for lily58 & crkbd * [fix(#6797)] Using LINK_TIME_OPTIMIZATION_ENABLE rather than EXTRAFLAGS as per code review * [fix(#6797)] updating M_MALL macro as per code review by @fauxpark
2019-09-26 06:28:06 +02:00
#include "ninjonas.h"
```
[Keymap] ninjonas keymap for crkbd & ninjonas userspace updates (#6797) * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [refactor(crkbd)] reducing file size by selecting RGB animations * [refactor(crkbd)] added shiftit key * [refactor(crkbd)] added shiftit key * [chore(crkbd)] adding SLEEP_LED_ENABLE on rules.mk * [refactor(crkbd)] added keylog & removed static rainbow RGB * [feat(crkbd)] introduced em-dash '—' keymap * [feat(crkbd)] added screenshot functionality * [refactor(lily58,pinky3)] moving media keys * [refactor(lily58)] Added emdash key * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore(crkbd,lily48)] Updating README.md * [feat] added K_LAPP & K_RAPP to mimic command + tab * [feat] added K_LAPP & K_RAPP to mimic command + tab * [fix(#6797)] resolving changes requested by @drashna * [fix(#6797)] first cut on using QMK OLED Driver * [fix(#6797)] cleaning up rules.mk * [fix(#6797)] making scrolling logo work * [fix(#6797)] Using OLED Driver for Lily58 * [fix(#6797)] Moved OLED driver implementation to ninjonas userspace * [fix(#6797)] Bringing back crkbd & lily58 logos * [fix(#6797)] Turning off OLED based off @drashna's workaround in #5982 * [fix(#6797)] whoops! forgot to checkin crkbd/config.h * [fix(#6797)] fixing issue with OLED randomly turning on * [fix(#6797)] using default glcdfont.c for lily58 & crkbd * [fix(#6797)] Using LINK_TIME_OPTIMIZATION_ENABLE rather than EXTRAFLAGS as per code review * [fix(#6797)] updating M_MALL macro as per code review by @fauxpark
2019-09-26 06:28:06 +02:00
## Supported Keyboards
- [Crkbd ](../../keyboards/crkbd/keymaps/ninjonas)
- [Hotdox](../../keyboards/hotdox/keymaps/ninjonas)
- [Pinky3](../../keyboards/pinky/3/keymaps/ninjonas)
- [Lily58](../../keyboards/lily58/keymaps/ninjonas)
## Features
### [Keys](ninjonas.h#L37)
|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 |
[Keymap] ninjonas keymap for crkbd & ninjonas userspace updates (#6797) * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [refactor(crkbd)] reducing file size by selecting RGB animations * [refactor(crkbd)] added shiftit key * [refactor(crkbd)] added shiftit key * [chore(crkbd)] adding SLEEP_LED_ENABLE on rules.mk * [refactor(crkbd)] added keylog & removed static rainbow RGB * [feat(crkbd)] introduced em-dash '—' keymap * [feat(crkbd)] added screenshot functionality * [refactor(lily58,pinky3)] moving media keys * [refactor(lily58)] Added emdash key * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore(crkbd,lily48)] Updating README.md * [feat] added K_LAPP & K_RAPP to mimic command + tab * [feat] added K_LAPP & K_RAPP to mimic command + tab * [fix(#6797)] resolving changes requested by @drashna * [fix(#6797)] first cut on using QMK OLED Driver * [fix(#6797)] cleaning up rules.mk * [fix(#6797)] making scrolling logo work * [fix(#6797)] Using OLED Driver for Lily58 * [fix(#6797)] Moved OLED driver implementation to ninjonas userspace * [fix(#6797)] Bringing back crkbd & lily58 logos * [fix(#6797)] Turning off OLED based off @drashna's workaround in #5982 * [fix(#6797)] whoops! forgot to checkin crkbd/config.h * [fix(#6797)] fixing issue with OLED randomly turning on * [fix(#6797)] using default glcdfont.c for lily58 & crkbd * [fix(#6797)] Using LINK_TIME_OPTIMIZATION_ENABLE rather than EXTRAFLAGS as per code review * [fix(#6797)] updating M_MALL macro as per code review by @fauxpark
2019-09-26 06:28:06 +02: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 |
### [Layers](ninjonas.h#L44)
|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 |
[Keymap] ninjonas keymap for crkbd & ninjonas userspace updates (#6797) * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [keymap(crkbd)] introducing crkbd keymap on ninjonas profile * [refactor(crkbd)] reducing file size by selecting RGB animations * [refactor(crkbd)] added shiftit key * [refactor(crkbd)] added shiftit key * [chore(crkbd)] adding SLEEP_LED_ENABLE on rules.mk * [refactor(crkbd)] added keylog & removed static rainbow RGB * [feat(crkbd)] introduced em-dash '—' keymap * [feat(crkbd)] added screenshot functionality * [refactor(lily58,pinky3)] moving media keys * [refactor(lily58)] Added emdash key * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore] removing NUMBERS & FUNCTIONS layers as they're useless * [chore(crkbd,lily48)] Updating README.md * [feat] added K_LAPP & K_RAPP to mimic command + tab * [feat] added K_LAPP & K_RAPP to mimic command + tab * [fix(#6797)] resolving changes requested by @drashna * [fix(#6797)] first cut on using QMK OLED Driver * [fix(#6797)] cleaning up rules.mk * [fix(#6797)] making scrolling logo work * [fix(#6797)] Using OLED Driver for Lily58 * [fix(#6797)] Moved OLED driver implementation to ninjonas userspace * [fix(#6797)] Bringing back crkbd & lily58 logos * [fix(#6797)] Turning off OLED based off @drashna's workaround in #5982 * [fix(#6797)] whoops! forgot to checkin crkbd/config.h * [fix(#6797)] fixing issue with OLED randomly turning on * [fix(#6797)] using default glcdfont.c for lily58 & crkbd * [fix(#6797)] Using LINK_TIME_OPTIMIZATION_ENABLE rather than EXTRAFLAGS as per code review * [fix(#6797)] updating M_MALL macro as per code review by @fauxpark
2019-09-26 06:28:06 +02:00
|LM_LOW | Dedicated key to momentarily toggle to use LOWER layer |
|LM_RAI | Dedicated key to momentarily toggle to use RAISE layer |
### [Layout Blocks](ninjonas.h#L50)
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 |
|M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets](#secrets) |
### [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, 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.
```c
// secrets.c
#include "ninjonas.h"
static const char * const secret[] = {
"BLANK1",
"BLANK2",
"BLANK3",
"BLANK4",
"BLANK5"
};
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case M_XXX1...M_XXX5:
if (record->event.pressed) {
send_string(secret[keycode - M_XXX1]);
}
break;
}
return true;
}
```