1
0
Fork 0

O4L 5x12 refactor (#11392)

* O4L 5x12 refactor

* Remove config.h
This commit is contained in:
Ryan 2021-01-02 03:32:21 +11:00 committed by GitHub
parent b5fc6f0682
commit c01a8b030e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 513 additions and 458 deletions

View file

@ -8,36 +8,117 @@
#define DEVICE_VER 0x0001
#define MANUFACTURER Keycapsss
#define PRODUCT O4L:5x12
#define DESCRIPTION A 60 key ortholinear keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 12
/* key matrix pins */
/*
* 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 { F7, B1, B3, B2, B6 }
#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2, F6, F5, F4 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* WS2812 RGB LED */
#define RGB_DI_PIN D3
//#define BACKLIGHT_PIN B7
//#define BACKLIGHT_LEVELS 3
//#define BACKLIGHT_BREATHING
#define RGB_DI_PIN D3
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12 // Number of LEDs
#define RGBLIGHT_HUE_STEP 4
#define RGBLIGHT_SAT_STEP 4
#define RGBLIGHT_VAL_STEP 4
# define RGBLED_NUM 12
# define RGBLIGHT_HUE_STEP 4
# define RGBLIGHT_SAT_STEP 4
# define RGBLIGHT_VAL_STEP 4
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
# define RGBLIGHT_ANIMATIONS
/*== or choose animations ==*/
//# define RGBLIGHT_EFFECT_BREATHING
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//# define RGBLIGHT_EFFECT_SNAKE
//# define RGBLIGHT_EFFECT_KNIGHT
//# define RGBLIGHT_EFFECT_CHRISTMAS
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
//# define RGBLIGHT_EFFECT_RGB_TEST
//# define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Set 0 if debouncing isn't needed */
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* 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

View file

@ -7,195 +7,204 @@
"height": 5,
"layouts": {
"LAYOUT_ortho_5x12": {
"key_count": 60,
"layout": [
{"w": 1, "x": 0, "y": 0},
{"w": 1, "x": 1, "y": 0},
{"w": 1, "x": 2, "y": 0},
{"w": 1, "x": 3, "y": 0},
{"w": 1, "x": 4, "y": 0},
{"w": 1, "x": 5, "y": 0},
{"w": 1, "x": 6, "y": 0},
{"w": 1, "x": 7, "y": 0},
{"w": 1, "x": 8, "y": 0},
{"w": 1, "x": 9, "y": 0},
{"w": 1, "x": 10, "y": 0},
{"w": 1, "x": 11, "y": 0},
{"w": 1, "x": 0, "y": 1},
{"w": 1, "x": 1, "y": 1},
{"w": 1, "x": 2, "y": 1},
{"w": 1, "x": 3, "y": 1},
{"w": 1, "x": 4, "y": 1},
{"w": 1, "x": 5, "y": 1},
{"w": 1, "x": 6, "y": 1},
{"w": 1, "x": 7, "y": 1},
{"w": 1, "x": 8, "y": 1},
{"w": 1, "x": 9, "y": 1},
{"w": 1, "x": 10, "y": 1},
{"w": 1, "x": 11, "y": 1},
{"w": 1, "x": 0, "y": 2},
{"w": 1, "x": 1, "y": 2},
{"w": 1, "x": 2, "y": 2},
{"w": 1, "x": 3, "y": 2},
{"w": 1, "x": 4, "y": 2},
{"w": 1, "x": 5, "y": 2},
{"w": 1, "x": 6, "y": 2},
{"w": 1, "x": 7, "y": 2},
{"w": 1, "x": 8, "y": 2},
{"w": 1, "x": 9, "y": 2},
{"w": 1, "x": 10, "y": 2},
{"w": 1, "x": 11, "y": 2},
{"w": 1, "x": 0, "y": 3},
{"w": 1, "x": 1, "y": 3},
{"w": 1, "x": 2, "y": 3},
{"w": 1, "x": 3, "y": 3},
{"w": 1, "x": 4, "y": 3},
{"w": 1, "x": 5, "y": 3},
{"w": 1, "x": 6, "y": 3},
{"w": 1, "x": 7, "y": 3},
{"w": 1, "x": 8, "y": 3},
{"w": 1, "x": 9, "y": 3},
{"w": 1, "x": 10, "y": 3},
{"w": 1, "x": 11, "y": 3},
{"w": 1, "x": 0, "y": 4},
{"w": 1, "x": 1, "y": 4},
{"w": 1, "x": 2, "y": 4},
{"w": 1, "x": 3, "y": 4},
{"w": 1, "x": 4, "y": 4},
{"w": 1, "x": 5, "y": 4},
{"w": 1, "x": 6, "y": 4},
{"w": 1, "x": 7, "y": 4},
{"w": 1, "x": 8, "y": 4},
{"w": 1, "x": 9, "y": 4},
{"w": 1, "x": 10, "y": 4},
{"w": 1, "x": 11, "y": 4}
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 0, "y": 1},
{"x": 1, "y": 1},
{"x": 2, "y": 1},
{"x": 3, "y": 1},
{"x": 4, "y": 1},
{"x": 5, "y": 1},
{"x": 6, "y": 1},
{"x": 7, "y": 1},
{"x": 8, "y": 1},
{"x": 9, "y": 1},
{"x": 10, "y": 1},
{"x": 11, "y": 1},
{"x": 0, "y": 2},
{"x": 1, "y": 2},
{"x": 2, "y": 2},
{"x": 3, "y": 2},
{"x": 4, "y": 2},
{"x": 5, "y": 2},
{"x": 6, "y": 2},
{"x": 7, "y": 2},
{"x": 8, "y": 2},
{"x": 9, "y": 2},
{"x": 10, "y": 2},
{"x": 11, "y": 2},
{"x": 0, "y": 3},
{"x": 1, "y": 3},
{"x": 2, "y": 3},
{"x": 3, "y": 3},
{"x": 4, "y": 3},
{"x": 5, "y": 3},
{"x": 6, "y": 3},
{"x": 7, "y": 3},
{"x": 8, "y": 3},
{"x": 9, "y": 3},
{"x": 10, "y": 3},
{"x": 11, "y": 3},
{"x": 0, "y": 4},
{"x": 1, "y": 4},
{"x": 2, "y": 4},
{"x": 3, "y": 4},
{"x": 4, "y": 4},
{"x": 5, "y": 4},
{"x": 6, "y": 4},
{"x": 7, "y": 4},
{"x": 8, "y": 4},
{"x": 9, "y": 4},
{"x": 10, "y": 4},
{"x": 11, "y": 4}
]
},
"LAYOUT_ortho_5x12_1x2uC": {
"key_count": 59,
"layout": [
{"w": 1, "x": 0, "y": 0},
{"w": 1, "x": 1, "y": 0},
{"w": 1, "x": 2, "y": 0},
{"w": 1, "x": 3, "y": 0},
{"w": 1, "x": 4, "y": 0},
{"w": 1, "x": 5, "y": 0},
{"w": 1, "x": 6, "y": 0},
{"w": 1, "x": 7, "y": 0},
{"w": 1, "x": 8, "y": 0},
{"w": 1, "x": 9, "y": 0},
{"w": 1, "x": 10, "y": 0},
{"w": 1, "x": 11, "y": 0},
{"w": 1, "x": 0, "y": 1},
{"w": 1, "x": 1, "y": 1},
{"w": 1, "x": 2, "y": 1},
{"w": 1, "x": 3, "y": 1},
{"w": 1, "x": 4, "y": 1},
{"w": 1, "x": 5, "y": 1},
{"w": 1, "x": 6, "y": 1},
{"w": 1, "x": 7, "y": 1},
{"w": 1, "x": 8, "y": 1},
{"w": 1, "x": 9, "y": 1},
{"w": 1, "x": 10, "y": 1},
{"w": 1, "x": 11, "y": 1},
{"w": 1, "x": 0, "y": 2},
{"w": 1, "x": 1, "y": 2},
{"w": 1, "x": 2, "y": 2},
{"w": 1, "x": 3, "y": 2},
{"w": 1, "x": 4, "y": 2},
{"w": 1, "x": 5, "y": 2},
{"w": 1, "x": 6, "y": 2},
{"w": 1, "x": 7, "y": 2},
{"w": 1, "x": 8, "y": 2},
{"w": 1, "x": 9, "y": 2},
{"w": 1, "x": 10, "y": 2},
{"w": 1, "x": 11, "y": 2},
{"w": 1, "x": 0, "y": 3},
{"w": 1, "x": 1, "y": 3},
{"w": 1, "x": 2, "y": 3},
{"w": 1, "x": 3, "y": 3},
{"w": 1, "x": 4, "y": 3},
{"w": 1, "x": 5, "y": 3},
{"w": 1, "x": 6, "y": 3},
{"w": 1, "x": 7, "y": 3},
{"w": 1, "x": 8, "y": 3},
{"w": 1, "x": 9, "y": 3},
{"w": 1, "x": 10, "y": 3},
{"w": 1, "x": 11, "y": 3},
{"w": 1, "x": 0, "y": 4},
{"w": 1, "x": 1, "y": 4},
{"w": 1, "x": 2, "y": 4},
{"w": 1, "x": 3, "y": 4},
{"w": 1, "x": 4, "y": 4},
{"w": 2, "x": 5, "y": 4},
{"w": 1, "x": 7, "y": 4},
{"w": 1, "x": 8, "y": 4},
{"w": 1, "x": 9, "y": 4},
{"w": 1, "x": 10, "y": 4},
{"w": 1, "x": 11, "y": 4}
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 0, "y": 1},
{"x": 1, "y": 1},
{"x": 2, "y": 1},
{"x": 3, "y": 1},
{"x": 4, "y": 1},
{"x": 5, "y": 1},
{"x": 6, "y": 1},
{"x": 7, "y": 1},
{"x": 8, "y": 1},
{"x": 9, "y": 1},
{"x": 10, "y": 1},
{"x": 11, "y": 1},
{"x": 0, "y": 2},
{"x": 1, "y": 2},
{"x": 2, "y": 2},
{"x": 3, "y": 2},
{"x": 4, "y": 2},
{"x": 5, "y": 2},
{"x": 6, "y": 2},
{"x": 7, "y": 2},
{"x": 8, "y": 2},
{"x": 9, "y": 2},
{"x": 10, "y": 2},
{"x": 11, "y": 2},
{"x": 0, "y": 3},
{"x": 1, "y": 3},
{"x": 2, "y": 3},
{"x": 3, "y": 3},
{"x": 4, "y": 3},
{"x": 5, "y": 3},
{"x": 6, "y": 3},
{"x": 7, "y": 3},
{"x": 8, "y": 3},
{"x": 9, "y": 3},
{"x": 10, "y": 3},
{"x": 11, "y": 3},
{"x": 0, "y": 4},
{"x": 1, "y": 4},
{"x": 2, "y": 4},
{"x": 3, "y": 4},
{"x": 4, "y": 4},
{"x": 5, "y": 4, "w": 2},
{"x": 7, "y": 4},
{"x": 8, "y": 4},
{"x": 9, "y": 4},
{"x": 10, "y": 4},
{"x": 11, "y": 4}
]
},
"LAYOUT_ortho_5x12_2x2u": {
"key_count": 58,
"layout": [
{"w": 1, "x": 0, "y": 0},
{"w": 1, "x": 1, "y": 0},
{"w": 1, "x": 2, "y": 0},
{"w": 1, "x": 3, "y": 0},
{"w": 1, "x": 4, "y": 0},
{"w": 1, "x": 5, "y": 0},
{"w": 1, "x": 6, "y": 0},
{"w": 1, "x": 7, "y": 0},
{"w": 1, "x": 8, "y": 0},
{"w": 1, "x": 9, "y": 0},
{"w": 1, "x": 10, "y": 0},
{"w": 1, "x": 11, "y": 0},
{"w": 1, "x": 0, "y": 1},
{"w": 1, "x": 1, "y": 1},
{"w": 1, "x": 2, "y": 1},
{"w": 1, "x": 3, "y": 1},
{"w": 1, "x": 4, "y": 1},
{"w": 1, "x": 5, "y": 1},
{"w": 1, "x": 6, "y": 1},
{"w": 1, "x": 7, "y": 1},
{"w": 1, "x": 8, "y": 1},
{"w": 1, "x": 9, "y": 1},
{"w": 1, "x": 10, "y": 1},
{"w": 1, "x": 11, "y": 1},
{"w": 1, "x": 0, "y": 2},
{"w": 1, "x": 1, "y": 2},
{"w": 1, "x": 2, "y": 2},
{"w": 1, "x": 3, "y": 2},
{"w": 1, "x": 4, "y": 2},
{"w": 1, "x": 5, "y": 2},
{"w": 1, "x": 6, "y": 2},
{"w": 1, "x": 7, "y": 2},
{"w": 1, "x": 8, "y": 2},
{"w": 1, "x": 9, "y": 2},
{"w": 1, "x": 10, "y": 2},
{"w": 1, "x": 11, "y": 2},
{"w": 1, "x": 0, "y": 3},
{"w": 1, "x": 1, "y": 3},
{"w": 1, "x": 2, "y": 3},
{"w": 1, "x": 3, "y": 3},
{"w": 1, "x": 4, "y": 3},
{"w": 1, "x": 5, "y": 3},
{"w": 1, "x": 6, "y": 3},
{"w": 1, "x": 7, "y": 3},
{"w": 1, "x": 8, "y": 3},
{"w": 1, "x": 9, "y": 3},
{"w": 1, "x": 10, "y": 3},
{"w": 1, "x": 11, "y": 3},
{"w": 1, "x": 0, "y": 4},
{"w": 1, "x": 1, "y": 4},
{"w": 1, "x": 2, "y": 4},
{"w": 1, "x": 3, "y": 4},
{"w": 2, "x": 4, "y": 4},
{"w": 2, "x": 6, "y": 4},
{"w": 1, "x": 8, "y": 4},
{"w": 1, "x": 9, "y": 4},
{"w": 1, "x": 10, "y": 4},
{"w": 1, "x": 11, "y": 4}
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 0, "y": 1},
{"x": 1, "y": 1},
{"x": 2, "y": 1},
{"x": 3, "y": 1},
{"x": 4, "y": 1},
{"x": 5, "y": 1},
{"x": 6, "y": 1},
{"x": 7, "y": 1},
{"x": 8, "y": 1},
{"x": 9, "y": 1},
{"x": 10, "y": 1},
{"x": 11, "y": 1},
{"x": 0, "y": 2},
{"x": 1, "y": 2},
{"x": 2, "y": 2},
{"x": 3, "y": 2},
{"x": 4, "y": 2},
{"x": 5, "y": 2},
{"x": 6, "y": 2},
{"x": 7, "y": 2},
{"x": 8, "y": 2},
{"x": 9, "y": 2},
{"x": 10, "y": 2},
{"x": 11, "y": 2},
{"x": 0, "y": 3},
{"x": 1, "y": 3},
{"x": 2, "y": 3},
{"x": 3, "y": 3},
{"x": 4, "y": 3},
{"x": 5, "y": 3},
{"x": 6, "y": 3},
{"x": 7, "y": 3},
{"x": 8, "y": 3},
{"x": 9, "y": 3},
{"x": 10, "y": 3},
{"x": 11, "y": 3},
{"x": 0, "y": 4},
{"x": 1, "y": 4},
{"x": 2, "y": 4},
{"x": 3, "y": 4},
{"x": 4, "y": 4, "w": 2},
{"x": 6, "y": 4, "w": 2},
{"x": 8, "y": 4},
{"x": 9, "y": 4},
{"x": 10, "y": 4},
{"x": 11, "y": 4}
]
}
}

View file

@ -1,3 +0,0 @@
#pragma once
// place overrides here

View file

@ -1,24 +1,17 @@
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum o4l5x12_layers {
enum layer_names {
_QWERTY,
_LOWER
};
// Layers get their own keys. These are defined to make them not mess up
// the grid.
enum o4l5x12_keycodes {
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@ -31,15 +24,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI |Lower | Enter | Space | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_5x12_2x2u(
[_QWERTY] = LAYOUT_ortho_5x12_2x2u(
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_GESC, 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_LGUI, LOWER, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
),
/* Lower
/* Lower
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
@ -52,14 +45,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |UGlow | Reset| | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_5x12_2x2u(
[_LOWER] = LAYOUT_ortho_5x12_2x2u(
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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL,
RGB_M_P, KC_LCBR, KC_LBRC, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, KC_PIPE,
RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RESET, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@ -69,7 +61,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
@ -77,7 +68,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
}
return false;
break;
}
return true;
};

View file

@ -1,3 +0,0 @@
#pragma once
// place overrides here

View file

@ -1,27 +1,20 @@
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum preonic_layers {
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST
};
// Layers get their own keys. These are defined to make them not mess up
// the grid.
enum preonic_keycodes {
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty (Preonic Layer Style)
/* Qwerty (Preonic Layer Style)
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@ -34,15 +27,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_5x12(
[_QWERTY] = LAYOUT_ortho_5x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_ESC, 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,
RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
),
/* Lower (Preonic Layer Style)
/* Lower (Preonic Layer Style)
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
@ -55,15 +48,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_5x12(
[_LOWER] = LAYOUT_ortho_5x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
),
/* Raise (Preonic Layer Style)
/* Raise (Preonic Layer Style)
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@ -76,15 +69,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_5x12(
[_RAISE] = LAYOUT_ortho_5x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
),
/* Adjust (Lower + Raise) (Preonic Layer Style)
/* Adjust (Lower + Raise) (Preonic Layer Style)
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@ -97,14 +90,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_5x12(
[_ADJUST] = LAYOUT_ortho_5x12(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL,
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@ -114,7 +106,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
@ -124,7 +115,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
@ -134,7 +124,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
}
return true;
};

View file

@ -4,47 +4,44 @@
#define XXX KC_NO
#define LAYOUT_ortho_5x12( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
}
#define LAYOUT_ortho_5x12( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B } \
}
#define LAYOUT_ortho_5x12_1x2uC( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \
{ k40, k41, k42, k43, k44, k45, XXX, k47, k48, k49, k4a, k4b } \
}
#define LAYOUT_ortho_5x12_1x2uC( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4A, k4B \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \
{ k40, k41, k42, k43, k44, k45, XXX, k47, k48, k49, k4A, k4B } \
}
#define LAYOUT_ortho_5x12_2x2u( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \
{ k40, k41, k42, k43, k44, XXX, k46, XXX, k48, k49, k4a, k4b } \
}
#define LAYOUT_ortho_5x12_2x2u( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
k40, k41, k42, k43, k44, k46, k48, k49, k4A, k4B \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \
{ k40, k41, k42, k43, k44, XXX, k46, XXX, k48, k49, k4A, k4B } \
}

View file

@ -2,7 +2,7 @@
A ortholinear 5x12 keyboard made and sold by Keycapsss. [More info at Keycapsss.com](https://keycapsss.com).
<img src="https://i.imgur.com/5p8rDme.jpg" height="500px">
![o4l_5x12](https://i.imgur.com/5p8rDmel.jpg)
## Features:
@ -14,18 +14,16 @@ A ortholinear 5x12 keyboard made and sold by Keycapsss. [More info at Keycapsss.
---
- Keyboard Maintainer: BenRoe [GitHub](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe)
- Hardware Supported: Pro Micro
- Hardware Availability: [Keycapsss.com](https://keycapsss.com)
* Keyboard Maintainer: BenRoe [GitHub](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe)
* Hardware Supported: Pro Micro
* Hardware Availability: [Keycapsss.com](https://keycapsss.com)
Make firmware .hex for this keyboard (after setting up your build environment):
Make example for this keyboard (after setting up your build environment):
make keycapsss/o4l_5x12:default
Example of flashing this keyboard (or use [QMK Toolbox](https://github.com/qmk/qmk_toolbox)):
Flashing example for this keyboard:
make keycapsss/o4l_5x12:default:avrdude
make keycapsss/o4l_5x12:default:flash
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).

View file

@ -2,26 +2,23 @@
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 = caterina
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
# 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
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
LAYOUTS = ortho_5x12