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

New layer added to giabalanai keyboard #20118

Merged
merged 6 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 7 additions & 11 deletions keyboards/giabalanai/config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 3araht
Copyright 2023 3araht

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 @@ -36,16 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define SELECT_SOFT_SERIAL_SPEED 1
/*Sets the protocol speed when using serial communication*/
//Speeds:
//0: about 189kbps (Experimental only)
//1: about 137kbps (default)
//2: about 75kbps
//3: about 39kbps
//4: about 26kbps
//5: about 20kbps

// Right side has to be the master since 1, LED data is output from right side, and 2, Audio pin is prepared on right side as a reserve.
#define MASTER_RIGHT

Expand Down Expand Up @@ -227,3 +217,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define NO_ACTION_TAPPING
// NO_ACTION_ONESHOT -388 bytes
#define NO_ACTION_ONESHOT
/*
* Encoder options
*/
#ifdef ENCODER_ENABLE
# define ENCODER_RESOLUTIONS_RIGHT { 4 }
#endif // ENCODER_ENABLE
12 changes: 12 additions & 0 deletions keyboards/giabalanai/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@
"pid": "0xF4B0",
"device_version": "0.0.1"
},
"features": {
"midi": true,
"extrakey": true,
"encoder": true,
"bootmagic": false,
"console": false,
"mousekey": false,
"nkro": false,
"rgblight": false,
"audio": false
},
"encoder": {
"rotary": []
},
"split": {
"enabled": true,
"soft_serial_pin": "D2",
"encoder": {
"right": {
Expand Down
16 changes: 16 additions & 0 deletions keyboards/giabalanai/keymaps/2firmware/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2023 3araht

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

//#define USE_MATRIX_I2C
Expand Down
74 changes: 50 additions & 24 deletions keyboards/giabalanai/keymaps/3araht/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,18 @@ user_config_t user_config;

// Defines names for use in layer keycodes and the keymap
enum layer_names {
_C_SYSTEM_BASE, // MIDI C-system
_FAKE_B_SYSTEM, // MIDI fake B-system doesn't have correct assignments on top two rows. The bottom 3 rows are B-system.
_C_SYSTEM_BASS2ROW, // counter bass system
_C_SYSTEM_ENTIRELY, // single notes for both left and right keybaords.
_C_SYSTEM_FREEBASS, // C-system Free Bass
_C_SYSTEM_BASE, // MIDI C-system
_FAKE_B_SYSTEM, // MIDI fake B-system doesn't have correct assignments on top two rows. The bottom 3 rows are B-system.
_C_SYSTEM_BASS2ROW, // counter bass system
_FAKE_B_SYSTEM_BASS2ROW, // MIDI fake B-system doesn't have correct assignments on top two rows. The bottom 3 rows are B-system. Counter bass version.
_C_SYSTEM_ENTIRELY, // single notes for both left and right keybaords.
_C_SYSTEM_FREEBASS, // C-system Free Bass
_CHROMATONE,
_CFLIP_BASS2ROW, // 180 degree flipped layout on right side keyboard
_CFLIP_BASS2ROW, // 180 degree flipped layout on right side keyboard
_QWERTY,
_COLEMAK,
_ADJUST, // for Fn keys, etc.
_FN // for changing layers, octaves, etc.
_ADJUST, // for Fn keys, etc.
_FN // for changing layers, octaves, etc.
};

// Defines the keycodes used by our macros in process_record_user
Expand Down Expand Up @@ -181,6 +182,7 @@ enum custom_keycodes {
CSYSTEM, // C-SYSTEM layout
BSYSTEM, // B-SYSTEM layout
CNTBASC, // CouNTer BASs C-system layout
CNTBASB, // CouNTer BASs B-system layout
CSYSALL, // C-SYStem ALL layout
CSYSFBS, // C-SYStem Free BaSs
CHRTONE, // CHRomaTONE layout
Expand Down Expand Up @@ -240,6 +242,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
MI_A2, MI_C3, MI_Eb3, MI_Fs3, MI_A3, MI_C4, MI_Eb4, MI_Fs4, MI_A4, MI_C5, MI_Eb5, MI_Fs5
),

/* fake B-system */
[_FAKE_B_SYSTEM_BASS2ROW] = LAYOUT(
MI_CH_Fr, MI_CH_Cr, MI_CH_Gr, MI_CH_Dr, MI_CH_Ar, MI_CH_Er, MI_CH_Br, MI_CH_Fsr, MI_CH_Csr, MI_CH_Gsr, MI_CH_Dsr, MI_CH_Asr,
MI_CH_Dbr, MI_CH_Abr, MI_CH_Ebr, MI_CH_Bbr, MI_CH_Fr, MI_CH_Cr, MI_CH_Gr, MI_CH_Dr, MI_CH_Ar, MI_CH_Er, MI_CH_Br, MI_CH_Fsr,
MI_CH_Db, MI_CH_Ab, MI_CH_Eb, MI_CH_Bb, MI_CH_F, MI_CH_C, MI_CH_G, MI_CH_D, MI_CH_A, MI_CH_E, MI_CH_B, MI_CH_Fs,
MI_CH_Dbm, MI_CH_Abm, MI_CH_Ebm, MI_CH_Bbm, MI_CH_Fm, MI_CH_Cm, MI_CH_Gm, MI_CH_Dm, MI_CH_Am, MI_CH_Em, MI_CH_Bm, MI_CH_Fsm,
MI_CH_DbDom7, MI_CH_AbDom7, MI_CH_EbDom7, MI_CH_BbDom7, MI_CH_FDom7, MI_CH_CDom7, MI_CH_GDom7, MI_CH_DDom7, MI_CH_ADom7, MI_CH_EDom7, MI_CH_BDom7, MI_CH_FsDom7,

MI_Ab2,
MI_A2, MI_C3, MI_Eb3, MI_Gb3, MI_A3, MI_C4, MI_Eb4, MI_Gb4, MI_A4, MI_C5, MI_Eb5, MI_Gb5, _______,
MI_G2, MI_Bb2, MI_Db3, MI_E3, MI_G3, MI_Bb3, MI_Db4, MI_E4, MI_G4, MI_Bb4, MI_Db5, MI_E5, MI_G5,
MI_Ab2, MI_B2, MI_D3, MI_F3, MI_Ab3, MI_B3, MI_D4, MI_F4, MI_Ab4, MI_B4, MI_D5, MI_F5
),

/* C-system entirely */
[_C_SYSTEM_ENTIRELY] = LAYOUT(
MI_BNDU, XXXXXXX, XXXXXXX, MI_Db, MI_E, MI_G, MI_Bb, MI_Db1, MI_E1, MI_G1, MI_Bb1, MI_Db2,
Expand Down Expand Up @@ -340,32 +356,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Fn */
[_FN] = LAYOUT(
CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, CSYSFBS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG,
CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, CSYSFBS, CNTBASB, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG,
DF_QWER, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
DF_COLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TGLMICH,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,

XXXXXXX,
MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, VERSION, EE_CLR, _______,
CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, CSYSFBS, XXXXXXX, XXXXXXX, MI_VELD, MI_VELU, XXXXXXX, RGB_TOG,
CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, CSYSFBS, CNTBASB, XXXXXXX, MI_VELD, MI_VELU, XXXXXXX, RGB_TOG,
XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TGLUVEL, MELDYAL, MELODYS, MELDYAH
)
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_C_SYSTEM_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_FAKE_B_SYSTEM] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_BASS2ROW] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_ENTIRELY] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_FREEBASS] = { ENCODER_CCW_CW(_______, _______) },
[_CHROMATONE] = { ENCODER_CCW_CW(_______, _______) },
[_CFLIP_BASS2ROW] = { ENCODER_CCW_CW(_______, _______) },
[_QWERTY] = { ENCODER_CCW_CW(_______, _______) },
[_COLEMAK] = { ENCODER_CCW_CW(_______, _______) },
[_ADJUST] = { ENCODER_CCW_CW(_______, _______) },
[_FN] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_FAKE_B_SYSTEM] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_BASS2ROW] = { ENCODER_CCW_CW(_______, _______) },
[_FAKE_B_SYSTEM_BASS2ROW] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_ENTIRELY] = { ENCODER_CCW_CW(_______, _______) },
[_C_SYSTEM_FREEBASS] = { ENCODER_CCW_CW(_______, _______) },
[_CHROMATONE] = { ENCODER_CCW_CW(_______, _______) },
[_CFLIP_BASS2ROW] = { ENCODER_CCW_CW(_______, _______) },
[_QWERTY] = { ENCODER_CCW_CW(_______, _______) },
[_COLEMAK] = { ENCODER_CCW_CW(_______, _______) },
[_ADJUST] = { ENCODER_CCW_CW(_______, _______) },
[_FN] = { ENCODER_CCW_CW(_______, _______) },
};
#endif

Expand All @@ -383,7 +400,7 @@ const rgblight_segment_t PROGMEM my_adjust_layer[] = RGBLIGHT_LAYER_SEGMENTS({1,

// Light up fn layer keys
const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( // left keyboard
{0, 7, HSV_ORANGE}, // MIDI layouts
{0, 8, HSV_ORANGE}, // MIDI layouts
{11, 1, HSV_RED}, // RGB_TOG
{12, 1, HSV_WHITE}, // DF_QWER
{13, 1, HSV_CORAL}, // TGLBASS
Expand All @@ -410,15 +427,16 @@ const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{53, 1, HSV_PINK},
#endif
// right keyboard
{60, 7, HSV_ORANGE}, // MIDI layouts
{60, 8, HSV_ORANGE}, // MIDI layouts
{74, 1, HSV_CORAL}, // TGLBASS
{85, 1, HSV_BLUE}, // MIDI Oct
{86, 1, HSV_CYAN}, // MIDI Oct
{87, 1, HSV_SPRINGGREEN}, // MIDI Oct
{88, 1, HSV_GREEN}, // MIDI Oct
{89, 1, HSV_CHARTREUSE}, // MIDI Oct
{95, 1, HSV_GOLD}, // VERSION
{96, 1, HSV_PINK}, // EE_CLR
{98, 7, HSV_ORANGE}, // MIDI layouts
{98, 8, HSV_ORANGE}, // MIDI layouts
{107, 1, HSV_YELLOW}, // MI_VELD
{108, 1, HSV_GREEN}, // MI_VELU
{110, 1, HSV_RED}, // RGB_TOG
Expand Down Expand Up @@ -530,6 +548,7 @@ void switch_keylight_color4bass(keyrecord_t *record, uint8_t keylocation){
keylight_manager(record, HSV_ORANGE, keylocation);
break;
case _C_SYSTEM_BASS2ROW:
case _FAKE_B_SYSTEM_BASS2ROW:
keylight_manager(record, HSV_YELLOW, keylocation);
break;
case _CFLIP_BASS2ROW:
Expand All @@ -546,6 +565,7 @@ void switch_keylight_color4chords(keyrecord_t *record, uint8_t keylocation){
keylight_manager(record, HSV_YELLOW, keylocation);
break;
case _C_SYSTEM_BASS2ROW:
case _FAKE_B_SYSTEM_BASS2ROW:
keylight_manager(record, HSV_GOLDENROD, keylocation);
break;
case _CFLIP_BASS2ROW:
Expand Down Expand Up @@ -596,6 +616,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;

case CNTBASB:
if (record->event.pressed) {
set_single_persistent_default_layer(_FAKE_B_SYSTEM_BASS2ROW);
}
break;

case CSYSALL:
if (record->event.pressed) {
set_single_persistent_default_layer(_C_SYSTEM_ENTIRELY);
Expand Down
16 changes: 16 additions & 0 deletions keyboards/giabalanai/keymaps/default_giabarinaix2/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2023 3araht

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

#define GIABARINAIX2
Expand Down
16 changes: 16 additions & 0 deletions keyboards/giabalanai/keymaps/giabarinaix2led/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2023 3araht

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

#define GIABARINAIX2
Expand Down
Loading