Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bm60v2_poker #15001

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cccf229
1
bdtc123 Nov 1, 2021
5b170c6
Update keyboards/bm60v2_poker/rules.mk
bdtc123 Nov 2, 2021
32af580
Update keyboards/bm60v2_poker/rules.mk
bdtc123 Nov 2, 2021
a2366a2
Update keyboards/bm60v2_poker/rules.mk
bdtc123 Nov 2, 2021
07b542d
Update keyboards/bm60v2_poker/rules.mk
bdtc123 Nov 2, 2021
f84a06d
Update keyboards/bm60v2_poker/keymaps/via/keymap.c
bdtc123 Nov 2, 2021
52bf529
Update keyboards/bm60v2_poker/bm60v2_poker.c
bdtc123 Nov 2, 2021
4e6fbb9
Update keyboards/bm60v2_poker/bm60v2_poker.h
bdtc123 Nov 2, 2021
4a7b2ad
Update keyboards/bm60v2_poker/config.h
bdtc123 Nov 2, 2021
4bc665d
Update keyboards/bm60v2_poker/config.h
bdtc123 Nov 2, 2021
5e16004
Update keyboards/bm60v2_poker/config.h
bdtc123 Nov 2, 2021
7bc76d7
Update keyboards/bm60v2_poker/config.h
bdtc123 Nov 2, 2021
dcf8834
Update keyboards/bm60v2_poker/info.json
bdtc123 Nov 2, 2021
f123d89
Update keyboards/bm60v2_poker/bm60v2_poker.c
bdtc123 Nov 2, 2021
e871e06
Update keyboards/bm60v2_poker/keymaps/via/keymap.c
bdtc123 Nov 2, 2021
89a1353
Update keyboards/bm60v2_poker/keymaps/default/keymap.c
bdtc123 Nov 2, 2021
87fcef3
Update bm60v2_poker.c
bdtc123 Nov 2, 2021
b5674f0
Update bm60v2_poker.h
bdtc123 Nov 2, 2021
5fd95c5
Update keymap.c
bdtc123 Nov 2, 2021
1159754
Update keyboards/bm60v2_poker/keymaps/via/keymap.c
bdtc123 Nov 2, 2021
7ae8bfe
Update keyboards/bm60v2_poker/keymaps/default/keymap.c
bdtc123 Nov 2, 2021
758d2ca
Update keymap.c
bdtc123 Nov 2, 2021
7b125b6
Update keymap.c
bdtc123 Nov 2, 2021
84aadb6
Update keyboards/bm60v2_poker/config.h
bdtc123 Nov 2, 2021
7e362f0
Update keyboards/bm60v2_poker/config.h
bdtc123 Nov 5, 2021
bd79e66
Update keyboards/bm60v2_poker/rules.mk
bdtc123 Nov 5, 2021
6a69eb6
Update config.h
bdtc123 Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions keyboards/bm60v2_poker/bm60v2_poker.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#include "bm60v2_poker.h"
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved

#ifdef RGB_MATRIX_ENABLE
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
{ 0, B_4, A_4, C_4 },
{ 0, B_5, A_5, C_5 },
{ 0, B_6, A_6, C_6 },
{ 0, B_7, A_7, C_7 },
{ 0, B_8, A_8, C_8 },
{ 0, B_9, A_9, C_9 },
{ 0, B_10, A_10, C_10 },
{ 0, B_11, A_11, C_11 },
{ 0, B_12, A_12, C_12 },
{ 0, B_13, A_13, C_13 },
{ 0, B_14, A_14, C_14 },

{ 0, E_1, D_1, F_1 },
{ 0, E_2, D_2, F_2 },
{ 0, E_3, D_3, F_3 },
{ 0, E_4, D_4, F_4 },
{ 0, E_5, D_5, F_5 },
{ 0, E_6, D_6, F_6 },
{ 0, E_7, D_7, F_7 },
{ 0, E_8, D_8, F_8 },
{ 0, E_9, D_9, F_9 },
{ 0, E_10, D_10, F_10 },
{ 0, E_11, D_11, F_11 },
{ 0, E_12, D_12, F_12 },
{ 0, E_13, D_13, F_13 },
{ 0, E_14, D_14, F_14 },

{ 0, H_1, G_1, I_1 },
{ 0, H_2, G_2, I_2 },
{ 0, H_3, G_3, I_3 },
{ 0, H_4, G_4, I_4 },
{ 0, H_5, G_5, I_5 },
{ 0, H_6, G_6, I_6 },
{ 0, H_7, G_7, I_7 },
{ 0, H_8, G_8, I_8 },
{ 0, H_9, G_9, I_9 },
{ 0, H_10, G_10, I_10 },
{ 0, H_11, G_11, I_11 },
{ 0, H_12, G_12, I_12 },
{ 0, H_14, G_14, I_14 },

{ 0, K_1, J_1, L_1 },
{ 0, K_2, J_2, L_2 },
{ 0, K_3, J_3, L_3 },
{ 0, K_4, J_4, L_4 },
{ 0, K_5, J_5, L_5 },
{ 0, K_6, J_6, L_6 },
{ 0, K_7, J_7, L_7 },
{ 0, K_8, J_8, L_8 },
{ 0, K_9, J_9, L_9 },
{ 0, K_10, J_10, L_10 },
{ 0, K_11, J_11, L_11 },
{ 0, K_13, J_13, L_13 },

{ 0, H_16, G_16, I_16 },
{ 0, H_15, G_15, I_15 },
{ 0, H_13, G_13, I_13 },
{ 0, E_15, D_15, F_15 },
{ 0, K_15, J_15, L_15 },
{ 0, K_16, J_16, L_16 },
{ 0, K_12, J_12, L_12 },
{ 0, E_16, D_16, F_16 }
};

led_config_t g_led_config = {
{
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 },
{ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 },
{ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40 },
{ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, NO_LED, 52 },
{ 53, 54, 55, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, 59, NO_LED, 60 }
}, {
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 },
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], ,
{ 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 },
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter
{ 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 },
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up,
{ 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 },
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
{ 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }
}, {
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], ,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
1, 1, 1, 4, 1, 1, 1, 1
}
};

__attribute__ ((weak))
void rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF);
}
}
#endif

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
if (record->event.pressed) {
switch(keycode) {
#if defined(RGB_MATRIX_DISABLE_KEYCODES)
case RGB_MATRIX_TOGGLE: // toggle rgb matrix
rgb_matrix_toggle();
return false;
case RGB_MATRIX_STEP:
rgb_matrix_step();
return false;
case RGB_MATRIX_INC_HUE:
rgb_matrix_increase_hue();
return false;
case RGB_MATRIX_DEC_HUE:
rgb_matrix_decrease_hue();
return false;
case RGB_MATRIX_INC_SAT:
rgb_matrix_increase_sat();
return false;
case RGB_MATRIX_DEC_SAT:
rgb_matrix_decrease_sat();
return false;
case RGB_MATRIX_INC_VAL:
rgb_matrix_increase_val();
return false;
case RGB_MATRIX_DEC_VAL:
rgb_matrix_decrease_val();
return false;
#endif
default:
break;
}
}
return true;
}
47 changes: 47 additions & 0 deletions keyboards/bm60v2_poker/bm60v2_poker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#pragma once

#include "quantum.h"

#define LAYOUT( \
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \
K40, K41, K42, K45, K49, K4A, K4B, K4D \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D }, \
}

#if defined(RGB_MATRIX_DISABLE_KEYCODES)
# ifndef RGB_MATRIX_TOGGLE
# define RGB_MATRIX_TOGGLE KC_F16
# endif
# ifndef RGB_MATRIX_STEP
# define RGB_MATRIX_STEP KC_F17
# endif
# ifndef RGB_MATRIX_INC_HUE
# define RGB_MATRIX_INC_HUE KC_F18
# endif
# ifndef RGB_MATRIX_DEC_HUE
# define RGB_MATRIX_DEC_HUE KC_F19
# endif
# ifndef RGB_MATRIX_INC_SAT
# define RGB_MATRIX_INC_SAT KC_F20
# endif
# ifndef RGB_MATRIX_DEC_SAT
# define RGB_MATRIX_DEC_SAT KC_F21
# endif
# ifndef RGB_MATRIX_INC_VAL
# define RGB_MATRIX_INC_VAL KC_F22
# endif
# ifndef RGB_MATRIX_DEC_VAL
# define RGB_MATRIX_DEC_VAL KC_F23
# endif
#endif
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved



71 changes: 71 additions & 0 deletions keyboards/bm60v2_poker/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#pragma once
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0x4B50
#define PRODUCT_ID 0x1122
#define DEVICE_VER 0x0002
#define MANUFACTURER KP REPUBLIC
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
#define PRODUCT BM60V2_poker
#define DESCRIPTION BM60V2_poker RGB keyboard
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved

/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14

/*
* 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 { E6, D2, D3, D5, F6 }
#define MATRIX_COL_PINS { B2, B3, B7, B0, B1, F7, D4, D6, D7, B4, B5, B6, C6, C7 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL
#define USB_POLLING_INTERVAL_MS 1

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved

/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
//rgb light setting
#define RGBLIGHT_LIMIT_VAL 150
#define RGBLED_NUM 6
#define RGB_DI_PIN F0
#define RGBLIGHT_ANIMATIONS
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define DISABLE_RGB_MATRIX_RAINDROPS
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
# define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
# define DRIVER_COUNT 2
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
# define DRIVER_1_LED_TOTAL 61
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL

#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE)
#define RGB_MATRIX_DISABLE_KEYCODES
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
#endif
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180

78 changes: 78 additions & 0 deletions keyboards/bm60v2_poker/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"keyboard_name": "bm60v2_poker",
"url": "",
"maintainer": "kp republic",
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
"width": 15,
"height": 5,
Comment on lines +5 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"width": 15,
"height": 5,

"layouts": {
"LAYOUT": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"LAYOUT": {
"LAYOUT_60_ansi": {

"layout": [
{"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":12, "y":0},
{"x":13, "y":0, "w":2},

{"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.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},

{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":14, "y":3,"w":2.75},

{"x":0, "y":4, "w":1.25},
{"x":1.25, "y":4, "w":1.25},
{"x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"x":10, "y":4,"w":1.25},
{"x":11.25, "y":4,"w":1.25},
{"x":12.5, "y":4,"w":1.25},
{"x":13.75, "y":4,"w":1.25}
]
}
}
}
36 changes: 36 additions & 0 deletions keyboards/bm60v2_poker/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include QMK_KEYBOARD_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include QMK_KEYBOARD_H

/* Copyright 2021 REPLACE_WITH_YOUR_NAME
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace the placeholder with the real name and GitHub user name, as suggested at https://docs.qmk.fm/#/pr_checklist?id=example-gplv2-header.

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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL
),
[1] = LAYOUT(
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
_______, 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,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
_______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, _______, _______, _______, _______,
bdtc123 marked this conversation as resolved.
Show resolved Hide resolved
_______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),

};
Loading