Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Keymap.c ================================================================================
- /* Copyright 2023 Brian Low
- *
- * 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 <stdio.h>
- #include QMK_KEYBOARD_H
- const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /*
- * QWERTY
- * ,-----------------------------------------. ,-----------------------------------------.
- * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
- * |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
- * |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
- * |------+------+------+------+------+------| Mute | | Pause |------+------+------+------+------+------|
- * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
- * `-----------------------------------------/ / \ \-----------------------------------------'
- * | LCTL | LGUI | LCMD | LALT | /Enter / \Space \ | RALT | RCMD | RGUI | RCTL |
- * | | | | |/ / \ \ | | | | |
- * `----------------------------------' '------''---------------------------'
- */
- LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
- 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_MUTE, KC_MPLY,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LCMD, KC_LALT, KC_ENT, KC_SPC, KC_RALT, KC_RCMD, KC_RGUI, KC_RCTL
- )
- };
- #if defined(ENCODER_MAP_ENABLE)
- const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
- { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT) },
- };
- #endif
- #ifdef OLED_ENABLE
- // Custom home-made 32x128 art: Gaimon (see images directory)
- // Art was made with Gimp and QMK Logo editor (https://joric.github.io/qle) was used to generate the pixel matrix:
- static const uint16_t PROGMEM raw_logo[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,224,240,240,248,248,248,248,248,248,248,248,248,248,248,248,240,224,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,224,224,224,224,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,127,127, 63, 63, 63, 63, 63, 63,255,255,255,255,255,255,255,254, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,252,254, 14, 7, 7, 3,131,131,135,135,135,134, 0, 0, 0,112,112, 48, 48, 48,112,240,224,128, 0, 0, 0,243,243, 0, 0, 0, 0,240,240, 96,112, 48,112,240,224,192, 96,112, 48,112,240,240,192, 2, 2,198,230,246,118, 54, 54,118,246,230,198, 2, 2, 0,240,240, 96,112, 48, 48,112,243,227, 1, 0, 12, 78,102, 32, 32, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 15,159,223,207, 24,254,249,233,207,207,207,233,249,255, 57,131,223,143, 7, 3, 0, 0, 0, 0, 0, 96,252,184, 16,128,135, 31, 63, 56,112,112, 96, 97, 97,113,113, 63, 63, 0, 0, 62,126,119,103, 99, 99, 99,115,127, 63, 0, 0, 0,127,127, 0, 0, 0, 0,127,127, 0, 0, 0, 0, 0,127,127, 0, 0, 0, 0, 0,127,127, 0, 0, 31, 63,120,112, 98, 98,112,120, 63, 31, 0, 0, 0,127,127, 0, 0, 0, 0, 0,127,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 19, 31, 31, 31, 15, 15, 31, 31, 31, 23, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 24, 28, 15, 5, 7, 13, 24, 28, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- };
- oled_write_raw_P(raw_logo,sizeof(raw_logo));
- #endif
- Rules.mk ================================================================================
- ENCODER_MAP_ENABLE = yes
- VIA_ENABLE = yes
- # Reduce compiled size
- MOUSEKEY_ENABLE = no
- SPACE_CADET_ENABLE = no
- GRAVE_ESC_ENABLE = no
- OLED_ENABLE = yes
- Config.h ================================================================================
- /* Copyright 2023 Brian Low
- *
- * 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
- // Enabling this option changes the startup behavior to listen for an
- // active USB communication to delegate which part is master and which
- // is slave. With this option enabled and theres’s USB communication,
- // then that half assumes it is the master, otherwise it assumes it
- // is the slave.
- //
- // I've found this helps with some ProMicros where the slave does not boot
- #define SPLIT_USB_DETECT
- #define RGB_MATRIX_SLEEP // turn off effects when suspended
- #define SPLIT_TRANSPORT_MIRROR // If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs (max 255). Higher may cause the controller to crash.
Advertisement
Add Comment
Please, Sign In to add comment