diff --git a/keyboards/system76/lrrr/README.md b/keyboards/system76/lrrr/README.md new file mode 100644 index 00000000000..f82ca8eb455 --- /dev/null +++ b/keyboards/system76/lrrr/README.md @@ -0,0 +1,21 @@ +## Flashing firmware: +* Clone this repository and `cd` into the `qmk_firmware` directory. +* After cloning, you probably need to run `make git-submodule`. + - You may also need to install dependencies: `sudo apt install avrdude gcc-avr avr-libc` +* To build the firmware without flashing the keyboard, use `make (keyboard name):(layout name)` + - For example, if I want to build Levi's layout for the uglydense keyboard, I will run: + `make system76/uglydense:levi` +* Before flashing firmware, disable your ModemManager: `systemctl stop ModemManager.service` + - It messes with the flasher, so just stop it before flashing. You can disable it with `systemctl disable ModemManager.service` if you wish to. +* To flash the firmware, you'll use the same build command, but with `flash` added to the end: + `make system76/uglydense:default:flash` + - After it builds, you will see a message that says `Detecting USB port, reset your controller now...`. You then want to hit the "RESET" key on the keyboard if it is programmed into the layout. + - In the default layout and the `levi` layout, it is Fn+Esc. If a RESET key is not programmed into the layout, unplugging and re-plugging the keyboard sometimes begins the flashing process. If it doesn't, you'll have to briefly bridge the RST and GND pins on the Arduino Pro Micro inside the keyboard. Don't attempt this unless you know what you are doing. + +## Making your own layout: +If you want to create your own layout, go to the `keymaps` directory and copy one of the maps in there. You'll probably want to start with the default layout, but the other layouts in there may be helpful references. The name of the directory you create will be the name of your layout. Ensure that it has no spaces or strange symbols, as this could lead to build errors. + +Inside of each layout directory, there is a file called `keymap.c`, which is what you will be customizing to create your own keymap. The commented out grid area in this file is a reference for the actual key assignments below it. When I am modifying a layout, I first update this grid. It helps me keep track of where I want everything. It does not matter what you label the keys in this grid since it is in a comment. Just try to keep it understandable for yourself and everyone else. + +The keycodes below that do have to be typed correctly. A full list of keycodes can be found here: https://beta.docs.qmk.fm/reference/keycodes . Use the shorter keycode alias to help keep these lined up (e.g. use `KC_ESC` instead of `KC_ESCAPE`). + diff --git a/keyboards/system76/lrrr/config.h b/keyboards/system76/lrrr/config.h new file mode 100644 index 00000000000..418630dbbd6 --- /dev/null +++ b/keyboards/system76/lrrr/config.h @@ -0,0 +1,35 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1776 +#define PRODUCT_ID 0x1776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT Lrrr +#define DESCRIPTION Lrrr Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F4, F3, F2, B3, B1 } +#define MATRIX_COL_PINS { B2, B0, D2, D3, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +#endif // CONFIG_H diff --git a/keyboards/system76/lrrr/keymaps/default/keymap.c b/keyboards/system76/lrrr/keymaps/default/keymap.c new file mode 100644 index 00000000000..5d6d858a30a --- /dev/null +++ b/keyboards/system76/lrrr/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | ; | ' | | | | + | CAPS | A | S | D | F | G | H | J | K | L | : | " | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | , | . | / | | | + | SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | + ____|____________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | CTRL | FN | LGUI | LALT | SPACE | SPACE | RCTRL | RALT | FN | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| +*/ + + [0] = LAYOUT( + KC_ESC, 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_DEL, KC_HOME, + 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_BSPC, KC_PGUP, + 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, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* Layer 1, function layer +__________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| RESET | | | | | | | | | | | | | || | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | | | | | | | || | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || | +| | | | | | | | | | | | | | || | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | | | | | | | | | | | | | PGUP | + ____|____________|________|________|________|________|________|________|________|________|________|________|____________|________|_________ + | | | | | | | | | | | | | | + | | | | | | | | | | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + +* 'RESET' resets the controller and puts the board into firmware flashing mode. If this key is hit accidentally, just unplug the board +* and plug it back in. +*/ + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/lrrr/lrrr.c b/keyboards/system76/lrrr/lrrr.c new file mode 100644 index 00000000000..9ab9ad52fbd --- /dev/null +++ b/keyboards/system76/lrrr/lrrr.c @@ -0,0 +1,10 @@ + +#include "lrrr.h" + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/system76/lrrr/lrrr.h b/keyboards/system76/lrrr/lrrr.h new file mode 100644 index 00000000000..46adc344982 --- /dev/null +++ b/keyboards/system76/lrrr/lrrr.h @@ -0,0 +1,24 @@ +#ifndef LRRR_H +#define LRRR_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, \ + K50, K51, K52, K53, K54, K56, K57, K58, K59, K5A, K5B, K5C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, ___, ___ }, \ + { K50, K51, K52, K53, K54, ___, K56, K57, K58, K59, K5A, K5B, K5C, ___, ___ }, \ +} + +#endif // UGLYDENSE_H diff --git a/keyboards/system76/lrrr/rules.mk b/keyboards/system76/lrrr/rules.mk new file mode 100644 index 00000000000..02a94584a36 --- /dev/null +++ b/keyboards/system76/lrrr/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work