aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/treadstone32/config.h103
-rw-r--r--keyboards/treadstone32/info.json175
-rw-r--r--keyboards/treadstone32/keymaps/default/config.h58
-rw-r--r--keyboards/treadstone32/keymaps/default/keymap.c170
-rw-r--r--keyboards/treadstone32/keymaps/default/readme.md5
-rw-r--r--keyboards/treadstone32/keymaps/default/readme_jp.md55
-rw-r--r--keyboards/treadstone32/keymaps/default/rules.mk25
-rw-r--r--keyboards/treadstone32/keymaps/like_jis/config.h58
-rw-r--r--keyboards/treadstone32/keymaps/like_jis/keymap.c170
-rw-r--r--keyboards/treadstone32/keymaps/like_jis/readme.md5
-rw-r--r--keyboards/treadstone32/keymaps/like_jis/readme_jp.md55
-rw-r--r--keyboards/treadstone32/keymaps/like_jis/rules.mk25
-rw-r--r--keyboards/treadstone32/readme.md18
-rw-r--r--keyboards/treadstone32/rules.mk64
-rw-r--r--keyboards/treadstone32/treadstone32.c43
-rw-r--r--keyboards/treadstone32/treadstone32.h45
16 files changed, 1074 insertions, 0 deletions
diff --git a/keyboards/treadstone32/config.h b/keyboards/treadstone32/config.h
new file mode 100644
index 000000000..6151d6e82
--- /dev/null
+++ b/keyboards/treadstone32/config.h
@@ -0,0 +1,103 @@
1/*
2Copyright 2019 marksard
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED
24#define PRODUCT_ID 0xDFA5
25#define DEVICE_VER 0x0010
26#define MANUFACTURER marksard
27#define PRODUCT treadstone32
28#define DESCRIPTION Minimal Symmetrical staggered 32-Key Keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 8
32#define MATRIX_COLS 5
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43*/
44#define MATRIX_ROW_PINS { F1, F0, E6, B2, B4, D7, D6, D4 }
45#define MATRIX_COL_PINS { F4, F5, F6, F7, C7 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49#define DIODE_DIRECTION COL2ROW
50
51/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
52#define DEBOUNCING_DELAY 5
53
54/* define if matrix has ghost (lacks anti-ghosting diodes) */
55//#define MATRIX_HAS_GHOST
56
57/* ws2812 RGB LED */
58#define RGB_DI_PIN D3
59#define RGBLIGHT_TIMER
60#define ws2812_PORTREG PORTD
61#define ws2812_DDRREG DDRD
62
63#define RGBLED_NUM 6
64
65#ifndef IOS_DEVICE_ENABLE
66 #define RGBLIGHT_LIMIT_VAL 200
67 #define RGBLIGHT_VAL_STEP 17
68#else
69 #define RGBLIGHT_LIMIT_VAL 50
70 #define RGBLIGHT_VAL_STEP 4
71#endif
72#define RGBLIGHT_HUE_STEP 10
73#define RGBLIGHT_SAT_STEP 17
74
75#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
76// USB_MAX_POWER_CONSUMPTION value for treadstone32 keyboard
77// 120 RGBoff
78// 330 RGB 6
79// 300 RGB 32
80 #define USB_MAX_POWER_CONSUMPTION 400
81#else
82 // fix iPhone and iPad power adapter issue
83 // iOS device need lessthan 100
84 #define USB_MAX_POWER_CONSUMPTION 100
85#endif
86
87/*
88 * Feature disable options
89 * These options are also useful to firmware size reduction.
90 */
91
92/* disable debug print */
93//#define NO_DEBUG
94
95/* disable print */
96//#define NO_PRINT
97
98/* disable action features */
99//#define NO_ACTION_LAYER
100//#define NO_ACTION_TAPPING
101//#define NO_ACTION_ONESHOT
102//#define NO_ACTION_MACRO
103//#define NO_ACTION_FUNCTION
diff --git a/keyboards/treadstone32/info.json b/keyboards/treadstone32/info.json
new file mode 100644
index 000000000..2ac18be86
--- /dev/null
+++ b/keyboards/treadstone32/info.json
@@ -0,0 +1,175 @@
1{
2 "keyboard_name": "Treadstone32",
3 "url": "https://github.com/marksard/Keyboards",
4 "maintainer": "marksard",
5 "width": 10.5,
6 "height": 4,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {
11 "label": "Q",
12 "x": 0,
13 "y": 0
14 },
15 {
16 "label": "W",
17 "x": 1,
18 "y": 0
19 },
20 {
21 "label": "E",
22 "x": 2,
23 "y": 0
24 },
25 {
26 "label": "R",
27 "x": 3,
28 "y": 0
29 },
30 {
31 "label": "T",
32 "x": 4,
33 "y": 0
34 },
35 {
36 "label": "Y",
37 "x": 5.5,
38 "y": 0
39 },
40 {
41 "label": "U",
42 "x": 6.5,
43 "y": 0
44 },
45 {
46 "label": "I",
47 "x": 7.5,
48 "y": 0
49 },
50 {
51 "label": "O",
52 "x": 8.5,
53 "y": 0
54 },
55 {
56 "label": "P",
57 "x": 9.5,
58 "y": 0
59 },
60 {
61 "label": "A",
62 "x": 0.25,
63 "y": 1
64 },
65 {
66 "label": "S",
67 "x": 1.25,
68 "y": 1
69 },
70 {
71 "label": "D",
72 "x": 2.25,
73 "y": 1
74 },
75 {
76 "label": "F",
77 "x": 3.25,
78 "y": 1
79 },
80 {
81 "label": "G",
82 "x": 4.25,
83 "y": 1
84 },
85 {
86 "label": "H",
87 "x": 5.25,
88 "y": 1
89 },
90 {
91 "label": "J",
92 "x": 6.25,
93 "y": 1
94 },
95 {
96 "label": "K",
97 "x": 7.25,
98 "y": 1
99 },
100 {
101 "label": "L",
102 "x": 8.25,
103 "y": 1
104 },
105 {
106 "label": "enter",
107 "x": 9.25,
108 "y": 1
109 },
110 {
111 "label": "Z",
112 "x": 0,
113 "y": 2
114 },
115 {
116 "label": "X",
117 "x": 1,
118 "y": 2
119 },
120 {
121 "label": "C",
122 "x": 2,
123 "y": 2
124 },
125 {
126 "label": "V",
127 "x": 3,
128 "y": 2
129 },
130 {
131 "label": "B",
132 "x": 4,
133 "y": 2
134 },
135 {
136 "label": "N",
137 "x": 5.5,
138 "y": 2
139 },
140 {
141 "label": "M",
142 "x": 6.5,
143 "y": 2
144 },
145 {
146 "label": ",",
147 "x": 7.5,
148 "y": 2
149 },
150 {
151 "label": ".",
152 "x": 8.5,
153 "y": 2
154 },
155 {
156 "label": "/",
157 "x": 9.5,
158 "y": 2
159 },
160 {
161 "label": "backspace",
162 "x": 3.25,
163 "y": 3,
164 "w": 2
165 },
166 {
167 "label": "space",
168 "x": 5.25,
169 "y": 3,
170 "w": 2
171 }
172 ]
173 }
174 }
175}
diff --git a/keyboards/treadstone32/keymaps/default/config.h b/keyboards/treadstone32/keymaps/default/config.h
new file mode 100644
index 000000000..a6363f9b9
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/default/config.h
@@ -0,0 +1,58 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23// place overrides here
24#define TAPPING_TERM 200
25#define IGNORE_MOD_TAP_INTERRUPT
26
27#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term
28#define TAPPING_TERM_PER_KEY
29
30#ifdef MOUSEKEY_ENABLE
31 #undef MOUSEKEY_INTERVAL
32 #define MOUSEKEY_INTERVAL 1
33
34 #undef MOUSEKEY_TIME_TO_MAX
35 #define MOUSEKEY_TIME_TO_MAX 150
36
37 #undef MOUSEKEY_MAX_SPEED
38 #define MOUSEKEY_MAX_SPEED 3
39
40 #undef MOUSEKEY_MOVE_DELTA
41 #define MOUSEKEY_MOVE_DELTA 4
42
43 #undef MOUSEKEY_DELAY
44 #define MOUSEKEY_DELAY 0
45#endif
46
47// Selection of RGBLIGHT MODE to use.
48#if defined(LED_ANIMATIONS)
49 //#define RGBLIGHT_EFFECT_BREATHING
50 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
51 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
52 //#define RGBLIGHT_EFFECT_SNAKE
53 #define RGBLIGHT_EFFECT_KNIGHT
54 //#define RGBLIGHT_EFFECT_CHRISTMAS
55 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
56 //#define RGBLIGHT_EFFECT_RGB_TEST
57 //#define RGBLIGHT_EFFECT_ALTERNATING
58#endif
diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c
new file mode 100644
index 000000000..a7b908c9d
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/default/keymap.c
@@ -0,0 +1,170 @@
1#include QMK_KEYBOARD_H
2#include "keymap_jp.h"
3
4extern keymap_config_t keymap_config;
5
6#ifdef RGBLIGHT_ENABLE
7//Following line allows macro to read current RGB settings
8extern rgblight_config_t rgblight_config;
9#endif
10
11// Each layer gets a name for readability, which is then used in the keymap matrix below.
12// The underscores don't mean anything - you can have a layer called STUFF or any other name.
13// Layer names don't all need to be of the same length, obviously, and you can also skip them
14// entirely and just use numbers.
15enum layer_number {
16 _BASE = 0,
17 _LOWER,
18 _RAISE,
19 _ADJUST,
20};
21
22enum custom_keycodes {
23 RGBRST = SAFE_RANGE,
24 LOWER,
25 RAISE,
26 KANJI,
27};
28
29// enum tapdances{
30// TD_CODO = 0,
31// TD_SLRO,
32// };
33
34// Layer Mode aliases
35#define KC_MLAD MO(_ADJUST)
36
37// Base layer mod tap
38#define KC_A_SF LSFT_T(KC_A)
39#define KC_Z_CT LCTL_T(KC_Z)
40#define KC_X_AL LALT_T(KC_X)
41#define KC_C_GU LGUI_T(KC_C)
42#define KC_SSCT LCTL_T(KC_SLSH)
43#define KC_ENSF LSFT_T(KC_ENT)
44
45// Lower layer mod tap
46#define KC_F6SF LSFT_T(KC_F6)
47#define KC_BSSF LSFT_T(KC_BSLS)
48#define KC_11CT LCTL_T(KC_F11)
49#define KC_12AL LALT_T(KC_F12)
50
51// Layer tap
52#define KC_BSLO LT(_LOWER, KC_BSPC)
53#define KC_SPRA LT(_RAISE, KC_SPC)
54
55// Tap dance
56// #define KC_CODO TD(TD_CODO)
57// #define KC_SLRO TD(TD_SLRO)
58
59// qk_tap_dance_action_t tap_dance_actions[] = {
60// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
61// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
62// };
63
64const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
65 [_BASE] = LAYOUT(
66 //,---------------------------------------------------------------------------------------------------.
67 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
68 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
69 KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF,
70 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
71 KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT,
72 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
73 KC_BSLO, KC_SPRA
74 // `---------|---------'
75 ),
76
77 [_LOWER] = LAYOUT(
78 //,---------------------------------------------------------------------------------------------------.
79 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
80 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
81 KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT,
82 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
83 KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV,
84 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
85 _______, KC_MLAD
86 // `---------|---------'
87 ),
88
89 [_RAISE] = LAYOUT(
90 //,---------------------------------------------------------------------------------------------------.
91 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
92 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
93 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT,
94 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
95 KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT,
96 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
97 _______, _______
98 // `---------|---------'
99 ),
100
101 [_ADJUST] = LAYOUT(
102 //,---------------------------------------------------------------------------------------------------.
103 RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
104 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
105 RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
106 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
107 RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX,
108 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
109 _______, _______
110 // `---------|---------'
111 )
112};
113
114uint16_t get_tapping_term(uint16_t keycode) {
115 switch (keycode) {
116 case KC_BSLO:
117 return TAPPING_LAYER_TERM;
118 case KC_SPRA:
119 return TAPPING_LAYER_TERM;
120 default:
121 return TAPPING_TERM;
122 }
123}
124
125int RGB_current_mode;
126bool process_record_user(uint16_t keycode, keyrecord_t *record) {
127
128 bool result = false;
129 switch (keycode) {
130 case KANJI:
131 if (record->event.pressed) {
132 if (keymap_config.swap_lalt_lgui == false) {
133 register_code(KC_LANG2);
134 } else {
135 SEND_STRING(SS_LALT("`"));
136 }
137 } else {
138 unregister_code(KC_LANG2);
139 }
140 break;
141 #ifdef RGBLIGHT_ENABLE
142 //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
143 case RGB_MOD:
144 if (record->event.pressed) {
145 rgblight_mode(RGB_current_mode);
146 rgblight_step();
147 RGB_current_mode = rgblight_config.mode;
148 }
149 break;
150 case RGBRST:
151 if (record->event.pressed) {
152 eeconfig_update_rgblight_default();
153 rgblight_enable();
154 RGB_current_mode = rgblight_config.mode;
155 }
156 break;
157 #endif
158 default:
159 result = true;
160 break;
161 }
162
163 return result;
164}
165
166void keyboard_post_init_user(void) {
167 #ifdef RGBLIGHT_ENABLE
168 RGB_current_mode = rgblight_config.mode;
169 #endif
170}
diff --git a/keyboards/treadstone32/keymaps/default/readme.md b/keyboards/treadstone32/keymaps/default/readme.md
new file mode 100644
index 000000000..387efc0d4
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/default/readme.md
@@ -0,0 +1,5 @@
1# Default keymap for treadstone32
2
3## Description
4
5## How to use
diff --git a/keyboards/treadstone32/keymaps/default/readme_jp.md b/keyboards/treadstone32/keymaps/default/readme_jp.md
new file mode 100644
index 000000000..ff078dcc8
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/default/readme_jp.md
@@ -0,0 +1,55 @@
1# US配列ライクデフォルトキーマップ
2
3## 概要
4
5 US配列ライクなデフォルトキーマップです。
6
7## キーマップの見かた
8
9qmk_firmware\tmk_core\common\keycode.h
10に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
11
12Leyer Tap、Mod TapというQMKの機能を使っています。
13
14Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
15例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
16
17Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
18例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
19
20もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
21
22## 機能
23
24 QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
25 Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。
26
27## OS切り替え方法
28
29 Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
30
31- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
32- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
33
34## IME切り替え方法
35
36 Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
37
38## ソフトウェアリセットについて
39
40 キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
41 LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。
42
43## LEDの点灯切り替え方法
44
45 Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
46
47- RGBRST: LEDのリセット
48- RGB_TOG: LEDのON/OFF切り替え
49- RGB_MOD: LEDの光り方の変更
50- RGB_HUI: Hue+ 色合いを変更
51- RGB_HUD: Hue- 色合いを変更
52- RGB_SAI: Saturation+ 色の濃さを変更
53- RGB_SAD: Saturation- 色の濃さを変更
54- RGB_VAI: Value+ 明るさを変更
55- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone32/keymaps/default/rules.mk b/keyboards/treadstone32/keymaps/default/rules.mk
new file mode 100644
index 000000000..8c4541fa1
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/default/rules.mk
@@ -0,0 +1,25 @@
1
2# Build Options
3# change to "no" to disable the options, or define them in the Makefile in
4# the appropriate keymap folder that will get included automatically
5#
6TAP_DANCE_ENABLE = no
7
8# If your custom treadstone32 pcb, you can rewrite to yes.
9RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
10LED_ANIMATIONS = yes # LED animations
11
12# Other selectable option
13IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
14
15ifeq ($(strip $(LED_ANIMATIONS)), yes)
16 # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
17 OPT_DEFS += -DLED_ANIMATIONS
18endif
19
20ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
21 OPT_DEFS += -DIOS_DEVICE_ENABLE
22endif
23
24# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
25SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/treadstone32/keymaps/like_jis/config.h b/keyboards/treadstone32/keymaps/like_jis/config.h
new file mode 100644
index 000000000..a6363f9b9
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/like_jis/config.h
@@ -0,0 +1,58 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23// place overrides here
24#define TAPPING_TERM 200
25#define IGNORE_MOD_TAP_INTERRUPT
26
27#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term
28#define TAPPING_TERM_PER_KEY
29
30#ifdef MOUSEKEY_ENABLE
31 #undef MOUSEKEY_INTERVAL
32 #define MOUSEKEY_INTERVAL 1
33
34 #undef MOUSEKEY_TIME_TO_MAX
35 #define MOUSEKEY_TIME_TO_MAX 150
36
37 #undef MOUSEKEY_MAX_SPEED
38 #define MOUSEKEY_MAX_SPEED 3
39
40 #undef MOUSEKEY_MOVE_DELTA
41 #define MOUSEKEY_MOVE_DELTA 4
42
43 #undef MOUSEKEY_DELAY
44 #define MOUSEKEY_DELAY 0
45#endif
46
47// Selection of RGBLIGHT MODE to use.
48#if defined(LED_ANIMATIONS)
49 //#define RGBLIGHT_EFFECT_BREATHING
50 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
51 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
52 //#define RGBLIGHT_EFFECT_SNAKE
53 #define RGBLIGHT_EFFECT_KNIGHT
54 //#define RGBLIGHT_EFFECT_CHRISTMAS
55 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
56 //#define RGBLIGHT_EFFECT_RGB_TEST
57 //#define RGBLIGHT_EFFECT_ALTERNATING
58#endif
diff --git a/keyboards/treadstone32/keymaps/like_jis/keymap.c b/keyboards/treadstone32/keymaps/like_jis/keymap.c
new file mode 100644
index 000000000..891f48446
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/like_jis/keymap.c
@@ -0,0 +1,170 @@
1#include QMK_KEYBOARD_H
2#include "keymap_jp.h"
3
4extern keymap_config_t keymap_config;
5
6#ifdef RGBLIGHT_ENABLE
7//Following line allows macro to read current RGB settings
8extern rgblight_config_t rgblight_config;
9#endif
10
11// Each layer gets a name for readability, which is then used in the keymap matrix below.
12// The underscores don't mean anything - you can have a layer called STUFF or any other name.
13// Layer names don't all need to be of the same length, obviously, and you can also skip them
14// entirely and just use numbers.
15enum layer_number {
16 _BASE = 0,
17 _LOWER,
18 _RAISE,
19 _ADJUST,
20};
21
22enum custom_keycodes {
23 RGBRST = SAFE_RANGE,
24 LOWER,
25 RAISE,
26 KANJI,
27};
28
29// enum tapdances{
30// TD_CODO = 0,
31// TD_SLRO,
32// };
33
34// Layer Mode aliases
35#define KC_MLAD MO(_ADJUST)
36
37// Base layer mod tap
38#define KC_A_SF LSFT_T(KC_A)
39#define KC_Z_CT LCTL_T(KC_Z)
40#define KC_X_AL LALT_T(KC_X)
41#define KC_C_GU LGUI_T(KC_C)
42#define KC_SSCT LCTL_T(KC_SLSH)
43#define KC_ENSF LSFT_T(KC_ENT)
44
45// Lower layer mod tap
46#define KC_F6SF LSFT_T(KC_F6)
47#define KC_BSSF LSFT_T(KC_BSLS)
48#define KC_11CT LCTL_T(KC_F11)
49#define KC_12AL LALT_T(KC_F12)
50
51// Layer tap
52#define KC_BSLO LT(_LOWER, KC_BSPC)
53#define KC_SPRA LT(_RAISE, KC_SPC)
54
55// Tap dance
56// #define KC_CODO TD(TD_CODO)
57// #define KC_SLRO TD(TD_SLRO)
58
59// qk_tap_dance_action_t tap_dance_actions[] = {
60// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
61// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
62// };
63
64const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
65 [_BASE] = LAYOUT(
66 //,---------------------------------------------------------------------------------------------------.
67 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
68 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
69 KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF,
70 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
71 KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT,
72 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
73 KC_BSLO, KC_SPRA
74 // `---------|---------'
75 ),
76
77 [_LOWER] = LAYOUT(
78 //,---------------------------------------------------------------------------------------------------.
79 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC,
80 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
81 KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF,
82 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
83 KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_RO,
84 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
85 _______, KC_MLAD
86 // `---------|---------'
87 ),
88
89 [_RAISE] = LAYOUT(
90 //,---------------------------------------------------------------------------------------------------.
91 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
92 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
93 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT,
94 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
95 KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT,
96 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
97 _______, _______
98 // `---------|---------'
99 ),
100
101 [_ADJUST] = LAYOUT(
102 //,---------------------------------------------------------------------------------------------------.
103 RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
104 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
105 RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
106 //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
107 RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX,
108 //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------'
109 _______, _______
110 // `---------|---------'
111 )
112};
113
114uint16_t get_tapping_term(uint16_t keycode) {
115 switch (keycode) {
116 case KC_BSLO:
117 return TAPPING_LAYER_TERM;
118 case KC_SPRA:
119 return TAPPING_LAYER_TERM;
120 default:
121 return TAPPING_TERM;
122 }
123}
124
125int RGB_current_mode;
126bool process_record_user(uint16_t keycode, keyrecord_t *record) {
127
128 bool result = false;
129 switch (keycode) {
130 case KANJI:
131 if (record->event.pressed) {
132 if (keymap_config.swap_lalt_lgui == false) {
133 register_code(KC_LANG2);
134 } else {
135 SEND_STRING(SS_LALT("`"));
136 }
137 } else {
138 unregister_code(KC_LANG2);
139 }
140 break;
141 #ifdef RGBLIGHT_ENABLE
142 //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
143 case RGB_MOD:
144 if (record->event.pressed) {
145 rgblight_mode(RGB_current_mode);
146 rgblight_step();
147 RGB_current_mode = rgblight_config.mode;
148 }
149 break;
150 case RGBRST:
151 if (record->event.pressed) {
152 eeconfig_update_rgblight_default();
153 rgblight_enable();
154 RGB_current_mode = rgblight_config.mode;
155 }
156 break;
157 #endif
158 default:
159 result = true;
160 break;
161 }
162
163 return result;
164}
165
166void keyboard_post_init_user(void) {
167 #ifdef RGBLIGHT_ENABLE
168 RGB_current_mode = rgblight_config.mode;
169 #endif
170}
diff --git a/keyboards/treadstone32/keymaps/like_jis/readme.md b/keyboards/treadstone32/keymaps/like_jis/readme.md
new file mode 100644
index 000000000..206133ee7
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/like_jis/readme.md
@@ -0,0 +1,5 @@
1# The like jis type keyboard keymap for treadstone32
2
3## Description
4
5## How to use
diff --git a/keyboards/treadstone32/keymaps/like_jis/readme_jp.md b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md
new file mode 100644
index 000000000..3242f101e
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md
@@ -0,0 +1,55 @@
1# JISキーボードライクなキーマップ
2
3## 概要
4
5 デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。
6
7## キーマップの見かた
8
9qmk_firmware\tmk_core\common\keycode.h
10に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
11
12Leyer Tap、Mod TapというQMKの機能を使っています。
13
14Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
15例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
16
17Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
18例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
19
20もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
21
22## 機能
23
24 QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
25 Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。
26
27## OS切り替え方法
28
29 Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
30
31- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
32- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
33
34## IME切り替え方法
35
36 Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
37
38## ソフトウェアリセットについて
39
40 キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
41 LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。
42
43## LEDの点灯切り替え方法
44
45 Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
46
47- RGBRST: LEDのリセット
48- RGB_TOG: LEDのON/OFF切り替え
49- RGB_MOD: LEDの光り方の変更
50- RGB_HUI: Hue+ 色合いを変更
51- RGB_HUD: Hue- 色合いを変更
52- RGB_SAI: Saturation+ 色の濃さを変更
53- RGB_SAD: Saturation- 色の濃さを変更
54- RGB_VAI: Value+ 明るさを変更
55- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone32/keymaps/like_jis/rules.mk b/keyboards/treadstone32/keymaps/like_jis/rules.mk
new file mode 100644
index 000000000..8c4541fa1
--- /dev/null
+++ b/keyboards/treadstone32/keymaps/like_jis/rules.mk
@@ -0,0 +1,25 @@
1
2# Build Options
3# change to "no" to disable the options, or define them in the Makefile in
4# the appropriate keymap folder that will get included automatically
5#
6TAP_DANCE_ENABLE = no
7
8# If your custom treadstone32 pcb, you can rewrite to yes.
9RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
10LED_ANIMATIONS = yes # LED animations
11
12# Other selectable option
13IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
14
15ifeq ($(strip $(LED_ANIMATIONS)), yes)
16 # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
17 OPT_DEFS += -DLED_ANIMATIONS
18endif
19
20ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
21 OPT_DEFS += -DIOS_DEVICE_ENABLE
22endif
23
24# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
25SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/treadstone32/readme.md b/keyboards/treadstone32/readme.md
new file mode 100644
index 000000000..989a29c20
--- /dev/null
+++ b/keyboards/treadstone32/readme.md
@@ -0,0 +1,18 @@
1# treadstone32
2
3![treadstone32](https://github.com/marksard/Keyboards/raw/master/_image/20190421-P4210001.jpg)
4
5A 32-key Symmetric staggered keyboard.
6
7Keyboard Maintainer: [marksard](https://github.com/marksard)
8Hardware Supported: The PCBs, controllers supported
9Hardware Availability: links to where you can find this hardware
10
11Make example for this keyboard (after setting up your build environment):
12
13 make treadstone32:default:dfu
14
15See 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).
16
17[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstone32/documents/treadstone32_buildguide.md)
18[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone32)
diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk
new file mode 100644
index 000000000..1d37dfc69
--- /dev/null
+++ b/keyboards/treadstone32/rules.mk
@@ -0,0 +1,64 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Bootloader selection
37# Teensy halfkay
38# Pro Micro caterina
39# Atmel DFU atmel-dfu
40# LUFA DFU lufa-dfu
41# QMK DFU qmk-dfu
42# atmega32a bootloadHID
43BOOTLOADER = atmel-dfu
44
45# Interrupt driven control endpoint task(+60)
46OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
47
48# Build Options
49# change yes to no to disable
50#
51BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
52MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
53EXTRAKEY_ENABLE = no # Audio control and System control(+450)
54CONSOLE_ENABLE = no # Console for debug(+400)
55COMMAND_ENABLE = no # Commands for debug and configuration
56NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
57BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
58MIDI_ENABLE = no # MIDI controls
59AUDIO_ENABLE = no # Audio output on port C6
60UNICODE_ENABLE = no # Unicode
61BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
62RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
63LEADER_ENABLE = no
64
diff --git a/keyboards/treadstone32/treadstone32.c b/keyboards/treadstone32/treadstone32.c
new file mode 100644
index 000000000..9d27f86ff
--- /dev/null
+++ b/keyboards/treadstone32/treadstone32.c
@@ -0,0 +1,43 @@
1/* Copyright 2019 marksard
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "treadstone32.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
diff --git a/keyboards/treadstone32/treadstone32.h b/keyboards/treadstone32/treadstone32.h
new file mode 100644
index 000000000..90181124c
--- /dev/null
+++ b/keyboards/treadstone32/treadstone32.h
@@ -0,0 +1,45 @@
1/* Copyright 2019 marksard.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20#define K_N KC_NO
21
22/* This a shortcut to help you visually see your layout.
23 *
24 * The first section contains all of the arguments representing the physical
25 * layout of the board and position of the keys.
26 *
27 * The second converts the arguments into a two-dimensional array which
28 * represents the switch matrix.
29 */
30#define LAYOUT( \
31 L09, L08, L07, L06, L05, L04, L03, L02, L01, L00, \
32 L19, L18, L17, L16, L15, L14, L13, L12, L11, L10, \
33 L29, L28, L27, L26, L25, L24, L23, L22, L21, L20, \
34 L35, L34 \
35 ) \
36 { \
37 { L00, L01, L02, L03, L04 }, \
38 { L10, L11, L12, L13, L14 }, \
39 { L20, L21, L22, L23, L24 }, \
40 { K_N, K_N, K_N, K_N, L34 }, \
41 { L05, L06, L07, L08, L09 }, \
42 { L15, L16, L17, L18, L19 }, \
43 { L25, L26, L27, L28, L29 }, \
44 { L35, K_N, K_N, K_N, K_N } \
45 }