summaryrefslogtreecommitdiff
path: root/keyboards/jones
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/jones')
-rw-r--r--keyboards/jones/v03/config.h9
-rw-r--r--keyboards/jones/v03/info.json5
-rw-r--r--keyboards/jones/v03_1/config.h10
-rw-r--r--keyboards/jones/v03_1/info.json6
-rw-r--r--keyboards/jones/v1/config.h4
-rw-r--r--keyboards/jones/v1/info.json13
-rw-r--r--keyboards/jones/v1/keymaps/default/keymap.c12
-rw-r--r--keyboards/jones/v1/keymaps/via/config.h31
-rw-r--r--keyboards/jones/v1/keymaps/via/keymap.c70
-rw-r--r--keyboards/jones/v1/keymaps/via/rules.mk2
10 files changed, 37 insertions, 125 deletions
diff --git a/keyboards/jones/v03/config.h b/keyboards/jones/v03/config.h
index 1d6b6e7ad9..212bad3b77 100644
--- a/keyboards/jones/v03/config.h
+++ b/keyboards/jones/v03/config.h
@@ -37,10 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 }
#define MATRIX_COL_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 }
-/* COL2ROW, ROW2COL*/
-// No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix.
-//#define DIODE_DIRECTION COL2ROW
-
/* Audio */
#ifdef AUDIO_ENABLE
#define AUDIO_PIN C6
@@ -48,11 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_CLICKY
#endif
- #define RGBLED_NUM 6 // Left(4) + Right(2)
- #define RGBLIGHT_HUE_STEP 8
- #define RGBLIGHT_SAT_STEP 8
- #define RGBLIGHT_VAL_STEP 8
- // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== Lighting Layers ==*/
#define RGBLIGHT_LAYERS
// #define RGBLIGHT_MAX_LAYERS 2
diff --git a/keyboards/jones/v03/info.json b/keyboards/jones/v03/info.json
index 6b4dbb0884..41b3937c02 100644
--- a/keyboards/jones/v03/info.json
+++ b/keyboards/jones/v03/info.json
@@ -14,6 +14,11 @@
{"pin_a": "B3", "pin_b": "B2"}
]
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 6
+ },
"ws2812": {
"pin": "B7"
},
diff --git a/keyboards/jones/v03_1/config.h b/keyboards/jones/v03_1/config.h
index b3eb44a156..eae7755da6 100644
--- a/keyboards/jones/v03_1/config.h
+++ b/keyboards/jones/v03_1/config.h
@@ -37,10 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 }
#define MATRIX_COL_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 }
-/* COL2ROW, ROW2COL*/
-// No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix.
-//#define DIODE_DIRECTION COL2ROW
-
/* Audio */
#ifdef AUDIO_ENABLE
#define AUDIO_PIN C6
@@ -48,12 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_CLICKY
#endif
- #define RGBLED_NUM 14 // Left(4) + Right(2) + Under(8)
- #define RGBLIGHT_LED_MAP {0,1,2,3,13,12,4,5,6,7,8,9,10,11} // Left --> Right --> Under
- #define RGBLIGHT_HUE_STEP 8
- #define RGBLIGHT_SAT_STEP 8
- #define RGBLIGHT_VAL_STEP 8
- // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== Lighting Layers ==*/
#define RGBLIGHT_LAYERS
// #define RGBLIGHT_MAX_LAYERS 2
diff --git a/keyboards/jones/v03_1/info.json b/keyboards/jones/v03_1/info.json
index d0fec4e571..41694a733c 100644
--- a/keyboards/jones/v03_1/info.json
+++ b/keyboards/jones/v03_1/info.json
@@ -14,6 +14,12 @@
{"pin_a": "B3", "pin_b": "B2"}
]
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 14,
+ "led_map": [0, 1, 2, 3, 13, 12, 4, 5, 6, 7, 8, 9, 10, 11]
+ },
"ws2812": {
"pin": "F0"
},
diff --git a/keyboards/jones/v1/config.h b/keyboards/jones/v1/config.h
index 3017ca2ab0..e36574e56a 100644
--- a/keyboards/jones/v1/config.h
+++ b/keyboards/jones/v1/config.h
@@ -25,10 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
/* RGBLIGHT */
- #define RGBLED_NUM 4 // Left(2) + Right(2)
- #define RGBLIGHT_HUE_STEP 8
- #define RGBLIGHT_SAT_STEP 8
- #define RGBLIGHT_VAL_STEP 8
/*== Lighting Layers ==*/
#define RGBLIGHT_LAYERS
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF // Overriding RGB Lighting on/off status
diff --git a/keyboards/jones/v1/info.json b/keyboards/jones/v1/info.json
index cd0286ef6b..5d300a7994 100644
--- a/keyboards/jones/v1/info.json
+++ b/keyboards/jones/v1/info.json
@@ -12,6 +12,11 @@
"cols": ["B3", "B2", "E6", "D6", "D4", "B0", "B1", "B7", "B4", "D7"],
"rows": ["B3", "B2", "E6", "D6", "D4", "B0", "B1", "B7", "B4", "D7"]
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 4
+ },
"ws2812": {
"pin": "F1"
},
@@ -104,13 +109,7 @@
{"label": "k93", "matrix": [9, 3], "x": 11, "y": 4, "w": 1.25},
{"label": "k47", "matrix": [4, 7], "x": 12.25, "y": 4, "w": 1.25},
{"label": "k91", "matrix": [9, 1], "x": 13.5, "y": 4},
- {"label": "k41", "matrix": [4, 1], "x": 14.5, "y": 4},
-
- {"label": "k85", "matrix": [8, 5], "x": 0, "y": 5},
- {"label": "k86", "matrix": [8, 6], "x": 1, "y": 5},
-
- {"label": "k95", "matrix": [9, 5], "x": 14, "y": 5},
- {"label": "k96", "matrix": [9, 6], "x": 15, "y": 5}
+ {"label": "k41", "matrix": [4, 1], "x": 14.5, "y": 4}
]
}
}
diff --git a/keyboards/jones/v1/keymaps/default/keymap.c b/keyboards/jones/v1/keymaps/default/keymap.c
index 04da840a77..752c06f815 100644
--- a/keyboards/jones/v1/keymaps/default/keymap.c
+++ b/keyboards/jones/v1/keymaps/default/keymap.c
@@ -34,31 +34,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_SCLN, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LEFT, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_MUTE, KC_LNG2, KC_LGUI, KC_LALT, SP_LOW, SP_RAI, KC_BSPC, SP_RAI,KC_RALT, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT,
- KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU
+ KC_MUTE, KC_LNG2, KC_LGUI, KC_LALT, SP_LOW, SP_RAI, KC_BSPC, SP_RAI,KC_RALT, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
),
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
- _______, _______, _______, _______, _______, _______, _______, SP_ADJ,_______, _______, _______, _______, _______,
- _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, SP_ADJ,_______, _______, _______, _______, _______
),
[_RAISE] = LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT,
_______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F11, KC_F12,
- _______, _______, _______, _______, SP_ADJ, _______, _______, _______,_______, _______, _______, KC_DOWN, KC_UP,
- _______, _______, _______, _______
+ _______, _______, _______, _______, SP_ADJ, _______, _______, _______,_______, _______, _______, KC_DOWN, KC_UP
),
[_ADJUST] = LAYOUT(
_______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, RGB_RMOD, _______,
_______, AU_TOGG, CK_TOGG, MU_TOGG, MU_NEXT, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_MOD, _______,
KC_CAPS, KC_CAPS, CK_RST, CK_DOWN, CK_UP, AU_PREV, AU_NEXT, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______,
- _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______
)
};
diff --git a/keyboards/jones/v1/keymaps/via/config.h b/keyboards/jones/v1/keymaps/via/config.h
deleted file mode 100644
index a66ab80904..0000000000
--- a/keyboards/jones/v1/keymaps/via/config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-Copyright 2021 Takeshi Nishio
-
-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
-
-//------------------------------------------------------------------------------
-// Rotary Encoder
-//------------------------------------------------------------------------------
-// Encoder triggers specific key matrix position,
-// when turn knob clockwise or counterclockwise.
-// This is handy to assign key codes by VIA.
-
-// Mappings of encoder rotation to key position in key matrix.
-// First encoder, Left side : k85, k86
-// Second encoder, Right side : k95, k96
-#define ENCODERS_CW_KEY { { 6, 8 }, { 6, 9 } }
-#define ENCODERS_CCW_KEY { { 5, 8 }, { 5, 9 } }
diff --git a/keyboards/jones/v1/keymaps/via/keymap.c b/keyboards/jones/v1/keymaps/via/keymap.c
index 3b41c40174..3f9b9faa86 100644
--- a/keyboards/jones/v1/keymaps/via/keymap.c
+++ b/keyboards/jones/v1/keymaps/via/keymap.c
@@ -37,48 +37,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, JP_Q, JP_W, JP_E, JP_R, JP_T, JP_AT, JP_LBRC, JP_Y, JP_U, JP_I, JP_O, JP_P, KC_BSPC,
KC_LCTL, JP_A, JP_S, JP_D, JP_F, JP_G, JP_COLN, JP_RBRC, JP_H, JP_J, JP_K, JP_L, JP_SCLN, KC_ENT,
KC_LSFT, KC_LSFT, JP_Z, JP_X, JP_C, JP_V, JP_B, JP_SLSH, JP_BSLS, JP_N, JP_M, JP_COMM, JP_DOT, KC_DOWN, KC_UP,
- KC_MUTE, KC_LGUI, KC_LALT, JP_MHEN, SP_LOW, SP_RAI, KC_BSPC, SP_RAI,SP_RAI, JP_HENK, JP_KANA, KC_LEFT, KC_RGHT,
- KC_VOLD, KC_VOLU, KC_VOLD, KC_VOLU
+ KC_MUTE, KC_LGUI, KC_LALT, JP_MHEN, SP_LOW, SP_RAI, KC_BSPC, SP_RAI,SP_RAI, JP_HENK, JP_KANA, KC_LEFT, KC_RGHT
),
[_BASE2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______,_______, KC_P0, KC_PDOT, _______, _______,
- _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, _______,_______, KC_P0, KC_PDOT, _______, _______
),
[_BASE3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______,
- _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, JP_EXLM, JP_DQUO, JP_HASH, JP_DLR, JP_PERC, JP_TILD, JP_PIPE, JP_AMPR, JP_QUOT, JP_LPRN, JP_RPRN, JP_EQL, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, SP_ADJ, _______, SP_ADJ,SP_ADJ, _______, _______, _______, _______,
- _______, _______, _______, _______
+ _______, _______, _______, _______, _______, SP_ADJ, _______, SP_ADJ,SP_ADJ, _______, _______, _______, _______
),
[_RAISE] = 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_ESC, JP_1, JP_2, JP_3, JP_4, JP_5, JP_CIRC, JP_YEN, JP_6, JP_7, JP_8, JP_9, JP_0, KC_DEL,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
_______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
- _______, _______, _______, _______, SP_ADJ, _______, _______, _______,_______, _______, _______, KC_DOWN, KC_UP,
- _______, _______, _______, _______
+ _______, _______, _______, _______, SP_ADJ, _______, _______, _______,_______, _______, _______, KC_DOWN, KC_UP
),
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS,
_______, DF(_BASE1),DF(_BASE2),DF(_BASE3),_______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, RGB_RMOD, _______,
_______, AU_TOGG, CK_TOGG, MU_TOGG, MU_NEXT, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_MOD, _______,
KC_CAPS, KC_CAPS, CK_RST, CK_DOWN, CK_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______,
- _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______
),
};
@@ -164,50 +158,16 @@ bool led_update_user(led_t led_state) {
}
#endif
-
-//------------------------------------------------------------------------------
-// Rotary Encoder
-//------------------------------------------------------------------------------
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;
-
-void encoder_action_unregister(void) {
- for (int index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
-
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
-}
-
-bool encoder_update_user(uint8_t index, bool clockwise) {
- encoder_action_register(index, clockwise);
- return true;
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
+ [4] = { ENCODER_CCW_CW(_______, _______) },
+ [5] = { ENCODER_CCW_CW(_______, _______) },
};
-
+#endif
//------------------------------------------------------------------------------
// Keyboard Initialization
diff --git a/keyboards/jones/v1/keymaps/via/rules.mk b/keyboards/jones/v1/keymaps/via/rules.mk
index e1d2dc0582..f1adcab005 100644
--- a/keyboards/jones/v1/keymaps/via/rules.mk
+++ b/keyboards/jones/v1/keymaps/via/rules.mk
@@ -1,2 +1,2 @@
-# Use VIA
VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes