From dbfe1d9c97325881c495a6e2876b336b7a23cf67 Mon Sep 17 00:00:00 2001 From: nuphy-src Date: Mon, 6 May 2024 01:08:45 +0800 Subject: [PATCH] Made some modifications to the Gem80 Keyboard. --- keyboards/nuphy/gem80/ansi/ansi.c | 19 +++++++++++++++++++ keyboards/nuphy/gem80/ansi/info.json | 2 +- .../ansi/keymaps/via/NuPhy Gem80 via3.json | 8 -------- .../nuphy/gem80/ansi/keymaps/via/keymap.c | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/keyboards/nuphy/gem80/ansi/ansi.c b/keyboards/nuphy/gem80/ansi/ansi.c index 6047446b4747..2ca9a530aaf5 100644 --- a/keyboards/nuphy/gem80/ansi/ansi.c +++ b/keyboards/nuphy/gem80/ansi/ansi.c @@ -682,6 +682,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) } return false; + case RGB_VAI: + + if(rgb_matrix_config.hsv.v == RGB_MATRIX_MAXIMUM_BRIGHTNESS - RGB_MATRIX_VAL_STEP * 2) { + if(dev_info.link_mode == LINK_USB) { + rgb_matrix_increase_val(); + } + return true; + } + else if(rgb_matrix_config.hsv.v == RGB_MATRIX_MAXIMUM_BRIGHTNESS - RGB_MATRIX_VAL_STEP) { + return false; + } + return true; + + case RGB_VAD: + if(rgb_matrix_config.hsv.v == RGB_MATRIX_MAXIMUM_BRIGHTNESS) { + rgb_matrix_decrease_val(); + } + return true; + default: return true; } diff --git a/keyboards/nuphy/gem80/ansi/info.json b/keyboards/nuphy/gem80/ansi/info.json index c85fe74dc6b7..ef02401d1ff6 100644 --- a/keyboards/nuphy/gem80/ansi/info.json +++ b/keyboards/nuphy/gem80/ansi/info.json @@ -38,7 +38,7 @@ "rgb_matrix": { "driver": "ws2812", "center_point": [80, 20], - "max_brightness": 190, + "max_brightness": 228, "val_steps": 38, "speed_steps": 52, "animations": { diff --git a/keyboards/nuphy/gem80/ansi/keymaps/via/NuPhy Gem80 via3.json b/keyboards/nuphy/gem80/ansi/keymaps/via/NuPhy Gem80 via3.json index 80f831851ca9..89bb7cfddbf6 100644 --- a/keyboards/nuphy/gem80/ansi/keymaps/via/NuPhy Gem80 via3.json +++ b/keyboards/nuphy/gem80/ansi/keymaps/via/NuPhy Gem80 via3.json @@ -145,14 +145,6 @@ "name": "Mac\nDnt", "title": "Mac Dnt" }, - { - "name": "Print\nWhole", - "title": "PrintWhole" - }, - { - "name": "Print\nArea", - "title": "PrintArea" - }, { "name": "Win\nlock", "title": "Win lock" diff --git a/keyboards/nuphy/gem80/ansi/keymaps/via/keymap.c b/keyboards/nuphy/gem80/ansi/keymaps/via/keymap.c index f55db2150ab6..210fdd4c6c93 100644 --- a/keyboards/nuphy/gem80/ansi/keymaps/via/keymap.c +++ b/keyboards/nuphy/gem80/ansi/keymaps/via/keymap.c @@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // layer Mac [0] = LAYOUT( - KC_ESC, KC_BRID, KC_BRIU, MAC_TASK, MAC_SEARCH, MAC_VOICE, MAC_DND, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PAUSE, KC_SCRL, MAC_PRTA, KC_NO, + KC_ESC, KC_SCRL, KC_PAUSE, MAC_TASK, MAC_SEARCH, MAC_VOICE, MAC_DND, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PAUSE, KC_SCRL, MAC_PRTA, KC_NO, 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_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, 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,