forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from crembz/corne
harvester keymap
- Loading branch information
Showing
8 changed files
with
594 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# KidBrazil's custom CRKBD Layout | ||
|
||
![Loose Transistor Crkbd](https://user-images.githubusercontent.com/4823043/71268460-0862c000-231b-11ea-8f32-2fe8da4d348a.jpg) | ||
|
||
This is a simple layout that I use for both programming and gaming. It is very | ||
closely based on the original CRKBD layout with some modifications to the | ||
position of CTRL and SHIFT. | ||
|
||
## Layers | ||
This keymap includes a total of 4 Layers: | ||
- QWERTY | ||
- NUMBERS | ||
- SYMBOLS | ||
- GAMING | ||
- WEAPONS | ||
|
||
The first three layers are pretty self explanatory and follow closely the | ||
default keymap for this keyboard. The magic really starts to happen with the | ||
gaming layer. | ||
|
||
### Gaming Layer | ||
The gaming layer can be toggled on/off from the SYMBOLS layer. Once on the | ||
gaming layer it will stay there until you toggle it off again. The gaming layer | ||
includes normal WASD and most of the keys FPS games use on the left hand. On the | ||
right hand we have F1-F12 and a few other special keys for games that require | ||
it. | ||
|
||
### Weapon | ||
The weapon layer is a momentary layer that can only be reached from the gaming | ||
layer. This layer preserves the left hand almost unchanged, except for when the | ||
layer is activated the top row becomes NUM 1 - 6 for wepon selection. The right | ||
hand is KC_TRNS the whole way so basically it is still the gaming layer. | ||
|
||
## Custom Font | ||
This keymap includes a custom font for my LooseTransistor logo. It is fine if | ||
you want to use it I certainly don't mind but if you want your own, just replace | ||
the glcdfont file here and you should be fine. | ||
|
||
Alternatively you could remove the font config line from the config.h file so it | ||
will use the default QMK one. | ||
|
||
## OLED | ||
This Keymap is setup to use the newer OLED API. Some work has been done to | ||
customize this with showing layer and USB information. I also tried my best to | ||
get a dormant / sleep state going but it is hit or miss and often only works on | ||
the master hand. | ||
|
||
## OLED & RGB Matrix timeout | ||
This keymap will set a automated timeout system for the OLED screen and the RGB | ||
matrix. After 3 minutes or so the LED screen will display the logo on both | ||
halves and 5 minutes after that both the LED and the Matrix will be switched | ||
off. | ||
|
||
Once a user hits the keys again, the LED matrix will turn back on unless the | ||
user has disabled it via RGB_TOG. | ||
|
||
## Flashing | ||
To flash this on your CRKBD simply use the `make crkbd:kidbrazil:flash` | ||
command. | ||
|
||
### TODO | ||
- Wait for Spit_common to be implemented in CRKBD and revisit the special color | ||
layers and animations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/* | ||
Copyright 2019 @foostan | ||
Copyright 2020 Drashna Jaelre <@drashna> | ||
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 SPLIT_TRANSPORT_MIRROR | ||
#define SPLIT_LAYER_STATE_ENABLE | ||
#define SPLIT_LED_STATE_ENABLE | ||
#define SPLIT_MODS_ENABLE | ||
|
||
|
||
#ifdef RGBLIGHT_ENABLE | ||
#define RGBLIGHT_EFFECT_BREATHING | ||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
#define RGBLIGHT_EFFECT_SNAKE | ||
#define RGBLIGHT_EFFECT_KNIGHT | ||
#define RGBLIGHT_EFFECT_CHRISTMAS | ||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
// #define RGBLIGHT_EFFECT_RGB_TEST | ||
// #define RGBLIGHT_EFFECT_ALTERNATING | ||
// #define RGBLIGHT_EFFECT_TWINKLE | ||
#define RGBLIGHT_LIMIT_VAL 120 | ||
#define RGBLIGHT_HUE_STEP 10 | ||
#define RGBLIGHT_SAT_STEP 17 | ||
#define RGBLIGHT_VAL_STEP 17 | ||
#endif | ||
|
||
#ifdef RGB_MATRIX_ENABLE | ||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses | ||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) | ||
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) | ||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) | ||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | ||
# define RGB_MATRIX_HUE_STEP 8 | ||
# define RGB_MATRIX_SAT_STEP 8 | ||
# define RGB_MATRIX_VAL_STEP 8 | ||
# define RGB_MATRIX_SPD_STEP 10 | ||
|
||
/* Enable the animations you want/need. You may need to enable only a small number of these because * | ||
* they take up a lot of space. Enable and confirm that you can still successfully compile your firmware. */ | ||
// RGB Matrix Animation modes. Explicitly enabled | ||
// For full list of effects, see: | ||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects | ||
//# define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
//# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
//# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
# define ENABLE_RGB_MATRIX_BREATHING | ||
//# define ENABLE_RGB_MATRIX_BAND_SAT | ||
//# define ENABLE_RGB_MATRIX_BAND_VAL | ||
//# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
//# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
//# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
//# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
//# define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
//# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
//# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
//# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
//# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
//# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
//# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
//# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
//# define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
//# define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
//# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
//# define ENABLE_RGB_MATRIX_RAINDROPS | ||
//# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
//# define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
//# define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
//# define ENABLE_RGB_MATRIX_HUE_WAVE | ||
//# define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
//# define ENABLE_RGB_MATRIX_PIXEL_FLOW | ||
//# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL | ||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined | ||
//# define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
//# define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined | ||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
//# define ENABLE_RGB_MATRIX_SPLASH | ||
//# define ENABLE_RGB_MATRIX_MULTISPLASH | ||
//# define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
//# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
#endif | ||
|
||
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" | ||
|
||
#define USB_POLLING_INTERVAL_MS 1 | ||
#define QMK_KEYS_PER_SCAN 12 | ||
|
||
#define DYNAMIC_KEYMAP_LAYER_COUNT 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// [CRKBD layers Init] -------------------------------------------------------// | ||
typedef enum { | ||
_BASE, | ||
_NUM, | ||
_FUNC, | ||
_MEDIA, | ||
_GAME, | ||
_MODS, | ||
_MODS2 | ||
}CRKBD_LAYERS; | ||
|
||
extern enum CRKBD_LAYERS crkbd_layers; | ||
|
||
typedef enum { | ||
_RGB_INDICATORS, | ||
_RGB_DANGER, | ||
_RGB_NUM, | ||
_RGB_FUNC, | ||
_RGB_MEDIA, | ||
_RGB_GAME, | ||
_RGB_MODS, | ||
_RGB_MODS2, | ||
_RGB_DEFAULT, | ||
_RGB_TRANS, | ||
_RGB_DISABLED | ||
}CRKBD_RGB; | ||
|
||
extern enum CRKBD_RGB crkbd_rgb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
/* | ||
Copyright 2019 @foostan | ||
Copyright 2020 Drashna Jaelre <@drashna> | ||
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/>.vvvvvvvvvfdfgfdvcfdfgbv';p:.'p;:...llloooll...cvbcvbgfdsssaaxzzxasasaqwqwaszxasssdddsdss;;;...s...sssdddf,,gmmf,,gf.,dfgdfg.,mcvbbbb | ||
*/ | ||
|
||
#include QMK_KEYBOARD_H | ||
#include "oled.c" | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[_BASE] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
LSFT_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RSFT_T(KC_QUOT), | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
LCTL_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_BSLS), | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_FUNC), RALT_T(KC_MENU) | ||
//`--------------------------' `--------------------------' | ||
|
||
), | ||
|
||
[_NUM] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
_______, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC,KC_RBRC, KC_BSLS, _______, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
_______, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
_______, _______, _______, _______, MO(_MEDIA), KC_SCRL | ||
//`--------------------------' `--------------------------' | ||
), | ||
|
||
[_FUNC] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
_______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
_______, KC_LEFT, KC_LEFT,KC_DOWN,KC_RIGHT, KC_PGDN, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
_______, MO(_MEDIA), _______, _______, _______, _______ | ||
//`--------------------------' `--------------------------' | ||
), | ||
|
||
[_MEDIA] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, TO(_GAME), | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_MNXT, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
_______, _______, _______, _______, _______, KC_MPLY | ||
//`--------------------------' `--------------------------' | ||
), | ||
[_GAME] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
QK_GESC, KC_T, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LSFT, KC_G, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
MO(_MODS2), MO(_MODS), KC_SPC, KC_ENT, XXXXXXX, KC_RALT | ||
//`--------------------------' `--------------------------' | ||
), | ||
[_MODS] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_BASE), | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
_______, _______, _______, KC_ENT, XXXXXXX, XXXXXXX | ||
//`--------------------------' `--------------------------' | ||
), | ||
[_MODS2] = LAYOUT_split_3x6_3( | ||
//,-----------------------------------------------------. ,-----------------------------------------------------. | ||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_BASE), | ||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| | ||
_______, _______, _______, KC_ENT, XXXXXXX, XXXXXXX | ||
//`--------------------------' `--------------------------' | ||
) | ||
}; | ||
|
||
uint8_t mod_state; | ||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
#ifdef OLED_ENABLE | ||
if (record->event.pressed) { | ||
set_keylog(keycode, record); | ||
} | ||
#endif | ||
mod_state = get_mods(); | ||
switch (keycode) { | ||
|
||
case KC_BSPC: | ||
{ | ||
// Initialize a boolean variable that keeps track | ||
// of the delete key status: registered or not? | ||
static bool delkey_registered; | ||
if (record->event.pressed) { | ||
// Detect the activation of either shift keys | ||
if (mod_state & MOD_MASK_SHIFT) { | ||
// First temporarily canceling both shifts so that | ||
// shift isn't applied to the KC_DEL keycode | ||
del_mods(MOD_MASK_SHIFT); | ||
register_code(KC_DEL); | ||
// Update the boolean variable to reflect the status of KC_DEL | ||
delkey_registered = true; | ||
// Reapplying modifier state so that the held shift key(s) | ||
// still work even after having tapped the Backspace/Delete key. | ||
set_mods(mod_state); | ||
return false; | ||
} | ||
} else { // on release of KC_BSPC | ||
// In case KC_DEL is still being sent even after the release of KC_BSPC | ||
if (delkey_registered) { | ||
unregister_code(KC_DEL); | ||
delkey_registered = false; | ||
return false; | ||
} | ||
} | ||
// Let QMK process the KC_BSPC keycode as usual outside of shift | ||
return true; | ||
} | ||
|
||
} | ||
return true; | ||
}; |
Oops, something went wrong.