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 Maja soldered keyboard #10152

Merged
merged 10 commits into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from 3 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
46 changes: 46 additions & 0 deletions keyboards/kbdfans/maja_soldered/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Copyright 2020 dztech kbdfans
*
* 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"

#define VENDOR_ID 0x4B42
#define PRODUCT_ID 0x6069
#define DEVICE_VER 0x0001
#define MANUFACTURER KBDFANS
#define PRODUCT MAJA_SOLDERED
#define DESCRIPTION MAJA SOLDERED keyboard
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved

#define MATRIX_ROWS 5
#define MATRIX_COLS 15
#define MATRIX_ROW_PINS { F0, B6, D6, B4, D7 }
#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, B0, B1, B2, B3, B7, D2, D3, D5 }
#define DIODE_DIRECTION COL2ROW

#define DEBOUNCE 3

/* number of backlight levels */
#define BACKLIGHT_PIN B5
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif

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

81 changes: 81 additions & 0 deletions keyboards/kbdfans/maja_soldered/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"keyboard_name": "MAJA_SOLDERED",
"url": "",
"maintainer": "DZTECH",
"width": 18.75,
"height": 5.5,
"layouts": {
"LAYOUT": {
"layout": [
{"x": 0.75, "y": 0.25},
{"x": 1.75, "y": 0.25},
{"x": 2.75, "y": 0},
{"x": 3.75, "y": 0.25},
{"x": 4.75, "y": 0.25},
{"x": 5.75, "y": 0.25},
{"x": 6.75, "y": 0.25},
{"x": 8.75, "y": 0.25},
{"x": 9.75, "y": 0.25},
{"x": 10.75, "y": 0.25},
{"x": 11.75, "y": 0.25},
{"x": 12.75, "y": 0},
{"x": 13.75, "y": 0.25},
{"x": 14.75, "y": 0.25},
{"x": 15.75, "y": 0.25},
{"x": 17.75, "y": 0.25},
{"x": 0.5, "y": 1.25, "w": 1.5},
{"x": 2, "y": 1.25},
{"x": 3, "y": 1.25},
{"x": 4, "y": 1.25},
{"x": 5, "y": 1.25},
{"x": 6, "y": 1.25},
{"x": 8.5, "y": 1.25},
{"x": 9.5, "y": 1.25},
{"x": 10.5, "y": 1.25},
{"x": 11.5, "y": 1.25},
{"x": 12.5, "y": 1.25},
{"x": 13.5, "y": 1.25},
{"x": 14.5, "y": 1.25},
{"x": 15.5, "y": 1.25, "w": 1.5},
{"x": 17.75, "y": 1.25},
{"x": 0.25, "y": 2.25, "w": 1.75},
{"x": 2, "y": 2.25},
{"x": 3, "y": 2.25},
{"x": 4, "y": 2.25},
{"x": 5, "y": 2.25},
{"x": 6, "y": 2.25},
{"x": 9, "y": 2.25},
{"x": 10, "y": 2.25},
{"x": 11, "y": 2.25},
{"x": 12, "y": 2.25},
{"x": 13, "y": 2.25},
{"x": 14, "y": 2.25},
{"x": 15, "y": 2.25, "w": 2.25},
{"x": 17.75, "y": 2.25},
{"x": 0, "y": 3.25, "w": 2.25},
{"x": 2.25, "y": 3.25},
{"x": 3.25, "y": 3.25},
{"x": 4.25, "y": 3.25},
{"x": 5.25, "y": 3.25},
{"x": 6.25, "y": 3.25},
{"x": 8.25, "y": 3.25},
{"x": 9.25, "y": 3.25},
{"x": 10.25, "y": 3.25},
{"x": 11.25, "y": 3.25},
{"x": 12.25, "y": 3.25},
{"x": 13.25, "y": 3.25},
{"x": 14.25, "y": 3.25, "w": 2.25},
{"x": 16.75, "y": 3.5},
{"x": 0, "y": 4.25, "w": 1.5},
{"x": 3, "y": 4.25, "w": 1.5},
{"x": 4.5, "y": 4.25, "w": 2},
{"x": 6.5, "y": 4.25, "w": 1.25},
{"x": 8.25, "y": 4.25, "w": 2.75},
{"x": 11, "y": 4.25, "w": 1.5},
{"x": 15.75, "y": 4.5},
{"x": 16.75, "y": 4.5},
{"x": 17.75, "y": 4.5}
]
}
}
}
31 changes: 31 additions & 0 deletions keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2020 dztech kbdfans
*
* 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( /* Base */
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_DEL, KC_HOME,
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_BSLASH, KC_PGUP,
CTL_T(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_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
[1] = LAYOUT( /* FN */
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, RESET,KC_TRNS,KC_HOME,
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
};
17 changes: 17 additions & 0 deletions keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include QMK_KEYBOARD_H


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
[0] = LAYOUT( /* Base */
BL_STEP, 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_DEL, KC_HOME,
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_BSLASH, KC_PGUP,
CTL_T(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_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
[1] = LAYOUT( /* FN */
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, RESET,KC_TRNS,KC_HOME,
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,
CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
};
2 changes: 2 additions & 0 deletions keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
29 changes: 29 additions & 0 deletions keyboards/kbdfans/maja_soldered/maja_soldered.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Copyright 2020 dztech kbdfans
*
* 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 "maja_soldered.h"

void matrix_init_kb(void) {
setPinOutput(D4);
matrix_init_user();
}

bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(D4, !led_state.caps_lock);
}
return res;
}
19 changes: 19 additions & 0 deletions keyboards/kbdfans/maja_soldered/maja_soldered.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include "quantum.h"

#define XXX KC_NO

#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K3E, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K40, K42, K43, K45, K47, K49, K4C, K4D, K4E \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
{ K40, XXX, K42, K43, XXX, K45, XXX, K47, XXX, K49, XXX, XXX, K4C, K4D, K4E } \
}
14 changes: 14 additions & 0 deletions keyboards/kbdfans/maja_soldered/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# MAJA_SOLDERED

![MAJA_SOLDERED](https://i.ibb.co/4Kq0wfp/20200816100310.png)
![MAJA_SOLDERED](https://i.ibb.co/3vJM805/20200816100345.png)

* Keyboard Maintainer: [DZTECH](https://github.com/moyi4681)
* Hardware Supported: MAJA_SOLDERED
* Hardware Availability: [KBDFans](https://kbdfans.cn/)

Make example for this keyboard (after setting up your build environment):

make kbdfans/maja_soldered:default

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).
33 changes: 33 additions & 0 deletions keyboards/kbdfans/maja_soldered/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# MCU name
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
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
BOOTLOADER = atmel-dfu

# Build Options
# change yes to no to disable
#
FORCE_NKRO = yes
BOOTMAGIC_ENABLE = lite # 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
# 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 = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
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
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved