[keyboard]Add v1 to jones keyboard (#14405)

* Change for latest information.

* Update from v03_1 to v1.

* Add v1 files.

* Remove finished todo comment.

* Fix COLUMN number, from "a" to "9".

* Formatting

* Update keyboards/jones/v1/rules.mk

* Add license header.

https://github.com/qmk/qmk_firmware/pull/14405#discussion_r710752035

* Implement better way to handle keycode for encoder.

Use "action_exec" instead of "tap_code16"
https://github.com/qmk/qmk_firmware/pull/14405#discussion_r710752924

* Move External EEPROM config  to keyboard level

* Move the lest of DYNAMIC_KEYMAP config  to keyboard level

https://github.com/qmk/qmk_firmware/pull/14405#discussion_r711668094

* Move the rest of DYNAMIC_KEYMAP config  to keyboard level

https://github.com/qmk/qmk_firmware/pull/14405#discussion_r711668094

* Update keyboards/jones/v1/rules.mk

* Update keyboards/jones/v1/rules.mk

* Update keyboards/jones/v1/rules.mk
This commit is contained in:
Takeshi Nishio 2022-03-10 13:14:53 +09:00 committed by GitHub
parent 8bcb77cb9a
commit 9d0153dc70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 612 additions and 11 deletions

View File

@ -1,23 +1,22 @@
# Jones # Jones
![Jones, ANSI style](https://github.com/jpskenn/Jones/raw/master/assets/IMG_2204.jpeg) ![Jones, "Wide" layout](https://raw.githubusercontent.com/jpskenn/Jones/master/assets/_DSF0714.jpeg)
![Jones, JP style](https://github.com/jpskenn/Jones/raw/master/assets/DSC_7189.jpeg) A symmetrical 60% keyboard combined with Ortho-Linear and Row-staggered. It has gapless Row 2 - Row 3.
GH60 case compatible PCB and keyplate.
A 60% keyboard combined with Ortho-Linear and Row-staggered. It has gapless R2-R3 row. [More info](https://github.com/jpskenn/Jones)
GH60 case compatible PCB and keyplate.
* Keyboard Maintainer: [jpskenn](https://github.com/jpskenn) * Keyboard Maintainer: [jpskenn](https://github.com/jpskenn)
* Hardware Supported: Jones PCB, Keyplate * Hardware Supported: PCB, Key plate, Bottom plate
* Hardware Availability: [GitHub](https://github.com/jpskenn/Jones), [BOOTH](https://jpskenn.booth.pm) * Hardware Availability: [GitHub](https://github.com/jpskenn/Jones), [BOOTH](https://jpskenn.booth.pm), [Yushakobo](https://yushakobo.jp)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make jones/v03_1:default_ansi make jones/v1:default
Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)): Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)):
make jones/v03_1:default_ansi:flash make jones/v1:default:flash
To reset the keyboard into bootloader mode, press the reset switch on the underside. To reset the keyboard into bootloader mode, press the reset switch on the underside.

View File

@ -1 +1 @@
DEFAULT_FOLDER = jones/v03_1 DEFAULT_FOLDER = jones/v1

View File

@ -0,0 +1,83 @@
/*
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
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xB9DD
#define PRODUCT_ID 0x175A
#define DEVICE_VER 0x0100
#define MANUFACTURER jpskenn
#define PRODUCT Jones
/* key matrix size */
// Same number for Round-Robin matrix.
#define MATRIX_ROWS 10
#define MATRIX_COLS 10
// Same pins for Round-Robin matrix.
#define MATRIX_ROW_PINS { B3, B2, E6, D6, D4, B0, B1, B7, B4, D7 }
#define MATRIX_COL_PINS { B3, B2, E6, D6, D4, B0, B1, B7, B4, D7 }
#define DIODE_DIRECTION COL2ROW
/* Rotary Encoder */
#define ENCODERS_PAD_A { F5, D2 }
#define ENCODERS_PAD_B { F4, D3 }
#define ENCODER_RESOLUTION 4 //the default & suggested is 4
/* Audio */
#ifdef AUDIO_ENABLE
#define AUDIO_PIN C6
#define AUDIO_CLICKY
#define MUSIC_MAP
#endif
/* RGBLIGHT */
#define RGB_DI_PIN F1
#ifdef RGB_DI_PIN
#define RGBLED_NUM 4 // Left(2) + Right(2)
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
/*== Lighting Layers ==*/
#define RGBLIGHT_LAYERS
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF // Overriding RGB Lighting on/off status
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
/* Bootmagic Lite trigger key. Left-Top of the layout. */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 9
/* External EEPROM */
// Use 24LC64 EEPROM
#define EEPROM_I2C_24LC64
// Set MAX_ADDR to specify actual EEPROM size.
// If it's not set, EEPROM size will be set ATmega32u4's 1023.
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191
// How many layers to use with VIA / Remap.
#define DYNAMIC_KEYMAP_LAYER_COUNT 6 // default:4

View File

@ -0,0 +1,17 @@
{
"keyboard_name": "Jones",
"url": "https://github.com/jpskenn/Jones",
"maintainer": "jpskenn",
"layouts": {
"LAYOUT": {
"layout": [
{"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0},
{"x":0.5, "y":1, "w":1.5}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1, "w":1.5},
{"x":0.5, "y":2, "w":1.5}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2, "w":1.5},
{"x":0.5, "y":3}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3},
{"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.5}, {"x":6.5, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4, "w":1.5}, {"x":11, "y":4, "w":1.25}, {"x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4},
{"x":0, "y":5}, {"x":1, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}
]
}
}
}

View File

@ -0,0 +1,64 @@
/* 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/>.
*/
#include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_number {
_BASE = 0,
_LOWER,
_RAISE,
_ADJUST,
};
// Key Macro
#define SP_LOW LT(_LOWER, KC_SPC)
#define SP_RAI LT(_RAISE, KC_SPC)
#define SP_ADJ LT(_ADJUST, KC_SPC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
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_LANG2, 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
),
[_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,_______, _______, _______, _______, _______,
_______, _______, _______, _______
),
[_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,
_______, _______, _______, _______
),
[_ADJUST] = LAYOUT(
_______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, RGB_RMOD, _______,
_______, AU_TOG, CK_TOGG, MU_TOG, MU_MOD, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_MOD, _______,
KC_CAPS, KC_CAPS, CK_RST, CK_DOWN, CK_UP, MUV_DE, MUV_IN, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______,
_______, _______, _______, _______
)
};

View File

@ -0,0 +1,10 @@
# Defalut keymap for Jones
Simple keymap.
## Layers
- Base
- Lower
- Raise
- Adjust

View File

@ -0,0 +1,34 @@
/*
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.
// Number of endoder
#define ENCODERS 2
// 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 } }

View File

@ -0,0 +1,225 @@
/* 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/>.
*/
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
// Defines names for use in layer keycodes and the keymap
enum layer_number {
_BASE1 = 0,
_BASE2,
_BASE3,
_LOWER,
_RAISE,
_ADJUST,
};
// Key Macro
#define SP_LOW LT(_LOWER, KC_SPC)
#define SP_RAI LT(_RAISE, KC_SPC)
#define SP_ADJ LT(_ADJUST, KC_SPC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE1] = LAYOUT(
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, JP_MINS, KC_BSPC,
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
),
[_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, _______, _______,
_______, _______, _______, _______
),
[_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, _______, _______, _______, _______,
_______, _______, _______, _______
),
[_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,
_______, _______, _______, _______
),
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS,
_______, DF(_BASE1),DF(_BASE2),DF(_BASE3),_______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, RGB_RMOD, _______,
_______, AU_TOG, CK_TOGG, MU_TOG, MU_MOD, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_MOD, _______,
KC_CAPS, KC_CAPS, CK_RST, CK_DOWN, CK_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______,
_______, _______, _______, _______
),
};
//------------------------------------------------------------------------------
// RGB Light settings
//------------------------------------------------------------------------------
#ifdef RGBLIGHT_LAYERS
// Indicator LED settings
#define JONES_LED_INDICATOR_INDEX 0 // where to start indicator
#define JONES_LED_INDICATOR_COUNT 4 // how many leds used for indicator
#define JONES_LED_INDICATOR_CHANGE_COUNT 1 // how meny leds to change for temporally layer
#define JONES_LED_DIMMER_LEVEL 200 // brightness dimmer
// for Default layer (= Base layer)
const rgblight_segment_t PROGMEM my_base1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX , JONES_LED_INDICATOR_COUNT, HSV_WHITE - JONES_LED_DIMMER_LEVEL}
);
const rgblight_segment_t PROGMEM my_base2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX , JONES_LED_INDICATOR_COUNT, HSV_BLUE - JONES_LED_DIMMER_LEVEL}
);
const rgblight_segment_t PROGMEM my_base3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX , JONES_LED_INDICATOR_COUNT, HSV_YELLOW - JONES_LED_DIMMER_LEVEL}
);
// for temporal layer
const rgblight_segment_t PROGMEM my_caps_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX + 1 , 1, HSV_MAGENTA - JONES_LED_DIMMER_LEVEL},
{JONES_LED_INDICATOR_INDEX + 1 + 2 , 1, HSV_MAGENTA - JONES_LED_DIMMER_LEVEL}
);
const rgblight_segment_t PROGMEM my_lower_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX , JONES_LED_INDICATOR_CHANGE_COUNT, HSV_GREEN - JONES_LED_DIMMER_LEVEL},
{JONES_LED_INDICATOR_INDEX + 2, JONES_LED_INDICATOR_CHANGE_COUNT, HSV_GREEN - JONES_LED_DIMMER_LEVEL}
);
const rgblight_segment_t PROGMEM my_raise_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX , JONES_LED_INDICATOR_CHANGE_COUNT, HSV_CYAN - JONES_LED_DIMMER_LEVEL},
{JONES_LED_INDICATOR_INDEX + 2, JONES_LED_INDICATOR_CHANGE_COUNT, HSV_CYAN - JONES_LED_DIMMER_LEVEL}
);
const rgblight_segment_t PROGMEM my_adjust_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{JONES_LED_INDICATOR_INDEX , JONES_LED_INDICATOR_CHANGE_COUNT, HSV_RED - JONES_LED_DIMMER_LEVEL},
{JONES_LED_INDICATOR_INDEX + 2, JONES_LED_INDICATOR_CHANGE_COUNT, HSV_RED - JONES_LED_DIMMER_LEVEL}
);
// Define the array of layers. Later layers take precedence
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
my_base1_layer,
my_base2_layer,
my_base3_layer,
my_caps_layer,
my_lower_layer,
my_raise_layer,
my_adjust_layer
);
// Enabling and disabling lighting layers
layer_state_t layer_state_set_user(layer_state_t state) {
rgblight_set_layer_state(4, layer_state_cmp(state, _LOWER));
rgblight_set_layer_state(5, layer_state_cmp(state, _RAISE));
rgblight_set_layer_state(6, layer_state_cmp(state, _ADJUST));
return state;
}
// Enabling and disabling lighting layers for default layer
layer_state_t default_layer_state_set_user(layer_state_t state) {
rgblight_set_layer_state(0, layer_state_cmp(state, _BASE1));
rgblight_set_layer_state(1, layer_state_cmp(state, _BASE2));
rgblight_set_layer_state(2, layer_state_cmp(state, _BASE3));
return state;
}
bool led_update_user(led_t led_state) {
rgblight_set_layer_state(3, IS_HOST_LED_ON(USB_LED_CAPS_LOCK));
return true;
}
#endif
//------------------------------------------------------------------------------
// Rotary Encoder
//------------------------------------------------------------------------------
static uint8_t encoder_state[ENCODERS] = {0};
static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY;
static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY;
void encoder_action_unregister(void) {
for (int index = 0; index < 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() | 1)
};
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() | 1)
};
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;
};
//------------------------------------------------------------------------------
// Keyboard Initialization
//------------------------------------------------------------------------------
void keyboard_post_init_user(void) {
debug_enable=true;
#ifdef RGB_DI_PIN
#ifdef RGBLIGHT_LAYERS
// Enable the LED layers.
rgblight_layers = my_rgb_layers;
// prevent RGB light overrides layer indicator.
layer_state_set(default_layer_state);
#endif
#endif
}

View File

@ -0,0 +1,35 @@
# Keymap for Jones with VIA support
VIA supported basic keymap with external EEPROM.
## Layout
Japanese style "Wide" layout.
## Layers
- Base #1
- Base #2
- Base #3
- Lower
- Raise
- Adjust
## External EEPROM
I2C connected external EEPROM.
## LED lighting
4 LEDsfor layer indicator.
2 for Left side and 2 for Right side.
## Rotary encoder
Supports up to 2 rotary encoders.
Left bottom and Right bottom.
## Audio
Supports monophonic audio.
"Music Mode" and "Audio Click" are enabled.

View File

@ -0,0 +1,2 @@
# Use VIA
VIA_ENABLE = yes

View File

@ -0,0 +1,23 @@
# Jones
![Jones, "Wide" layout](https://raw.githubusercontent.com/jpskenn/Jones/master/assets/_DSF0714.jpeg)
A symmetrical 60% keyboard combined with Ortho-Linear and Row-staggered. It has gapless Row 2 - Row 3.
GH60 case compatible PCB and keyplate.
[More info](https://github.com/jpskenn/Jones)
* Keyboard Maintainer: [jpskenn](https://github.com/jpskenn)
* Hardware Supported: PCB, Key plate, Bottom plate
* Hardware Availability: [GitHub](https://github.com/jpskenn/Jones), [BOOTH](https://jpskenn.booth.pm), [Yushakobo](https://yushakobo.jp)
Make example for this keyboard (after setting up your build environment):
make jones/v1:default
Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)):
make jones/v1:default:flash
To reset the keyboard into bootloader mode, press the reset switch on the underside.
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).

View File

@ -0,0 +1,24 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
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
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
ENCODER_ENABLE = yes # Rotary Encoder
# Use I2C connected External EEPROM
EEPROM_DRIVER = i2c
LTO_ENABLE = yes

28
keyboards/jones/v1/v1.c Normal file
View File

@ -0,0 +1,28 @@
/* 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/>.
*/
#include "v1.h"
#if defined(AUDIO_ENABLE) && defined(MUSIC_MAP)
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT(
0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0
);
#endif

57
keyboards/jones/v1/v1.h Normal file
View File

@ -0,0 +1,57 @@
/* 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
#include "quantum.h"
/*
FULL 10x10 ROUND-ROBIN MATRIX for Reference
{ KC_NO, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19 }, \
{ k20, k21, KC_NO, k23, k24, k25, k26, k27, k28, k29 }, \
{ k30, k31, k32, KC_NO, k34, k35, k36, k37, k38, k39 }, \
{ k40, k41, k42, k43, KC_NO, k45, k46, k47, k48, k49 }, \
{ k50, k51, k52, k53, k54, KC_NO, k56, k57, k58, k59 }, \
{ k60, k61, k62, k63, k64, k65, KC_NO, k67, k68, k69 }, \
{ k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79 }, \
{ k80, k81, k82, k83, k84, k85, k86, k87, KC_NO, k89 }, \
{ k90, k91, k92, k93, k94, k95, k96, k97, k98, KC_NO } \
*/
/* Keys on 6th row are used with rotary encoder. */
#define LAYOUT( \
k09, k59, k08, k54, k04, k50, k56, k06, k05, k52, k02, k53, k07, k51, k01, \
k19, k69, k18, k64, k14, k60, k10, k16, k15, k62, k12, k63, k17, k61, \
k29, k79, k28, k74, k24, k70, k20, k26, k25, k72, k23, k73, k27, k71, \
k39, k89, k38, k84, k34, k80, k30, k36, k35, k82, k32, k83, k37, k81, k31, \
k49, k98, k48, k94, k90, k46, k45, k92, k42, k93, k47, k91, k41, \
k85, k86, k95, k96 \
) \
{ \
{ KC_NO, k01, k02, KC_NO, k04, k05, k06, k07, k08, k09, }, \
{ k10, KC_NO, k12, KC_NO, k14, k15, k16, k17, k18, k19, }, \
{ k20, KC_NO, KC_NO, k23, k24, k25, k26, k27, k28, k29, }, \
{ k30, k31, k32, KC_NO, k34, k35, k36, k37, k38, k39, }, \
{ KC_NO, k41, k42, KC_NO, KC_NO, k45, k46, k47, k48, k49, }, \
{ k50, k51, k52, k53, k54, KC_NO, k56, KC_NO, KC_NO, k59, }, \
{ k60, k61, k62, k63, k64, KC_NO, KC_NO, KC_NO, KC_NO, k69, }, \
{ k70, k71, k72, k73, k74, KC_NO, KC_NO, KC_NO, KC_NO, k79, }, \
{ k80, k81, k82, k83, k84, k85, k86, KC_NO, KC_NO, k89, }, \
{ k90, k91, k92, k93, k94, k95, k96, KC_NO, k98, KC_NO } \
}