Skip to content

Commit 100c7e4

Browse files
alex-ongAlexey Danilov
authored andcommitted
Keyboard: xealous (qmk#3731)
* Keyboard: HandWired/XeaL60 * Updated rules.mk * Mapping for layout was flipped * Figured out how to re-map bad pins. * Updated Keymap * Enabled audio, Forced NKRO * Added QMK_KEYS_PER_SCAN * Removed more unnecessary files, since split_keyboards are in main QMK branch already. * Simplified rules.mk in rev1 * Removed i2c from matrix.c * Re-formatted to 4 spaces per tab, * Changed note for NUMPAD * Added I2C support back! * Fixed keyboard mappings. Both sides work * Moved i2c configuration from keymaps/default/config.h to config.h * Changed SCL_CLOCK to 400000L * Added DEBUG_MATRIX_SCAN_RATE for future optimization efforts * Removed row2col code to clean up matrix.c * Scan rate from 2100 -> 4200 by using Nop instead of waiting 30us between columns. * Further optimized column reading via optimized_col_reader. * Immediate key-recognition * Switched back to own implementation of SPLIT_KEYBOARD. Will optimize so that slave interrupts master. * Moved scanrate debug messages to another file. * Made matrix_scanrate.c compile if CONSOLE_ENABLE is off. Updated to latest i2c.c * Latest i2c uses a few bytes for lighting information * Optimizations in i2c.h to determine buffer size. * Disabled a whole bunch of features. TODO: Test that keyboard still works fine. * Minimum #define NO_ACTION's with still working keyboard * Fixed matrix not working due to offsets not being respected * Added numlock button for keymap. * Use I2C_KEYMAP_START offset * Removed serial, Backlight and RGB support * Removed need for split_flags. * Added audio on and off for numlock. * Renamed from xeal60 to xealous, simplified build system. * Used more shared split_common code. * Updated audio code. * moved tone_qwerty and tone_numpad to config.h. Removed keymaps/default/config.h * Added more shortcut keys in _FN layer. Increased debounce to 6ms due to fencepost error. * DF used with incorrect argument. Custom_keycodes no longer required. * Fixed bug in update_debounce_counters which was resulting in no debouncing! * Removed unnecessary #include
1 parent 52ba08f commit 100c7e4

File tree

12 files changed

+1030
-0
lines changed

12 files changed

+1030
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
Copyright 2012 Jun Wako <wakojun@gmail.com>
3+
Copyright 2015 Jack Humbert
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 2 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
#pragma once
20+
#include "config_common.h"
21+
22+
/* Use I2C or Serial, not both */
23+
24+
// #define USE_SERIAL
25+
#define USE_I2C
26+
#define SCL_CLOCK 400000UL
27+
28+
/* Select hand configuration */
29+
30+
#define MASTER_LEFT
31+
// #define MASTER_RIGHT
32+
// #define EE_HANDS
33+
34+
35+
//#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate.
36+
#define FORCE_NKRO
37+
38+
#define QMK_KEYS_PER_SCAN 4 //if we press four keys simultaneously, lets process them simultaneously...
39+
#define DIODE_DIRECTION COL2ROW
40+
41+
#ifdef AUDIO_ENABLE
42+
#define C6_AUDIO
43+
#define STARTUP_SONG SONG(STARTUP_SOUND)
44+
#define NO_MUSIC_MODE
45+
#define TONE_QWERTY SONG(Q__NOTE(_E4));
46+
#define TONE_NUMPAD SONG(Q__NOTE(_D4));
47+
#endif
48+
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"keyboard_name": "Xealous",
3+
"url": "",
4+
"maintainer": "alex-ong",
5+
"width": 15,
6+
"height": 5,
7+
"layouts": {
8+
"LAYOUT_ANSI_DEFAULT": {
9+
"key_count": 64,
10+
"layout": [
11+
{"label":"Esc", "x":0, "y":0},
12+
{"label":"1", "x":1, "y":0},
13+
{"label":"2", "x":2, "y":0},
14+
{"label":"3", "x":3, "y":0},
15+
{"label":"4", "x":4, "y":0},
16+
{"label":"5", "x":5, "y":0},
17+
{"label":"6", "x":6, "y":0},
18+
19+
{"label":"7", "x":7, "y":0},
20+
{"label":"8", "x":8, "y":0},
21+
{"label":"9", "x":9, "y":0},
22+
{"label":"0", "x":10, "y":0},
23+
{"label":"-", "x":11, "y":0},
24+
{"label":"=", "x":12, "y":0},
25+
{"label":"Backspace", "x":13, "y":0, "w":2.0},
26+
27+
{"label":"Tab", "x":0, "y":1, "w":1.5},
28+
{"label":"Q", "x":1.5, "y":1},
29+
{"label":"W", "x":2.5, "y":1},
30+
{"label":"E", "x":3.5, "y":1},
31+
{
32+
"label": "R",
33+
"x": 4.5,
34+
"y": 1
35+
},
36+
{"label":"T", "x":5.5, "y":1},
37+
38+
{"label":"Y", "x":6.5, "y":1},
39+
{"label":"U", "x":7.5, "y":1},
40+
{"label":"I", "x":8.5, "y":1},
41+
{"label":"O", "x":9.5, "y":1},
42+
{"label":"P", "x":10.5, "y":1},
43+
{"label":"[", "x":11.5, "y":1},
44+
{"label":"]", "x":12.5, "y":1},
45+
{"label":"\\", "x":13.5, "y":1, "w":1.5},
46+
47+
{"label":"CapsLock", "x":0, "y":2, "w":1.75},
48+
{"label":"A", "x":1.75, "y":2},
49+
{"label":"S", "x":2.75, "y":2},
50+
{"label":"D", "x":3.75, "y":2},
51+
{"label":"F", "x":4.75, "y":2},
52+
{"label":"G", "x":5.75, "y":2},
53+
54+
{"label":"H", "x":6.75, "y":2},
55+
{"label":"J", "x":7.75, "y":2},
56+
{"label":"K", "x":8.75, "y":2},
57+
{"label":"L", "x":9.75, "y":2},
58+
{"label":";", "x":10.75, "y":2},
59+
{"label":"'", "x":11.75, "y":2},
60+
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
61+
62+
{"label":"Shift", "x":0, "y":3, "w":2.25},
63+
{"label":"Z", "x":2.25, "y":3},
64+
{"label":"X", "x":3.25, "y":3},
65+
{"label":"C", "x":4.25, "y":3},
66+
{"label":"V", "x":5.25, "y":3},
67+
{"label":"B", "x":6.25, "y":3},
68+
69+
{"label":"N", "x":7.25, "y":3},
70+
{"label":"M", "x":8.25, "y":3},
71+
{"label":",", "x":9.25, "y":3},
72+
{"label":".", "x":10.25, "y":3},
73+
{"label":"/", "x":11.25, "y":3},
74+
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
75+
76+
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
77+
{"label":"Win", "x":1.25, "y":4, "w":1.25},
78+
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
79+
{"x":3.75, "y":4, "w":2.75},
80+
{"x":6.5, "y":4, "w":1.25},
81+
82+
{"x":7.75, "y":4, "w":1.25},
83+
{"x":9, "y":4, "w":2.0},
84+
{"label":"Alt", "x":11, "y":4},
85+
{"label":"Win", "x":12, "y":4},
86+
{"label":"Menu", "x":13, "y":4},
87+
{"label":"Ctrl", "x":14, "y":4}
88+
]
89+
}
90+
}
91+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
#include QMK_KEYBOARD_H
2+
3+
extern keymap_config_t keymap_config;
4+
5+
6+
// Each layer gets a name for readability, which is then used in the keymap matrix below.
7+
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
8+
// Layer names don't all need to be of the same length, obviously, and you can also skip them
9+
// entirely and just use numbers.
10+
#define _QWERTY 0
11+
#define _NUMPAD 1
12+
#define _FN 2
13+
14+
// Fillers to make layering more clear
15+
#define _______ KC_TRNS
16+
#define XXXXXXX KC_NO
17+
#define FN MO(_FN)
18+
19+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20+
/*
21+
* ,-----------------------------------------------------------.
22+
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
23+
* |-----------------------------------------------------------|
24+
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
25+
* |-----------------------------------------------------------|
26+
* |FN | A| S| D| F| G| H| J| K| L| ;| '|Return |
27+
* |-----------------------------------------------------------|
28+
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |
29+
* |-----------------------------------------------------------|
30+
* |Ctrl|Gui |Alt | NUM | Space | Space |Alt |FN |Menu |Ctrl |
31+
* `-----------------------------------------------------------'
32+
*/
33+
/* Layer 0: Qwerty */
34+
[_QWERTY] = LAYOUT_split60( \
35+
KC_ESC, 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, \
36+
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, \
37+
FN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
38+
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
39+
KC_LCTL, KC_LGUI, KC_LALT, DF(_NUMPAD), KC_SPC, KC_SPC, KC_RALT, FN, KC_APP, KC_RCTL \
40+
),
41+
42+
/*
43+
* ,-----------------------------------------------------------.
44+
* | | | | | | | |Nlck| /| *| -| | | |
45+
* |-----------------------------------------------------------|
46+
* | | | | | | | | 7| 8| 9| +| | | |
47+
* |-----------------------------------------------------------|
48+
* | | | | | | | | 4| 5| 6|Bspc| |Return |
49+
* |-----------------------------------------------------------|
50+
* | | | | | | | | 1| 2| 3| .| |
51+
* |-----------------------------------------------------------|
52+
* | | | | QWE | | 0 | . |A_ON |A_OFF| |
53+
* `-----------------------------------------------------------'
54+
*/
55+
56+
/* Layer 1: Numpad */
57+
[_NUMPAD] = LAYOUT_split60( \
58+
_______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_MINUS, _______, _______, KC_BSPC, \
59+
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PLUS, _______, _______, KC_BSLS, \
60+
_______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_BSPC, _______, _______, \
61+
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_DOT, _______, \
62+
_______, _______, _______,DF(_QWERTY), _______, KC_P0, KC_PDOT, AU_ON, AU_OFF, _______ \
63+
),
64+
65+
/*
66+
* ,-----------------------------------------------------------.
67+
* | ` |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Delete|
68+
* |-----------------------------------------------------------|
69+
* | Caps|pUp| ^ |pDn| | | |pUp| ^ |pDn|PSR|SLK|Pau| |
70+
* |-----------------------------------------------------------|
71+
* | | < | v | > | |Hom|Hom| < | v | > |INS| DEL| |
72+
* |-----------------------------------------------------------|
73+
* | | | | | |End|End| |Vo-|Vo+|VoX| |
74+
* |-----------------------------------------------------------|
75+
* | | | | | | | | | | |
76+
* `-----------------------------------------------------------'
77+
*/
78+
79+
/* Layer 2: RAISE */
80+
[_FN] = LAYOUT_split60( \
81+
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_DEL, \
82+
KC_CAPS, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, \
83+
_______, KC_LEFT, KC_DOWN,KC_RIGHT, _______, KC_HOME, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, _______, \
84+
_______, _______, _______, _______, _______, KC_END, KC_END, AU_TOG, KC_VOLD, KC_VOLU, KC_MUTE, _______, \
85+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
86+
)
87+
88+
};
89+
90+
#ifdef AUDIO_ENABLE
91+
float tone_qwerty[][2] = TONE_QWERTY;
92+
float tone_numpad[][2] = TONE_NUMPAD;
93+
94+
uint32_t default_layer_state_set_kb(uint32_t state) {
95+
if (state == 1UL<<_QWERTY) {
96+
PLAY_SONG(tone_qwerty);
97+
} else if (state == 1UL<<_NUMPAD) {
98+
PLAY_SONG(tone_numpad);
99+
}
100+
return state;
101+
}
102+
#endif
103+
104+
void led_set_keymap(uint8_t usb_led) {
105+
}

0 commit comments

Comments
 (0)