Skip to content

Commit

Permalink
[Keyboard] Add om60 rev1 keyboard (#18126)
Browse files Browse the repository at this point in the history
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: jun10000 <[email protected]>
  • Loading branch information
4 people authored Sep 24, 2022
1 parent e3e0a35 commit 6cf4af9
Show file tree
Hide file tree
Showing 11 changed files with 556 additions and 0 deletions.
104 changes: 104 additions & 0 deletions keyboards/om60/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
Copyright 2021 Salicylic_Acid
Copyright 2021 3araht
Copyright 2022 jun10000
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"


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

// wiring of each half
#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, E6 }

/* 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

/* ws2812 RGB LED */
#define RGB_DI_PIN D3

#ifndef RGBLED_NUM
#define RGBLED_NUM 69
#define RGBLIGHT_LED_MAP { \
0, 1, 2, 3, \
8, 7, 6, 5, 4, \
9,10,11,12,13, \
18,17,16,15,14, \
19,20,21,22,23, \
28,27,26,25,24, \
29,30,31,32,33, \
38,37,36,35,34, \
39,40,41,42,43, \
48,47,46,45,44, \
49,50,51,52,53, \
58,57,56,55,54, \
59,60,61,62,63, \
68,67,66,65,64 \
}

#define RGBLIGHT_SLEEP
#endif

#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
#define RGBLIGHT_EFFECT_TWINKLE

#ifndef IOS_DEVICE_ENABLE
#define RGBLIGHT_LIMIT_VAL 90
#define RGBLIGHT_VAL_STEP 17
#else
#define RGBLIGHT_LIMIT_VAL 30
#define RGBLIGHT_VAL_STEP 4
#endif
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif

#define TAP_CODE_DELAY 10

#define ENCODERS_PAD_A { B4 }
#define ENCODERS_PAD_B { B5 }
16 changes: 16 additions & 0 deletions keyboards/om60/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"keyboard_name": "OM60",
"manufacturer": "jun10000",
"url": "https://github.com/jun10000",
"maintainer": "jun10000",
"usb": {
"vid": "0x6A6E",
"pid": "0x0001",
"device_version": "1.0.0"
},
"layouts": {
"LAYOUT": {
"layout": [{"label":"0,0", "x":0, "y":0}, {"label":"4,0", "x":1.5, "y":0}, {"label":"4,1", "x":2.5, "y":0}, {"label":"4,2", "x":3.5, "y":0}, {"label":"4,3", "x":4.5, "y":0}, {"label":"4,4", "x":5.5, "y":0}, {"label":"4,5", "x":6.5, "y":0}, {"label":"4,6", "x":7.5, "y":0}, {"label":"4,7", "x":8.5, "y":0}, {"label":"9,0", "x":9.5, "y":0}, {"label":"9,1", "x":10.5, "y":0}, {"label":"9,2", "x":11.5, "y":0}, {"label":"9,3", "x":12.5, "y":0}, {"label":"9,4", "x":13.5, "y":0}, {"label":"0,1", "x":1.5, "y":1}, {"label":"0,2", "x":2.5, "y":1}, {"label":"0,3", "x":3.5, "y":1}, {"label":"0,4", "x":4.5, "y":1}, {"label":"0,5", "x":5.5, "y":1}, {"label":"0,6", "x":6.5, "y":1}, {"label":"0,7", "x":7.5, "y":1}, {"label":"5,0", "x":8.5, "y":1}, {"label":"5,1", "x":9.5, "y":1}, {"label":"5,2", "x":10.5, "y":1}, {"label":"5,3", "x":11.5, "y":1}, {"label":"5,4", "x":12.5, "y":1}, {"label":"5,5", "x":13.5, "y":1}, {"label":"1,0", "x":0, "y":2}, {"label":"1,1", "x":1.5, "y":2}, {"label":"1,2", "x":2.5, "y":2}, {"label":"1,3", "x":3.5, "y":2}, {"label":"1,4", "x":4.5, "y":2}, {"label":"1,5", "x":5.5, "y":2}, {"label":"1,6", "x":6.5, "y":2}, {"label":"1,7", "x":7.5, "y":2}, {"label":"6,0", "x":8.5, "y":2}, {"label":"6,1", "x":9.5, "y":2}, {"label":"6,2", "x":10.5, "y":2}, {"label":"6,3", "x":11.5, "y":2}, {"label":"6,4", "x":12.5, "y":2}, {"label":"6,5", "x":13.5, "y":2}, {"label":"2,0", "x":0, "y":3}, {"label":"2,1", "x":1.5, "y":3}, {"label":"2,2", "x":2.5, "y":3}, {"label":"2,3", "x":3.5, "y":3}, {"label":"2,4", "x":4.5, "y":3}, {"label":"2,5", "x":5.5, "y":3}, {"label":"2,6", "x":6.5, "y":3}, {"label":"2,7", "x":7.5, "y":3}, {"label":"7,0", "x":8.5, "y":3}, {"label":"7,1", "x":9.5, "y":3}, {"label":"7,2", "x":10.5, "y":3}, {"label":"7,3", "x":11.5, "y":3}, {"label":"7,4", "x":12.5, "y":3}, {"label":"7,5", "x":13.5, "y":3}, {"label":"3,0", "x":0, "y":4}, {"label":"3,1", "x":1.5, "y":4}, {"label":"3,2", "x":2.5, "y":4}, {"label":"3,3", "x":3.5, "y":4}, {"label":"3,4", "x":4.5, "y":4}, {"label":"3,5", "x":5.5, "y":4}, {"label":"3,6", "x":6.5, "y":4}, {"label":"3,7", "x":7.5, "y":4}, {"label":"8,0", "x":8.5, "y":4}, {"label":"8,1", "x":9.5, "y":4}, {"label":"8,2", "x":10.5, "y":4}, {"label":"8,3", "x":11.5, "y":4}, {"label":"8,4", "x":12.5, "y":4}, {"label":"8,5", "x":13.5, "y":4}]
}
}
}
70 changes: 70 additions & 0 deletions keyboards/om60/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
Copyright 2021 Salicylic_Acid
Copyright 2021 3araht
Copyright 2022 jun10000
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

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(_______, _______) },
[2] = { ENCODER_CCW_CW(_______, _______) },
};
#endif

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
//,-----------------------------------------------------------------------------------------------------------------------------.
KC_MUTE, KC_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_BSPC,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2),KC_LCTRL, KC_LGUI, KC_LALT, KC_DEL, KC_LBRC, KC_SPC, KC_SPC, KC_RBRC, KC_RALT, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT
//|-----------------------------------------------------------------------------------------------------------------------------'
),
[1] = 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_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_BSPC, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_ENT, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
//|-----------------------------------------------------------------------------------------------------------------------------'
),
[2] = LAYOUT(
//,-----------------------------------------------------------------------------------------------------------------------------.
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, KC_UP, _______, _______, _______,RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
//|-----------------------------------------------------------------------------------------------------------------------------'
)
};
2 changes: 2 additions & 0 deletions keyboards/om60/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LTO_ENABLE = yes
ENCODER_MAP_ENABLE = yes
84 changes: 84 additions & 0 deletions keyboards/om60/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
Copyright 2021 Salicylic_Acid
Copyright 2021 3araht
Copyright 2022 jun10000
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

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(_______, _______) },
[2] = { ENCODER_CCW_CW(_______, _______) },
[3] = { ENCODER_CCW_CW(_______, _______) },
};
#endif

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
//,-----------------------------------------------------------------------------------------------------------------------------.
KC_MUTE, KC_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_BSPC,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2),KC_LCTRL, KC_LGUI, KC_LALT, KC_DEL, KC_LBRC, KC_SPC, KC_SPC, KC_RBRC, KC_RALT, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT
//|-----------------------------------------------------------------------------------------------------------------------------'
),
[1] = 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_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_BSPC, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_ENT, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
//|-----------------------------------------------------------------------------------------------------------------------------'
),
[2] = LAYOUT(
//,-----------------------------------------------------------------------------------------------------------------------------.
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, KC_UP, _______, _______, _______,RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
//|-----------------------------------------------------------------------------------------------------------------------------'
),
[3] = LAYOUT(
//,-----------------------------------------------------------------------------------------------------------------------------.
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
TO(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
//|-----------------------------------------------------------------------------------------------------------------------------'
)
};
3 changes: 3 additions & 0 deletions keyboards/om60/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
ENCODER_MAP_ENABLE = yes
Loading

0 comments on commit 6cf4af9

Please sign in to comment.