Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2022-08-06 21:42:44 +00:00
commit c5844931e2
8 changed files with 262 additions and 0 deletions

View file

@ -0,0 +1,34 @@
/* Copyright 2022 Julian Turner
*
* 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
#undef MANUFACTURER
#define MANUFACTURER Trner
/* Select hand configuration */
#define MASTER_LEFT
// Configure the global tapping term (default: 200ms)
#define TAPPING_TERM 500
// Prevent normal rollover on alphas from accidentally triggering mods.
#define IGNORE_MOD_TAP_INTERRUPT
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
#define TAPPING_FORCE_HOLD
//#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"

View file

@ -0,0 +1,61 @@
/* Copyright 2022 Julian Turner
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "keymap_german.h"
#include "layers.h"
#include "keytabs.h"
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTZ] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, HOME_A, HOME_S, HOME_D, HOME_F, DE_G, DE_H, HOME_J, HOME_K, HOME_L, HOME_OE, DE_ADIA,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LEFT_CTRL, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, KC_COMM, DE_DOT, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
MO(_NUMBER), MO(_SYMBOL), KC_SPC, KC_BSPACE, KC_ENTER, XXXXXXX
//`--------------------------' `--------------------------'
),
[_SYMBOL] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
XXXXXXX, XXXXXXX, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, DE_SS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_AT, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LEFT_CTRL, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_GRV, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
MO(_NUMBER), MO(_SYMBOL), KC_SPC, KC_BSPACE, KC_ENTER, XXXXXXX
//`--------------------------' `--------------------------'
),
[_NUMBER] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
XXXXXXX, XXXXXXX, KC_PAGE_UP, KC_UP, KC_PAGE_DOWN, XXXXXXX, XXXXXXX, DE_7, DE_8, DE_9, DE_ASTR, DE_SLSH,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, DE_4, DE_5, DE_6, DE_PLUS, DE_MINS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LEFT_CTRL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_1, DE_2, DE_3, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
MO(_NUMBER), MO(_SYMBOL), KC_SPC, KC_BSPACE, KC_ENTER, DE_0
//`--------------------------' `--------------------------'
),
};
// clang-format off

View file

@ -0,0 +1,27 @@
/* Copyright 2022 Julian Turner
*
* 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/>.
*/
// Left-hand home row mods
#define HOME_A LGUI_T(DE_A)
#define HOME_S LALT_T(DE_S)
#define HOME_D LSFT_T(DE_D)
#define HOME_F LCTL_T(DE_F)
// Right-hand home row mods
#define HOME_J RCTL_T(DE_J)
#define HOME_K RSFT_T(DE_K)
#define HOME_L LALT_T(DE_L)
#define HOME_OE RGUI_T(DE_ODIA)

View file

@ -0,0 +1,19 @@
/* Copyright 2022 Julian Turner
*
* 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
enum layers { _QWERTZ, _SYMBOL, _NUMBER };

View file

@ -0,0 +1,74 @@
/* Copyright 2022 Julian Turner
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "layers.h"
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}
return rotation;
}
void oled_render_layer_state(void) {
oled_write_P(PSTR("layer: "), false);
switch (get_highest_layer(layer_state | default_layer_state)) {
case _QWERTZ:
oled_write_ln_P(PSTR("QWERTZ"), false);
break;
case _SYMBOL:
oled_write_ln_P(PSTR("SYMBOL"), false);
break;
case _NUMBER:
oled_write_ln_P(PSTR("NUMBER"), false);
break;
default:
oled_write_ln_P(PSTR("unknown"), false);
break;
}
}
void render_bootmagic_status(bool status) {
/* Show Ctrl-Gui Swap options */
static const char PROGMEM logo[][2][3] = {
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
};
if (status) {
oled_write_ln_P(logo[0][0], false);
oled_write_ln_P(logo[0][1], false);
} else {
oled_write_ln_P(logo[1][0], false);
oled_write_ln_P(logo[1][1], false);
}
}
void oled_render_logo(void) {
static const char PROGMEM crkbd_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0};
oled_write_P(crkbd_logo, false);
}
bool oled_task_user(void) {
if (is_keyboard_master()) {
oled_render_layer_state();
oled_write_P(PSTR("WPM: "), false);
oled_write(get_u8_str(get_current_wpm(), ' '), false);
} else {
oled_render_logo();
}
return false;
}

View file

@ -0,0 +1,27 @@
/* Copyright 2022 Julian Turner
*
* 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
#ifdef OLED_ENABLE
bool process_record_oled(uint16_t keycode, keyrecord_t *record);
oled_rotation_t oled_init_user(oled_rotation_t rotation);
void render_layer_symbol(void);
void render_layer_name(void);
void render_mod_state(uint8_t modifiers);
void render_status(void);
bool oled_task_user(void);
#endif

View file

@ -0,0 +1,5 @@
# JulianTurner´s CRKBD Layout
## Compile
Compile using `qmk compile -kb crkbd -km julian_turner` for Pro Micro

View file

@ -0,0 +1,15 @@
RGBLIGHT_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
WPM_ENABLE = yes
# Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable).
LTO_ENABLE = yes
ifeq ($(OLED_ENABLE),yes)
SRC += ./oled.c
endif