Skip to content

Commit

Permalink
Adding Mario Keyboard
Browse files Browse the repository at this point in the history
Signed-off-by: Yuting Wang <[email protected]>
  • Loading branch information
YkieWang committed Jun 11, 2024
1 parent 5ac802e commit 12ce535
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 43 deletions.
26 changes: 1 addition & 25 deletions keyboards/mario/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
Copyright 2019 @foostan
Copyright 2020 Drashna Jaelre <@drashna>
Copyright 2024 @yuting wang
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 @@ -21,31 +20,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DYNAMIC_KEYMAP_LAYER_COUNT 5
#define TAPPING_TERM 180

//#define USE_MATRIX_I2C
#ifdef KEYBOARD_crkbd_rev1_legacy
# undef USE_I2C
# define USE_SERIAL
#endif
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define USE_SERIAL_PD2

#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# define RGBLED_NUM 54
# undef RGBLED_SPLIT
# define RGBLED_SPLIT \
{ 27, 27 }
# define RGBLIGHT_LIMIT_VAL 120
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
#endif


#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
#define SPLIT_POINTING_ENABLE
#ifdef SPLIT_POINTING_ENABLE
Expand All @@ -58,15 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif


#ifdef ENCODER_ENABLE
#define ENCODERS_PAD_A { F4 }
#define ENCODERS_PAD_B { F5 }
#define ENCODER_RESOLUTIONS_LEFT { 30 }
#define ENCODERS_PAD_A_RIGHT { }
#define ENCODERS_PAD_B_RIGHT { }
#define ENCODER_RESOLUTIONS_RIGHT { }
#endif

#define POINTING_DEVICE_AUTO_MOUSE_ENABLE
// only required if not setting mouse layer elsewhere
#define AUTO_MOUSE_DEFAULT_LAYER 4
Expand Down
3 changes: 1 addition & 2 deletions keyboards/mario/info.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"keyboard_name": "mario",
"maintainer": "yuting wang",
"processor": "RP2040",
"processor": "atmega32u4",
"rgb_matrix": {
"driver": "ws2812"
},
"features": {
"bootmagic": true,
"extrakey": true,
"lto": true,
"mousekey": true,
"nkro": true,
"oled": true
Expand Down
12 changes: 2 additions & 10 deletions keyboards/mario/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
Copyright 2019 @foostan
Copyright 2020 Drashna Jaelre <@drashna>
Copyright 2024 @yuting wang
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 Down Expand Up @@ -33,12 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_ANIMATIONS

#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# define RGBLED_NUM 54
# undef RGBLED_SPLIT
# define RGBLED_SPLIT \
{ 27, 27 }
# define RGBLIGHT_LIMIT_VAL 120
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
Expand Down Expand Up @@ -70,11 +63,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define ANALOG_JOYSTICK_SPEED_MAX 20
#endif


#ifdef ENCODER_ENABLE
#define ENCODERS_PAD_A { F4 }
#define ENCODERS_PAD_B { F5 }
#define ENCODER_RESOLUTIONS_LEFT { 30 }
#define ENCODER_RESOLUTIONS_LEFT { 2 }
#define ENCODERS_PAD_A_RIGHT { }
#define ENCODERS_PAD_B_RIGHT { }
#define ENCODER_RESOLUTIONS_RIGHT { }
Expand Down
4 changes: 2 additions & 2 deletions keyboards/mario/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 QMK
// Copyright 2024 Yuting Wang
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
Expand Down Expand Up @@ -87,7 +87,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[2] = { ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
[3] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
[3] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
[4] = { ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) },
};
#endif
Expand Down
3 changes: 3 additions & 0 deletions keyboards/mario/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VIAL_ENABLE = yes
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes
5 changes: 1 addition & 4 deletions keyboards/mario/rules.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
CONSOLE_ENABLE = yes
CONSOLE_ENABLE = no
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = analog_joystick
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes
VIA_ENABLE = yes
VIAL_ENABLE = yes
RGBLIGHT_ENABLE = yes
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
COMBO_ENABLE = no
Expand Down

0 comments on commit 12ce535

Please sign in to comment.