Skip to content

Commit

Permalink
[Keymap] ninjonas keymap for crkbd & ninjonas userspace updates (qmk#…
Browse files Browse the repository at this point in the history
…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(qmk#6797)] resolving changes requested by @drashna

* [fix(qmk#6797)] first cut on using QMK OLED Driver

* [fix(qmk#6797)] cleaning up rules.mk

* [fix(qmk#6797)] making scrolling logo work

* [fix(qmk#6797)] Using OLED Driver for Lily58

* [fix(qmk#6797)] Moved OLED driver implementation to ninjonas userspace

* [fix(qmk#6797)] Bringing back crkbd & lily58 logos

* [fix(qmk#6797)] Turning off OLED based off @drashna's workaround in qmk#5982

* [fix(qmk#6797)] whoops! forgot to checkin crkbd/config.h

* [fix(qmk#6797)] fixing issue with OLED randomly turning on

* [fix(qmk#6797)] using default glcdfont.c for lily58 & crkbd

* [fix(qmk#6797)] Using LINK_TIME_OPTIMIZATION_ENABLE rather than EXTRAFLAGS as per code review

* [fix(qmk#6797)] updating M_MALL macro as per code review by @fauxpark
  • Loading branch information
ninjonas authored and drashna committed Sep 26, 2019
1 parent 7b6cf65 commit 8f2ee92
Show file tree
Hide file tree
Showing 21 changed files with 460 additions and 230 deletions.
99 changes: 99 additions & 0 deletions keyboards/crkbd/keymaps/ninjonas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# ninjonas Keymap for [Corne Keyboard (crkbd)](https://github.com/foostan/crkbd)

## 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 crkbd keyboard can be found [here](https://thomasbaart.nl/2018/11/26/corne-keyboard-helidox-build-log/)

### QWERTY
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// 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, ,, ., /, =
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , Ctrl, Space, Enter, BackSP, Del
//`---------------------' `---------------------'
```

### DVORAK
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// 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, =
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , Ctrl, Space, Enter, BackSP, Del
//`---------------------' `---------------------'
```

### COLEMAK
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// 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, ,, ., /, =
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , Ctrl, Space, Enter, BackSP, Del
//`---------------------' `---------------------'
```

### LOWER
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// , , KC_BRIU, Play, Mute, K_CSCN, PgUp, Home, Up, End, , K_MDSH
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , KC_BRID, Next, VolUp, , PgDn, Left, Down, Right, K_LOCK,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , Prev, VolDn, [, ], , , M_CODE, M_ZOOM, M_PYNV,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , ,
//`---------------------' `---------------------'
```

### RAISE
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// `, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// ~, !, @, #, $, %, ^, &, *, (, ), _
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , ,
//`---------------------' `---------------------'
```

### ADJUST
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// M_MAKE, EEP_RST, , , , , RGB_TOG, , , COLEMAK, DVORAK, QWERTY,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// M_VRSN, M_MALL, , RGB_SAI, RGB_HUI, RGB_VAI, , , , , , ,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// M_FLSH, , , RGB_SAD, RGB_HUD, RGB_VAD, RGB_M_P, RGB_M_B,RGB_M_SW, , , ,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , ,
//`---------------------' `---------------------'
```

<!--
### TEMPLATE
```c
//,----------------------------------------------------. ,----------------------------------------------------.
// , , , , , , , , , , ,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , , , , , , , ,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , , , , , , , ,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , ,
//`---------------------' `---------------------'
```
-->
48 changes: 48 additions & 0 deletions keyboards/crkbd/keymaps/ninjonas/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
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

//#define USE_MATRIX_I2C

/* Select hand configuration */

#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS

#define USE_SERIAL_PD2

#define TAPPING_FORCE_HOLD

#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
#undef RGBLIGHT_ANIMATIONS // https://docs.qmk.fm/#/feature_rgblight?id=effect-and-animation-toggles
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#endif

#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
#define OLED_DISABLE_TIMEOUT
89 changes: 89 additions & 0 deletions keyboards/crkbd/keymaps/ninjonas/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#include QMK_KEYBOARD_H
#include "ninjonas.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_wrapper(
//,----------------------------------------------------. ,----------------------------------------------------.
_____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________QWERTY_L3______________________, _____________________QWERTY_R3______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL
//`---------------------' `---------------------'
),

[_DVORAK] = LAYOUT_wrapper(
//,----------------------------------------------------. ,----------------------------------------------------.
_____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________DVORAK_L3______________________, _____________________DVORAK_R3______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL
//`---------------------' `---------------------'
),

[_COLEMAK] = LAYOUT_wrapper(
//,----------------------------------------------------. ,----------------------------------------------------.
_____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________COLEMAK_L3_____________________, _____________________COLEMAK_R3_____________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
T_GUI, KC_LCTL,LT_RAI, LT_LOW,KC_BSPC,KC_DEL
//`---------------------' `---------------------'
),

[_LOWER] = LAYOUT_wrapper(
//,----------------------------------------------------. ,----------------------------------------------------.
XXXXXXX, XXXXXXX, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
XXXXXXX, XXXXXXX, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, _______, XXXXXXX, M_CODE, M_ZOOM, M_PYNV,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
),

[_RAISE] = LAYOUT_wrapper( \
//,----------------------------------------------------. ,----------------------------------------------------.
_____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________SYM_LEFT_______________________, _____________________SYM_RIGHT______________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
),

[_ADJUST] = LAYOUT_wrapper( \
//,----------------------------------------------------. ,----------------------------------------------------.
M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
M_VRSN, M_MALL, XXXXXXX, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
M_FLSH, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_VAD, RGB_M_P, RGB_M_B,RGB_M_SW, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
),
/*
[_TEMPLATE] = LAYOUT_wrapper( \
//,----------------------------------------------------. ,----------------------------------------------------.
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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
),
*/
};
27 changes: 27 additions & 0 deletions keyboards/crkbd/keymaps/ninjonas/rgb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include QMK_KEYBOARD_H

extern keymap_config_t keymap_config;

#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif

extern uint8_t is_master;

int RGB_current_mode;

// Setting ADJUST layer RGB back to default
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
layer_on(layer3);
} else {
layer_off(layer3);
}
}

void keyboard_post_init_user(void) {
#ifdef RGBLIGHT_ENABLE
RGB_current_mode = rgblight_config.mode;
#endif
}
11 changes: 11 additions & 0 deletions keyboards/crkbd/keymaps/ninjonas/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
RGBLIGHT_ENABLE = yes
MOUSEKEY_ENABLE = no
OLED_DRIVER_ENABLE = yes
LINK_TIME_OPTIMIZATION_ENABLE = yes

# 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 you want to change the display of OLED, you need to change here
SRC += ./lib/rgb_state_reader.c \
rgb.c
2 changes: 1 addition & 1 deletion keyboards/hotdox/keymaps/ninjonas/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//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_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// LEFT THUMB
Expand Down
6 changes: 3 additions & 3 deletions keyboards/lily58/keymaps/ninjonas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ More information about the Lily58 pro keyboard can be found [here](https://yuchi
* ,------------------------------------------. ,------------------------------------------.
* | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 |
* |------+------+------+-------+------+------| |------+------+------+------+-------+------|
* | | | |KC_BRIU| Play | Mute | | PgUp | Home | Up | End | | |
* | | |KC_BRIU| Play | Mute | | | PgUp | Home | Up | End | |K_MDSH|
* |------+------+------+-------+------+------| |------+------+------+------+-------+------|
* | | | |KC_BRID| Next |VolUp |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | |
* | | |KC_BRID| Next |VolUp | |-------. ,-------| PgDn | Left | Down |Right |K_LOCK | |
* |------+------+------+-------+------+------| | | |------+------+------+------+-------+------|
* | |M_SHFT| | | Prev |VolDn |-------| |-------| | | | |M_ZOOM |M_PYNV|
* |M_SHFT| | | Prev |VolDn | |-------| |-------| | | | |M_ZOOM |M_PYNV|
* `------------------------------------------/ / \ \------------------------------------------'
* | | | | / / \ \ | |M_CODE| |
* | | | |/ / \ \ | | | |
Expand Down
6 changes: 4 additions & 2 deletions keyboards/lily58/keymaps/ninjonas/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
// #define EE_HANDS

#define SSD1306OLED
#define USE_SERIAL_PD2
#define TAPPING_FORCE_HOLD
#define TAPPING_FORCE_HOLD

#define OLED_FONT_H "keyboards/lily58/lib/glcdfont.c"
#define OLED_DISABLE_TIMEOUT
Loading

0 comments on commit 8f2ee92

Please sign in to comment.