Skip to content

Instantly share code, notes, and snippets.

@andywarburton
Created April 7, 2021 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andywarburton/ee54cf91f7e6e62b9e8bb6a1191ca0b6 to your computer and use it in GitHub Desktop.
Save andywarburton/ee54cf91f7e6e62b9e8bb6a1191ca0b6 to your computer and use it in GitHub Desktop.
/* Copyright 2021 REPLACE_WITH_YOUR_NAME
*
* 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"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6465
#define DEVICE_VER 0x0001
#define MANUFACTURER JWGAMEBOSS
#define PRODUCT JW60
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/*
* 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 { B1, B0, A6, A7, A8 }
#define MATRIX_COL_PINS { B6, B5, B12, B11, B10, B9, B15, B13, B8, A0, A1, A2, B7 }
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
/* Copyright 2021 REPLACE_WITH_YOUR_NAME
*
* 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
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
debug_enable=true;
debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
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_LSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL
),
[1] = LAYOUT(
KC_GRV, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
};
{
"keyboard_name": "JW60",
"url": "",
"maintainer": "qmk",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"K00 (B5,D0)", "x":0, "y":0},
{"label":"K01 (B5,D1)", "x":1, "y":0},
{"label":"K02 (B5,D2)", "x":2, "y":0},
{"label":"K03 (B5,D3)", "x":3, "y":0},
{"label":"K04 (B5,D5)", "x":4, "y":0},
{"label":"K05 (B5,B6)", "x":5, "y":0},
{"label":"K06 (B5,C6)", "x":6, "y":0},
{"label":"K07 (B5,C7)", "x":7, "y":0},
{"label":"K08 (B5,F1)", "x":8, "y":0},
{"label":"K09 (B5,F0)", "x":9, "y":0},
{"label":"K0A (B5,E6)", "x":10, "y":0},
{"label":"K0B (B5,B3)", "x":11, "y":0},
{"label":"K0C (B5,B2)", "x":12, "y":0},
{"label":"K0D (B5,B1)", "x":13, "y":0, "w":2},
{"label":"K10 (B4,D0)", "x":0, "y":1, "w":1.5},
{"label":"K11 (B4,D1)", "x":1.5, "y":1},
{"label":"K12 (B4,D2)", "x":2.5, "y":1},
{"label":"K13 (B4,D3)", "x":3.5, "y":1},
{"label":"K14 (B4,D5)", "x":4.5, "y":1},
{"label":"K15 (B4,B6)", "x":5.5, "y":1},
{"label":"K16 (B4,C6)", "x":6.5, "y":1},
{"label":"K17 (B4,C7)", "x":7.5, "y":1},
{"label":"K18 (B4,F1)", "x":8.5, "y":1},
{"label":"K19 (B4,F0)", "x":9.5, "y":1},
{"label":"K1A (B4,E6)", "x":10.5, "y":1},
{"label":"K1B (B4,B3)", "x":11.5, "y":1},
{"label":"K1C (B4,B2)", "x":12.5, "y":1},
{"label":"K1D (B4,B1)", "x":13.5, "y":1, "w":1.5},
{"label":"K20 (D7,D0)", "x":0, "y":2, "w":1.75},
{"label":"K21 (D7,D1)", "x":1.75, "y":2},
{"label":"K22 (D7,D2)", "x":2.75, "y":2},
{"label":"K23 (D7,D3)", "x":3.75, "y":2},
{"label":"K24 (D7,D5)", "x":4.75, "y":2},
{"label":"K25 (D7,B6)", "x":5.75, "y":2},
{"label":"K26 (D7,C6)", "x":6.75, "y":2},
{"label":"K27 (D7,C7)", "x":7.75, "y":2},
{"label":"K28 (D7,F1)", "x":8.75, "y":2},
{"label":"K29 (D7,F0)", "x":9.75, "y":2},
{"label":"K2A (D7,E6)", "x":10.75, "y":2},
{"label":"K2B (D7,B3)", "x":11.75, "y":2},
{"label":"K2D (D7,B1)", "x":12.75, "y":2, "w":2.25},
{"label":"K30 (D6,D0)", "x":0, "y":3, "w":2.25},
{"label":"K32 (D6,D2)", "x":2.25, "y":3},
{"label":"K33 (D6,D3)", "x":3.25, "y":3},
{"label":"K34 (D6,D5)", "x":4.25, "y":3},
{"label":"K35 (D6,B6)", "x":5.25, "y":3},
{"label":"K36 (D6,C6)", "x":6.25, "y":3},
{"label":"K37 (D6,C7)", "x":7.25, "y":3},
{"label":"K38 (D6,F1)", "x":8.25, "y":3},
{"label":"K39 (D6,F0)", "x":9.25, "y":3},
{"label":"K3A (D6,E6)", "x":10.25, "y":3},
{"label":"K3B (D6,B3)", "x":11.25, "y":3},
{"label":"K3D (D6,B1)", "x":12.25, "y":3, "w":2.75},
{"label":"K40 (D4,D0)", "x":0, "y":4, "w":1.25},
{"label":"K41 (D4,D1)", "x":1.25, "y":4, "w":1.25},
{"label":"K42 (D4,D2)", "x":2.5, "y":4, "w":1.25},
{"label":"K46 (D4,C6)", "x":3.75, "y":4, "w":6.25},
{"label":"K4A (D4,E6)", "x":10, "y":4, "w":1.25},
{"label":"K4B (D4,B3)", "x":11.25, "y":4, "w":1.25},
{"label":"K4C (D4,B2)", "x":12.5, "y":4, "w":1.25},
{"label":"K4D (D4,B1)", "x":13.75, "y":4, "w":1.25}
]
}
}
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
}
/* Copyright 2021 REPLACE_WITH_YOUR_NAME
*
* 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 "jw60.h"
/* Copyright 2021 REPLACE_WITH_YOUR_NAME
*
* 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 "quantum.h"
#define LAYOUT( \
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, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO }, \
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
}
/* Copyright 2021 REPLACE_WITH_YOUR_NAME
*
* 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
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
debug_enable=true;
debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
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_LSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL
),
[1] = LAYOUT(
KC_GRV, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
};
@andywarburton
Copy link
Author

andywarburton commented Apr 7, 2021

MCU = STM32F303
BOARD = QMK_PROTON_C

# Build Options
#   change yes to no to disable
#
BOOTMAGIC_ENABLE = yes       # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
CONSOLE_ENABLE = yes        # Console for debug(+400)
COMMAND_ENABLE = yes         # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = yes       # 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 = yes            # USB Nkey Rollover
BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no         # Unicode
BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no           # Audio output on port C6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment