Skip to content

Commit

Permalink
keyboards/crkbd/
Browse files Browse the repository at this point in the history
  • Loading branch information
antempus committed Sep 5, 2023
1 parent 96edcd8 commit 0f1692c
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 59 deletions.
23 changes: 11 additions & 12 deletions keyboards/crkbd/keymaps/antempus/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[1] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,XXXXXXX,
KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MPRV, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT, XXXXXXX,
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT, XXXXXXX,
//|--------+--------+--------+--------+--------+ --------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, _______, TD_SPC, KC_SPC, MO(3), KC_LCTL
//`--------------------------' `--------------------------'
Expand All @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_TAB, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, XXXXXXX,
KC_TAB, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
Expand Down Expand Up @@ -138,12 +138,12 @@ void oled_render_keylog(void) {
oled_write(keylog_str, false);
}

// void oled_render_rgb_status(void) {
// oled_write_ln("RGB:", false);
// static char temp[20] = {0};
// snprintf(temp, sizeof(temp) + 1, "M:%3dH:%3dS:%3dV:%3d", rgb_matrix_config.mode, rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
// oled_write(temp, false);
// }
void oled_render_rgb_status(void) {
oled_write_ln("RGB:", false);
static char temp[20] = {0};
// snprintf(temp, sizeof(temp) + 1, "M:%3dH:%3dS:%3dV:%3d", rgb_matrix_config.mode, rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
oled_write(temp, false);
}

void render_bootmagic_status(bool status) {
/* Show Ctrl-Gui Swap options */
Expand Down Expand Up @@ -173,9 +173,8 @@ bool oled_task_user(void) {
if (is_keyboard_master()) {
oled_render_layer_state();
oled_render_keylog();
// oled_render_rgb_status();
} else {
oled_render_logo();
oled_render_rgb_status();
}
return false;
}
Expand Down
84 changes: 55 additions & 29 deletions keyboards/planck/keymaps/antempus/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include QMK_KEYBOARD_H
#include "muse.h"
#include "print.h"


extern keymap_config_t keymap_config;

Expand All @@ -36,7 +38,6 @@ enum planck_keycodes
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO

// Func macro definitions.
Expand All @@ -47,65 +48,67 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
* | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | AltGr| Alt | Lower| Space | Raise| Left | Down | Up |Right |
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_planck_grid(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LALT, KC_RALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT),

/* Lower
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ` | | | | | | | | | | ( | ) |
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | | | | | | | | | | { | } |
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | [ | ] |
* | | | | | | | |ISO ~ |ISO | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Back| | | | | | | Home | PgDwn| PgUp | End |
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/

[_LOWER] = LAYOUT_planck_grid(
KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN,
KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC,
BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END),
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, _______, _______, _______, _______, _______, _______, S(KC_NUHS), S(KC_NUBS), _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY),

/* Raise
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | - | = |
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | ` |
* | | - | = | [ | ] | \ | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | \ | |
* | | _ | + | { | } | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* | | | | | | | | Home | PgUp | PgDn | End |
* `-----------------------------------------------------------------------------------'
*/


[_RAISE] = LAYOUT_planck_grid(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______,
_______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END),

/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|| | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
* | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* '-----------------------------------------------------------------------------------
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_planck_grid(
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL,
Expand Down Expand Up @@ -274,3 +277,26 @@ bool music_mask_user(uint16_t keycode)
return true;
}
}


bool encoder_update_user(uint8_t index, bool clockwise) {
/* And with another if statement we can check the direction. */
if (IS_LAYER_ON(_QWERTY)){
print("in qwerty");

if (clockwise) {
/* This is where the actual magic happens: this bit of code taps on the
Page Down key. You can do anything QMK allows you to do here.
You'll want to replace these lines with the things you want your
encoders to do. */
tap_code(KC_VOLU);
} else {
/* And likewise for the other direction, this time Page Down is pressed. */
tap_code(KC_VOLD);
}
}
else {
print("not qwerty");
}
return false;
}
48 changes: 31 additions & 17 deletions keyboards/planck/keymaps/antempus/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,36 @@

SRC += muse.c

# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no
# Breathing sleep LED during USB suspend
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = yes # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
ONEHAND_ENABLE = no # Enable one-hand typing
STENO_ENABLE = no # Enable TX Bolt protocol for Stenography, requires VIRTSER and may not work with mouse keys


# MIDI controls
MIDI_ENABLE = yes
# Audio output on port C6
AUDIO_ENABLE = yes
# Audio control and System control(+450)
EXTRAKEY_ENABLE = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
# Breathing sleep LED during USB suspend
SLEEP_LED_ENABLE = no
# Virtual DIP switch configuration(+1000)
BOOTMAGIC_ENABLE = no
# Mouse keys(+4700)
MOUSEKEY_ENABLE = no
# Console for debug(+400)
CONSOLE_ENABLE = no
# Commands for debug and configuration
COMMAND_ENABLE = no
# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes
# Enable keyboard backlight functionality
BACKLIGHT_ENABLE = no
# Unicode
UNICODE_ENABLE = no
# Enable Bluetooth with the Adafruit EZ-Key HID
BLUETOOTH_ENABLE = no
# Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
RGBLIGHT_ENABLE = no
# Enable one-hand typing
ONEHAND_ENABLE = no
# Enable TX Bolt protocol for Stenography, requires VIRTSER and may not work with mouse keys
STENO_ENABLE = no
1 change: 0 additions & 1 deletion users/yanfali_wkl

This file was deleted.

0 comments on commit 0f1692c

Please sign in to comment.