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

[keyboard] Add Bm60poker support #10475

Merged
merged 23 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
38 changes: 3 additions & 35 deletions keyboards/bm60poker/bm60poker.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2020 REPLACE_WITH_YOUR_NAME
/* Copyright 2020 ipetepete
*
* 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
Expand All @@ -15,36 +15,7 @@
*/
#include "bm60poker.h"

// Override these in your individual keymap file
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up

matrix_init_user();
}

void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)

matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware

return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

led_set_user(usb_led);
}


// DO NOT EDIT
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
ipetepete marked this conversation as resolved.
Show resolved Hide resolved
{ 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 },
Expand Down Expand Up @@ -78,7 +49,4 @@ led_config_t g_led_config = { {
// UNDERGLOW
2, 2, 2, 2, 2, 2
} };


// generated by KBFirmware JSON to QMK Parser
// https://noroadsleft.github.io/kbf_qmk_converter/
#endif
7 changes: 2 additions & 5 deletions keyboards/bm60poker/bm60poker.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2020 REPLACE_WITH_YOUR_NAME
/* Copyright 2020 ipetepete
*
* 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
Expand All @@ -17,7 +17,7 @@

#include "quantum.h"

#define LAYOUT( \
#define LAYOUT_60_ansi( \
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, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
Expand All @@ -30,6 +30,3 @@
{ KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \
}

// generated by KBFirmware JSON to QMK Parser
// https://noroadsleft.github.io/kbf_qmk_converter/
6 changes: 1 addition & 5 deletions keyboards/bm60poker/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* USB Device descriptor parameter */
#define VENDOR_ID 0x4B50 // "KP"
#define PRODUCT_ID 0xEF8C
#define PRODUCT_ID 0xEF8E
#define DEVICE_VER 0x0001
#define MANUFACTURER KP Republic
#define PRODUCT BM60POKER
#define DESCRIPTION An RGB 60% hotswappable standard ansi layout board

/* key matrix size */
#define MATRIX_ROWS 5
Expand Down Expand Up @@ -69,6 +68,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
#endif

// generated by KBFirmware JSON to QMK Parser
// https://noroadsleft.github.io/kbf_qmk_converter/
4 changes: 1 addition & 3 deletions keyboards/bm60poker/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"width": 15,
"height": 5,
"layouts": {
"LAYOUT": {
"key_count": 61,
"LAYOUT_60_ansi": {
"layout": [
{"label":"K00 (B0,D0)", "x":0, "y":0},
{"label":"K01 (B0,D1)", "x":1, "y":0},
Expand Down Expand Up @@ -72,5 +71,4 @@
]
}
}
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
}
4 changes: 2 additions & 2 deletions keyboards/bm60poker/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
[0] = LAYOUT_60_ansi(
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_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, KC_RGUI, MO(1), KC_RCTL
),
[1] = LAYOUT(
[1] = LAYOUT_60_ansi(
RESET, 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,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
33 changes: 24 additions & 9 deletions keyboards/bm60poker/keymaps/ipetepete/keymap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@

/* Copyright 2020 ipetepete
*
* 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
ipetepete marked this conversation as resolved.
Show resolved Hide resolved

enum layers {
Expand All @@ -11,8 +27,7 @@ _spcfn


enum keycodes {
glight = SAFE_RANGE,
gamer,
gamer = SAFE_RANGE,
qwerty,
colemak
};
Expand All @@ -22,43 +37,43 @@ colemak
bool show_wasd = false;

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_qwerty] = LAYOUT(
[_qwerty] = LAYOUT_60_ansi(
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_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,
CTL_T(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_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_SPFN, KC_RALT, KC_RCTL, MO(_fn), MO(_rgb)
),
// Gamer standard qwerty layout but with normal space for jumping etc
[_gamer] = LAYOUT(
[_gamer] = LAYOUT_60_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_SPACE, _______, _______, _______, _______
),
[_colemak] = LAYOUT(
[_colemak] = LAYOUT_60_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______,
_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______,
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______,
_______, _______, _______, KC_SPFN, _______, _______, _______, _______
),
[_fn] = LAYOUT(
[_fn] = LAYOUT_60_ansi(
KC_GESC, 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_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT,
qwerty, colemak, gamer, _______, _______, _______, _______, _______
),
[_rgb] = LAYOUT(
[_rgb] = LAYOUT_60_ansi(
_______, 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,
_______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
[_spcfn] = LAYOUT(
[_spcfn] = LAYOUT_60_ansi(
_______, SGUI(1), SGUI(2), SGUI(3), SGUI(4), SGUI(5), SGUI(6), SGUI(7), SGUI(8), SGUI(9), SGUI(0), _______, _______, KC_DEL,
_______, _______, _______, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, _______, _______,
KC_CAPS, _______, _______, KC_PGDN, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
Expand Down Expand Up @@ -108,7 +123,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
void rgb_matrix_indicators_kb(void)
{
if (!g_suspend_state && rgb_matrix_config.enable) {
switch (biton32(layer_state)) {
switch (get_highest_layer(layer_state)) {
//case _qwerty:
// rgb_matrix_set_color(26, 0xFF, 0x00, 0x00);
// break;
Expand Down
18 changes: 6 additions & 12 deletions keyboards/bm60poker/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,17 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
BOOTMAGIC_ENABLE = no # 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
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
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
RGB_MATRIX_ENABLE = WS2812
ipetepete marked this conversation as resolved.
Show resolved Hide resolved
ipetepete marked this conversation as resolved.
Show resolved Hide resolved

# generated by KBFirmware JSON to QMK Parser
# https://noroadsleft.github.io/kbf_qmk_converter/