~ruther/qmk_firmware

022e2748aff77ba9f22511a83e205fc4a6703bf6 — Christian Sandven 4 years ago 8b9c5a9
[Keyboard] Keyprez rhino (#13035)

Co-authored-by: Ryan <fauxpark@gmail.com>
A keyboards/keyprez/rhino/config.h => keyboards/keyprez/rhino/config.h +115 -0
@@ 0,0 1,115 @@
/*
Copyright 2021 Christian Sandven

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

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID    0xFEED
#define PRODUCT_ID   0x0000
#define DEVICE_VER   0x0001
#define MANUFACTURER Christian Sandven
#define PRODUCT      rhino

/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 7

/*
 * Keyboard Matrix Assignments
 *
 * Change this to how you wired your keyboard
 * COLS: AVR pins used for columns, left to right
 * ROWS: AVR pins used for rows, top to bottom
 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
 *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
 *
 */
#define MATRIX_ROW_PINS { B3, B2, B6, B1, F4, F5, F6, F7 }
#define MATRIX_COL_PINS { D3, D2, D4, D7, E6, B4, B5 }

/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define ENCODERS_PAD_A { D1 }
#define ENCODERS_PAD_B { D0 }
#define ENCODER_RESOLUTION 4

#define AUDIO_PIN C6
#define MUSIC_MAP

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 2

/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
 */
//#define GRAVE_ESC_CTRL_OVERRIDE

/*
 * Force NKRO
 *
 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
 * makefile for this to work.)
 *
 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
 * until the next keyboard reset.
 *
 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
 * fully operational during normal computer usage.
 *
 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
 * power-up.
 *
 */
//#define FORCE_NKRO

/*
 * Feature disable options
 *  These options are also useful to firmware size reduction.
 */

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT

/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0

A keyboards/keyprez/rhino/info.json => keyboards/keyprez/rhino/info.json +179 -0
@@ 0,0 1,179 @@
{
    "keyboard_name": "rhino",
    "url": "",
    "maintainer": "Christian Sandven",
    "width": 14,
    "height": 4,
    "layouts": {
        "LAYOUT_ortho_2x2u": {
            "layout": [
                {"x": 0, "y": 0, "w": 1.5},
                {"x": 1.5, "y": 0},
                {"x": 2.5, "y": 0},
                {"x": 3.5, "y": 0},
                {"x": 4.5, "y": 0},
                {"x": 5.5, "y": 0},
                {"x": 6.5, "y": 0},
                {"x": 7.5, "y": 0},
                {"x": 8.5, "y": 0},
                {"x": 9.5, "y": 0},
                {"x": 10.5, "y": 0},
                {"x": 11.5, "y": 0},
                {"x": 12.5, "y": 0},
                {"x": 13.5, "y": 0, "w": 1.5},

                {"x": 0, "y": 1, "w": 1.5},
                {"x": 1.5, "y": 1},
                {"x": 2.5, "y": 1},
                {"x": 3.5, "y": 1},
                {"x": 4.5, "y": 1},
                {"x": 5.5, "y": 1},
                {"x": 6.5, "y": 1},
                {"x": 7.5, "y": 1},
                {"x": 8.5, "y": 1},
                {"x": 9.5, "y": 1},
                {"x": 10.5, "y": 1},
                {"x": 11.5, "y": 1},
                {"x": 12.5, "y": 1},
                {"x": 13.5, "y": 1, "w": 1.5},

                {"x": 0, "y": 2, "w": 1.5},
                {"x": 1.5, "y": 2},
                {"x": 2.5, "y": 2},
                {"x": 3.5, "y": 2},
                {"x": 4.5, "y": 2},
                {"x": 5.5, "y": 2},
                {"x": 6.5, "y": 2},
                {"x": 7.5, "y": 2},
                {"x": 8.5, "y": 2},
                {"x": 9.5, "y": 2},
                {"x": 10.5, "y": 2},
                {"x": 11.5, "y": 2},
                {"x": 12.5, "y": 2},
                {"x": 13.5, "y": 2, "w": 1.5},

                {"x": 1.5, "y": 4},
                {"x": 2.5, "y": 4},
                {"x": 3.5, "y": 4},
                {"x": 4.5, "y": 4},
                {"x": 5.5, "y": 4, "w": 2},
                {"x": 7.5, "y": 4, "w": 2},
                {"x": 9.5, "y": 4},
                {"x": 10.5, "y": 4},
                {"x": 11.5, "y": 4},
                {"x": 12.5, "y": 4}
            ]
        },

        "LAYOUT_ergo_2x2u": {
            "layout": [
                {"x": 0, "y": 0, "w": 1.5},
                {"x": 1.5, "y": 0},
                {"x": 2.5, "y": 0},
                {"x": 3.5, "y": 0},
                {"x": 4.5, "y": 0},
                {"x": 5.5, "y": 0},
                {"x": 6.5, "y": 0, "h": 1.5},
                {"x": 7.5, "y": 0, "h": 1.5},
                {"x": 8.5, "y": 0},
                {"x": 9.5, "y": 0},
                {"x": 10.5, "y": 0},
                {"x": 11.5, "y": 0},
                {"x": 12.5, "y": 0},
                {"x": 13.5, "y": 0, "w": 1.5},

                {"x": 0, "y": 1, "w": 1.5},
                {"x": 1.5, "y": 1},
                {"x": 2.5, "y": 1},
                {"x": 3.5, "y": 1},
                {"x": 4.5, "y": 1},
                {"x": 5.5, "y": 1},
                {"x": 6.5, "y": 1.5, "h": 1.5},
                {"x": 7.5, "y": 1.5, "h": 1.5},
                {"x": 8.5, "y": 1},
                {"x": 9.5, "y": 1},
                {"x": 10.5, "y": 1},
                {"x": 11.5, "y": 1},
                {"x": 12.5, "y": 1},
                {"x": 13.5, "y": 1, "w": 1.5},

                {"x": 0, "y": 2, "w": 1.5},
                {"x": 1.5, "y": 2},
                {"x": 2.5, "y": 2},
                {"x": 3.5, "y": 2},
                {"x": 4.5, "y": 2},
                {"x": 5.5, "y": 2},
                {"x": 8.5, "y": 2},
                {"x": 9.5, "y": 2},
                {"x": 10.5, "y": 2},
                {"x": 11.5, "y": 2},
                {"x": 12.5, "y": 2},
                {"x": 13.5, "y": 2, "w": 1.5},

                {"x": 1.5, "y": 4},
                {"x": 2.5, "y": 4},
                {"x": 3.5, "y": 4},
                {"x": 4.5, "y": 4},
                {"x": 5.5, "y": 4, "w": 2},
                {"x": 7.5, "y": 4, "w": 2},
                {"x": 9.5, "y": 4},
                {"x": 10.5, "y": 4},
                {"x": 11.5, "y": 4},
                {"x": 12.5, "y": 4}
            ]
        },

        "LAYOUT_ortho_7u": {
            "layout": [
                {"x": 0, "y": 0, "w": 1.5},
                {"x": 1.5, "y": 0},
                {"x": 2.5, "y": 0},
                {"x": 3.5, "y": 0},
                {"x": 4.5, "y": 0},
                {"x": 5.5, "y": 0},
                {"x": 6.5, "y": 0, "h": 1.5},
                {"x": 7.5, "y": 0, "h": 1.5},
                {"x": 8.5, "y": 0},
                {"x": 9.5, "y": 0},
                {"x": 10.5, "y": 0},
                {"x": 11.5, "y": 0},
                {"x": 12.5, "y": 0},
                {"x": 13.5, "y": 0, "w": 1.5},

                {"x": 0, "y": 1, "w": 1.5},
                {"x": 1.5, "y": 1},
                {"x": 2.5, "y": 1},
                {"x": 3.5, "y": 1},
                {"x": 4.5, "y": 1},
                {"x": 5.5, "y": 1},
                {"x": 6.5, "y": 1.5, "h": 1.5},
                {"x": 7.5, "y": 1.5, "h": 1.5},
                {"x": 8.5, "y": 1},
                {"x": 9.5, "y": 1},
                {"x": 10.5, "y": 1},
                {"x": 11.5, "y": 1},
                {"x": 12.5, "y": 1, "w": 1.5},
                {"x": 14, "y": 1},

                {"x": 0, "y": 2, "w": 1.5},
                {"x": 1.5, "y": 2},
                {"x": 2.5, "y": 2},
                {"x": 3.5, "y": 2},
                {"x": 4.5, "y": 2},
                {"x": 5.5, "y": 2},
                {"x": 8.5, "y": 2},
                {"x": 9.5, "y": 2},
                {"x": 10.5, "y": 2},
                {"x": 11.5, "y": 2, "w": 1.5},
                {"x": 13, "y": 2},
                {"x": 14, "y": 2},

                {"x": 1.5, "y": 4},
                {"x": 2.5, "y": 4, "w": 1.5},
                {"x": 4, "y": 4, "w": 7},
                {"x": 11, "y": 4, "w": 1.5},
                {"x": 12.5, "y": 4}
            ]
        }
    }
}

A keyboards/keyprez/rhino/keymaps/default/keymap.c => keyboards/keyprez/rhino/keymaps/default/keymap.c +116 -0
@@ 0,0 1,116 @@
/* Copyright 2021 Christian Sandven
 *
 * 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

// Defines names for use in layer keycodes and the keymap
enum layer_names {
    _BASE,
    _FN,
    _LOWER,
    _RAISE
};

#define LOWER MO(_LOWER)
#define FN MO(_FN)
#define TAB_CTL MT(MOD_LCTL, KC_TAB)
#define SPC_RAISE LT(_RAISE, KC_SPC)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

    /* Base Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_MUTE |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | GESC   | Q      | W      | E      | R      | T      | [      | ]      | Y      | U      | I      | O      | P      | '      |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * | TAB    | A      | S      | D      | F      | G      | HOME   | PG UP  | H      | J      | K      | L      | ;      | BACKSP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * | LSHIFT | Z      | X      | C      | V      | B      | END    | PG DN  | N      | M      | ,      | .      | /      | ENTER  |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        | LGUI   | FN     | LALT   | LOWER  |      SPACE      |      SPACE      | LEFT   | UP     | DOWN   | RIGHT  |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_BASE] = LAYOUT_ortho_2x2u(
                                                                                                                             KC_MUTE,
        KC_GESC, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_LBRC, KC_RBRC, KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_QUOT,
        TAB_CTL, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_HOME, KC_PGUP, KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_BSPC,
        KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_END,  KC_PGDN, KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT,
                 KC_LGUI, FN,      KC_LALT, LOWER,       KC_SPC,          KC_SPC,     KC_LEFT, KC_UP,   KC_DOWN, KC_RGHT
    ),

    /* FN Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | `      | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    |        |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    | F12    |        |        |        |        |        | DEL    | PRT SC |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * |        |        |        |        |        |        |        |        |        |        |        |        |        | RESET  |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        |        |        |        |                 |                 | MUTE   | VOL UP |VOL DOWN| PAUSE  |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_FN] = LAYOUT_ortho_2x2u(
                                                                                                                             KC_APP,
        KC_GRV,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______, KC_DEL,  KC_PSCR,
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
                 MU_TOG,  MU_MOD,  _______, _______,     _______,           _______,     KC_MUTE, KC_VOLU, KC_VOLD, KC_MPLY
    ),

    /* LOWER Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | DEL    |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * |        | F1     | F2     | F3     | F4     | F5     | F6     |        |        |        |        |        |        | INSERT |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    | F12    | ISO #  | ISO /  |        |        |        | \      |        |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        |        |        |        |                 |                 | HOME   | PG UP  | PG DN  | END    |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_LOWER] = LAYOUT_ortho_2x2u(
                                                                                                                            KC_APP,
        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_DEL,
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,  _______, _______, _______, _______, _______, _______, KC_INS,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, KC_BSLS, _______,
                 _______, _______, _______, _______,     _______,           _______,    KC_HOME, KC_PGUP, KC_PGDOWN, KC_END
    ),

    /* RAISE Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | ~      | !      | @      | #      | $      | %      | ^      | &      | *      | (      | )      | -      | =      | |      |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * |        | F1     | F2     | F3     | F4     | F5     | F6     | -      | =      | {      | }      |        |        | DEL    |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    | F12    | ISO ~  | ISO |  |        |        |        |        | INSERT |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        |        |        |        |                 |                 |        |        |        |        |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_RAISE] = LAYOUT_ortho_2x2u(
                                                                                                                             KC_APP,
        KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR,    KC_ASTR,    KC_LPRN, KC_RPRN, KC_MINS, KC_EQL,  KC_PIPE,
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS,    KC_PLUS,    KC_LCBR, KC_RCBR, _______, _______, KC_DEL,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  S(KC_NUHS), S(KC_NUBS), _______, _______, _______, _______, KC_INS,
                 _______, _______, _______, _______,     _______,           _______,    _______, _______, _______, _______
    ),
};

A keyboards/keyprez/rhino/keymaps/default/readme.md => keyboards/keyprez/rhino/keymaps/default/readme.md +1 -0
@@ 0,0 1,1 @@
# The default keymap for rhino

A keyboards/keyprez/rhino/keymaps/default_7u/keymap.c => keyboards/keyprez/rhino/keymaps/default_7u/keymap.c +117 -0
@@ 0,0 1,117 @@
/* Copyright 2021 Christian Sandven
 *
 * 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

// Defines names for use in layer keycodes and the keymap
enum layer_names {
    _BASE,
    _FN,
    _LOWER,
    _RAISE
};

#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define FN MO(_FN)
#define ESC_CTL MT(MOD_LCTL, KC_ESC)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

    /* Base Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_MUTE |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | TAB    | Q      | W      | E      | R      | T      | Y      | U      | I      | O      | P      | [      | ]      | \      |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * | ESC    | A      | S      | D      | F      | G      | H      | J      | K      | L      | ;      | '      | BACKSP | PG UP  |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * | LSHIFT | Z      | X      | C      | V      | B      | N      | M      | ,      | .      | /      | ENTER  | FN     | PG DN  |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        | LGUI   |     LALT   |                             SPACE                             | RALT       | RGUI   |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_BASE] = LAYOUT_ortho_7u(
                                                                                                                             KC_MUTE,
        KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,
        ESC_CTL, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_BSPC, KC_PGUP,
        KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT,  FN,      KC_PGDN,
                 LOWER, KC_LALT,                               KC_SPC,                                     RAISE, KC_RGUI
    ),

    /* FN Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | `      | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    |        |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    | F12    |        |        |        |        |        | DEL    | PRT SC |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * |        |        |        |        |        |        |        |        |        |        |        |        |        | RESET  |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        | MU TOG | MU MOD     |                                                               |            |        |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_FN] = LAYOUT_ortho_7u(
                                                                                                                             KC_APP,
        KC_GRV,   KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   _______, _______, _______, KC_UP,   _______, _______, _______,
        _______,  KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL,  KC_PSCR,
        _______,  _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
                  MU_TOG,  MU_MOD,                             _______,                                   _______, _______
    ),

    /* LOWER Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | |      |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * |        | F1     | F2     | F3     | F4     | F5     | LEFT   | DOWN   | UP     | RIGHT  |        |        | DEL    | INSERT |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    | F12    | ISO #  | ISO /  |        |        |        |        | \      |        |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        | F6         |                                                               |            |        |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_LOWER] = LAYOUT_ortho_7u(
                                                                                                                            KC_APP,
        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_PIPE,
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT, _______, _______, KC_DEL,  KC_INS,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NUHS, KC_NUBS, _______, _______, _______, _______, KC_BSLS,
                 _______, KC_F6,                              _______,                                   _______, _______
    ),

    /* RAISE Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | ~      | !      | @      | #      | $      | %      | ^      | &      | *      | (      | )      | -      | =      | |      |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
     * |        | F1     | F2     | F3     | F4     | F5     | F6     | -      | =      | {      | }      |        | DEL    | INSERT |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    | F12    | ISO ~  | ISO |  |        |        |        |        | \      |        |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        |            |                                                               |            |        |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_RAISE] = LAYOUT_ortho_7u(
                                                                                                                             KC_APP,
        KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR,    KC_ASTR,    KC_LPRN, KC_RPRN, KC_MINS, KC_EQL,  KC_PIPE,
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS,    KC_PLUS,    KC_LCBR, KC_RCBR, _______, KC_DEL,  KC_INS,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  S(KC_NUHS), S(KC_NUBS), _______, _______, _______, _______, KC_BSLS,
                 _______, _______,                              _______,                                   _______, _______
    ),
};


A keyboards/keyprez/rhino/keymaps/default_7u/readme.md => keyboards/keyprez/rhino/keymaps/default_7u/readme.md +1 -0
@@ 0,0 1,1 @@
# The default 7u keymap for rhino

A keyboards/keyprez/rhino/keymaps/default_ergo/keymap.c => keyboards/keyprez/rhino/keymaps/default_ergo/keymap.c +124 -0
@@ 0,0 1,124 @@
/* Copyright 2021 Christian Sandven
 *
 * 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

// Defines names for use in layer keycodes and the keymap
enum layer_names {
    _BASE,
    _FN,
    _LOWER,
    _RAISE
};

#define LOWER MO(_LOWER)
#define FN MO(_FN)
#define TAB_CTL MT(MOD_LCTL, KC_TAB)
#define SPC_RAISE LT(_RAISE, KC_SPC)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

    /* Base Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_MUTE |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | GESC   | Q      | W      | E      | R      | T      |        |        | Y      | U      | I      | O      | P      | '      |
     * |--------+--------+--------+--------+--------+--------+   [    +    ]   +--------+--------+--------+-----------------+--------|
     * | TAB    | A      | S      | D      | F      | G      |--------|--------| H      | J      | K      | L      | ;      | BACKSP |
     * |--------+--------+--------+--------+--------+--------+  HOME  +  END   +--------+--------+--------------------------+--------|
     * | LSHIFT | Z      | X      | C      | V      | B      |        |        | N      | M      | ,      | .      | /      | ENTER  |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        | LGUI   | FN     | LALT   | LOWER  |      SPACE      |      SPACE      | LEFT   | UP     | DOWN   | RIGHT  |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_BASE] = LAYOUT_ergo_2x2u(
                                                                                                                             KC_MUTE,
        KC_GESC, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_LBRC, KC_RBRC, KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_QUOT,
        TAB_CTL, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_HOME, KC_END,  KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_BSPC,
        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_LGUI, FN,      KC_LALT, LOWER,       KC_SPC,          SPC_RAISE,     KC_LEFT, KC_UP,   KC_DOWN, KC_RGHT
    ),

    /* FN Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP  |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | `      | F1     | F2     | F3     | F4     | F5     |        |        | F8     | F9     | F10    | F11    | F12    |        |
     * |--------+--------+--------+--------+--------+--------+   F6   +   F7  +--------+--------+--------+-----------------+---------|
     * |        | F7     | F8     | F9     | F10    | F11    |--------|--------|        |        |        |        |        | PRT SC |
     * |--------+--------+--------+--------+--------+--------+  F12   +        +--------+--------+--------------------------+--------|
     * |        |        |        |        |        |        |        |        |        |        |        |        |        | RESET  |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        | MU TOG | MU MOD |        |        |                 |                 | MUTE   | VOL UP |VOL DOWN| PAUSE  |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_FN] = LAYOUT_ergo_2x2u(
                                                                                                                             KC_APP,
        KC_GRV,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______, _______, KC_PSCR,
        _______, _______, _______, _______, _______, _______,                   _______, _______, _______, _______, _______, RESET,
                 MU_TOG,  MU_MOD,  _______, _______,     _______,           _______,     KC_MUTE, KC_VOLU, KC_VOLD, KC_MPLY
    ),

    /* LOWER Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP  |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | `      | 1      | 2      | 3      | 4      | 5      |        |        | 8      | 9      | 0      | -      | =      | |      |
     * |--------+--------+--------+--------+--------+--------+   6    +    7   +--------+--------+--------+-----------------+--------|
     * |        | F1     | F2     | F3     | F4     | F5     |--------|--------|        |        |        |        | DEL    | INSERT |
     * |--------+--------+--------+--------+--------+--------+  F12   +        +--------+--------+--------------------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    |        |        |        |        |        |        | \      |        |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        |        |        |        |                 |                 | HOME   | PG UP  | PG DN  | END    |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_LOWER] = LAYOUT_ergo_2x2u(
                                                                                                                            KC_APP,
        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_PIPE,
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F12, _______, _______, _______, _______, _______, KC_DEL,  KC_INS,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,                   _______, _______, _______, _______, KC_BSLS, _______,
                 _______, _______, _______, _______,     _______,           _______,    KC_HOME, KC_PGUP, KC_PGDOWN, KC_END
    ),

    /* RAISE Layer
     * .-----------------------------------------------------------------------------------------------------------------------------.
     * |                                                                                                                     KC_APP |
     * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
     * | ~      | !      | @      | #      | $      | %      |        |        | *      | (      | )      | -      | =      | |      |
     * |--------+--------+--------+--------+--------+--------+   ^    +    &   +--------+--------+--------+-----------------+--------|
     * |        | F1     | F2     | F3     | F4     | F5     |--------|--------| =      | {      | }      |        | DEL    | INSERT |
     * |--------+--------+--------+--------+--------+--------+  F12   +   _    +--------+--------+--------------------------+--------|
     * |        | F7     | F8     | F9     | F10    | F11    |        |        | ISO ~  | ISO |  |        |        | \      |        |
     * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
     * |        |        |        |        |        |                 |                 |        |        |        |        |        |
     * '-----------------------------------------------------------------------------------------------------------------------------'
     */
    [_RAISE] = LAYOUT_ergo_2x2u(
                                                                                                                                      KC_APP,
        KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC,  KC_AMPR,   KC_ASTR,    KC_LPRN,    KC_RPRN, KC_MINS, KC_EQL,  KC_PIPE,
        _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F12,   KC_UNDS,   KC_PLUS,    KC_LCBR,    KC_RCBR, _______, KC_DEL,  KC_INS,
        _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,                       S(KC_NUHS), S(KC_NUBS), _______, _______, _______, KC_BSLS,
                 _______, _______, _______, _______,     _______,            _______,          _______, _______, _______, _______
    ),
};

const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ergo_2x2u(
    0,
    0, 0, 0, 0, 0, 0, 10, 0, 0,  0,  0,  0,  0,  0,
    0, 1, 3, 0, 6, 8, 9, 11, 13, 15, 0,  18, 20, 0,
    0, 0, 2, 4, 5, 7,        12, 14, 16, 17, 19, 0,
       0, 0, 0, 0,    0,  0,     0,  0,  0,  0
);

A keyboards/keyprez/rhino/keymaps/default_ergo/readme.md => keyboards/keyprez/rhino/keymaps/default_ergo/readme.md +1 -0
@@ 0,0 1,1 @@
# The default keymap for rhino

A keyboards/keyprez/rhino/readme.md => keyboards/keyprez/rhino/readme.md +22 -0
@@ 0,0 1,22 @@
# rhino

Rhino is a 50 percent keyboard taking inspiration from the Boardwalk keyboard. It supports some of the layouts the bordwalk does, but in a smaller form factor. The number row is removed and replaced with through hole components.

![](https://i.imgur.com/OqCJZWah.jpg)


* Keyboard Maintainer: [Christian Sandven](https://github.com/csandven)
* Hardware Supported: *Pro micro compatible boards*
* Hardware Availability: *TBA*

Make example for this keyboard (after setting up your build environment):

    make keyprez/rhino:default

Flashing example for this keyboard:

    make keyprez/rhino:default:flash
    
You can then press the reset button on the top right to flash the keyboard.

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

A keyboards/keyprez/rhino/rhino.c => keyboards/keyprez/rhino/rhino.c +32 -0
@@ 0,0 1,32 @@
/* Copyright 2021 Christian Sandven
 *
 * 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 "rhino.h"

bool encoder_update_kb(uint8_t index, bool clockwise) {
    if (!encoder_update_user(index, clockwise)) { return false; }
    tap_code(clockwise ? KC_VOLU : KC_VOLD);
    return true;
}

__attribute__ ((weak))
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_2x2u(
    0,
    0, 0, 0, 0, 0, 0, 0,  0, 0,  0,  0,  0,  0,  0,
    0, 1, 3, 0, 6, 8, 10, 0, 13, 15, 0,  18, 20, 0,
    0, 0, 2, 4, 5, 7, 9, 11, 12, 14, 16, 17, 19, 0,
       0, 0, 0, 0,    0,     0,  0,  0,  0,  0
);

A keyboards/keyprez/rhino/rhino.h => keyboards/keyprez/rhino/rhino.h +80 -0
@@ 0,0 1,80 @@
/* Copyright 2021 Christian Sandven
 *
 * 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

#include "quantum.h"


/* This is a shortcut to help you visually see your layout.
 *
 * The first section contains all of the arguments representing the physical
 * layout of the board and position of the keys.
 *
 * The second converts the arguments into a two-dimensional array which
 * represents the switch matrix.
 */
#define LAYOUT_ortho_2x2u( \
                                                                   k70,   \
    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, \
    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \
         k60, k61, k62, k63,    k64,      k65,   k66, k67, k68, k69       \
) { \
    { k00,   k01,   k02, k03, k04, k05,   k06 }, \
    { k20,   k21,   k22, k23, k24, k25,   k26 },  \
    { k40,   k41,   k42, k43, k44, k45,   k46 },  \
    { KC_NO, k60,   k61, k62, k63, KC_NO, k64 },  \
    { k07,   k08,   k09, k10, k11, k12,   k13 },  \
    { k27,   k28,   k29, k30, k31, k32,   k33 },  \
    { k47,   k48,   k49, k50, k51, k52,   k53 },  \
    { k65,   KC_NO, k66, k67, k68, k69,   k70 }  \
}

#define LAYOUT_ergo_2x2u( \
                                                                   k70,   \
    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, \
    k40, k41, k42, k43, k44, k45,           k48, k49, k50, k51, k52, k53, \
         k60, k61, k62, k63,   k64,       k65,   k66, k67, k68, k69           \
) { \
    { k00,   k01,   k02, k03, k04, k05,   k06   }, \
    { k20,   k21,   k22, k23, k24, k25,   k26   },  \
    { k40,   k41,   k42, k43, k44, k45,   KC_NO },  \
    { KC_NO, k60,   k61, k62, k63, KC_NO, k64   },  \
    { k07,   k08,   k09, k10, k11, k12,   k13   },  \
    { k27,   k28,   k29, k30, k31, k32,   k33   },  \
    { KC_NO, k48,   k49, k50, k51, k52,   k53   },  \
    { k65,   KC_NO, k66, k67, k68, k69,   k70   }  \
}

#define LAYOUT_ortho_7u( \
                                                                   k65,   \
    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, \
    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \
         k60,    k61,                k62,                k63,   k64       \
) { \
    { k00,   k01,   k02,   k03,   k04,   k05,   k06 }, \
    { k20,   k21,   k22,   k23,   k24,   k25,   k26 },  \
    { k40,   k41,   k42,   k43,   k44,   k45,   k46 },  \
    { KC_NO, k60,   k61,   KC_NO, KC_NO, KC_NO, k62 },  \
    { k07,   k08,   k09,   k10,   k11,   k12,   k13 },  \
    { k27,   k28,   k29,   k30,   k31,   k32,   k33 },  \
    { k47,   k48,   k49,   k50,   k51,   k52,   k53 },  \
    { KC_NO, KC_NO, KC_NO, KC_NO, k63,   k64,   k65 }  \
}


A keyboards/keyprez/rhino/rules.mk => keyboards/keyprez/rhino/rules.mk +23 -0
@@ 0,0 1,23 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu

# Build Options
#   change yes to no to disable
#
BOOTMAGIC_ENABLE = lite     # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes       # Mouse keys
EXTRAKEY_ENABLE = yes       # Audio control and System control
CONSOLE_ENABLE = no         # Console for debug
COMMAND_ENABLE = no         # Commands for debug and configuration
# 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 this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no            # USB Nkey Rollover
BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no       # Enable Bluetooth
AUDIO_ENABLE = yes           # Audio output
ENCODER_ENABLE = yes