aboutsummaryrefslogtreecommitdiff
path: root/keyboards/a_dux
diff options
context:
space:
mode:
authorAlbert Engelbrecht <me@albertengelbrecht.com>2021-09-24 02:30:52 -0500
committerGitHub <noreply@github.com>2021-09-24 00:30:52 -0700
commit77bb907feeb17f5a97544276d8a2e1b9cb512038 (patch)
tree3e475f505daabfd4a47fbbcad93672ca2e4aa5d4 /keyboards/a_dux
parentc6f92e37aad673e9f6bc7694d5f8829bbb8b87de (diff)
downloadqmk_firmware-77bb907feeb17f5a97544276d8a2e1b9cb512038.tar.gz
qmk_firmware-77bb907feeb17f5a97544276d8a2e1b9cb512038.zip
[Keyboard] Added A. Dux keyboard configurations (#14320)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/a_dux')
-rw-r--r--keyboards/a_dux/a_dux.c16
-rw-r--r--keyboards/a_dux/a_dux.h47
-rw-r--r--keyboards/a_dux/config.h76
-rw-r--r--keyboards/a_dux/info.json52
-rw-r--r--keyboards/a_dux/keymaps/default/config.h39
-rw-r--r--keyboards/a_dux/keymaps/default/keymap.json106
-rw-r--r--keyboards/a_dux/keymaps/default/readme.md122
-rw-r--r--keyboards/a_dux/keymaps/jcmkk3/keymap.c130
-rw-r--r--keyboards/a_dux/keymaps/jcmkk3/oneshot.c72
-rw-r--r--keyboards/a_dux/keymaps/jcmkk3/oneshot.h46
-rw-r--r--keyboards/a_dux/keymaps/jcmkk3/rules.mk1
-rw-r--r--keyboards/a_dux/readme.md38
-rw-r--r--keyboards/a_dux/rules.mk23
13 files changed, 768 insertions, 0 deletions
diff --git a/keyboards/a_dux/a_dux.c b/keyboards/a_dux/a_dux.c
new file mode 100644
index 000000000..69eae4428
--- /dev/null
+++ b/keyboards/a_dux/a_dux.c
@@ -0,0 +1,16 @@
1/* Copyright 2018-2020 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp> David Philip Barr <@davidphilipbarr> Pierre Chevalier <pierrechevalier83@gmail.com>
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 "a_dux.h"
diff --git a/keyboards/a_dux/a_dux.h b/keyboards/a_dux/a_dux.h
new file mode 100644
index 000000000..1edea4033
--- /dev/null
+++ b/keyboards/a_dux/a_dux.h
@@ -0,0 +1,47 @@
1/* Copyright 2018-2020 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp> David Philip Barr <@davidphilipbarr> Pierre Chevalier <pierrechevalier83@gmail.com>
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
17#include "quantum.h"
18
19/* This a shortcut to help you visually see your layout.
20 *
21 * The first section contains all of the arguments representing the physical
22 * layout of the board and position of the keys.
23 *
24 * The second converts the arguments into a two-dimensional array which
25 * represents the switch matrix.
26 */
27
28// readability
29#define ___ KC_NO
30
31#define LAYOUT( \
32 L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \
33 L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \
34 L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \
35 L16, L17, R16, R17 \
36 ) \
37 { \
38 { L01, L02, L03, L04, L05 }, \
39 { L06, L07, L08, L09, L10 }, \
40 { L11, L12, L13, L14, L15 }, \
41 { L16, L17, ___, ___ , ___}, \
42 { R01, R02, R03, R04, R05 }, \
43 { R06, R07, R08, R09, R10 }, \
44 { R11, R12, R13, R14, R15 }, \
45 { R16, R17, ___, ___, ___ } \
46 }
47
diff --git a/keyboards/a_dux/config.h b/keyboards/a_dux/config.h
new file mode 100644
index 000000000..bacc4f14c
--- /dev/null
+++ b/keyboards/a_dux/config.h
@@ -0,0 +1,76 @@
1/* Copyright 2018-2020 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp> David Philip Barr <@davidphilipbarr> Pierre Chevalier <pierrechevalier83@gmail.com>
2
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xC2AB
23#define PRODUCT_ID 0x3939
24#define DEVICE_VER 0x0001
25#define MANUFACTURER tapioki
26#define PRODUCT Architeuthis dux
27
28/* key matrix size */
29#define MATRIX_ROWS 8
30#define MATRIX_COLS 5
31
32/*
33 * Keyboard Matrix Assignments
34 *
35 * Change this to how you wired your keyboard
36 * COLS: AVR pins used for columns, left to right
37 * ROWS: AVR pins used for rows, top to bottom
38 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
39 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
40 * NO_DIODE = switches are directly connected to AVR pins
41 *
42*/
43#define DIRECT_PINS { \
44 { C6, D2, F7, B2, F4 }, \
45 { D7, D0, F6, B3, F5 }, \
46 { E6, D4, D3, B1, B6 }, \
47 { B4, B5, NO_PIN, NO_PIN, NO_PIN } \
48}
49
50#define DIRECT_PINS_RIGHT { \
51 { F4, B2, F7, D2, C6 }, \
52 { F5, B3, F6, D0, D7 }, \
53 { B6, B1, D3, D4, E6 }, \
54 { B5, B4, NO_PIN, NO_PIN, NO_PIN } \
55}
56
57
58
59#define UNUSED_PINS
60
61/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
62#define DEBOUNCE 5
63
64/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
65#define LOCKING_SUPPORT_ENABLE
66
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/* Serial settings */
71#define USE_SERIAL
72
73/* serial.c configuration for split keyboard */
74#define SOFT_SERIAL_PIN D1
75
76#define EE_HANDS
diff --git a/keyboards/a_dux/info.json b/keyboards/a_dux/info.json
new file mode 100644
index 000000000..e52895a58
--- /dev/null
+++ b/keyboards/a_dux/info.json
@@ -0,0 +1,52 @@
1{
2 "keyboard_name": "Architeuthis dux",
3 "url": "https://github.com/tapioki/cephalopoda",
4 "maintainer": "@tapioki",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 {"x": 0, "y": 0.93},
9 {"x": 1, "y": 0.31},
10 {"x": 2, "y": 0},
11 {"x": 3, "y": 0.28},
12 {"x": 4, "y": 0.42},
13
14 {"x": 7, "y": 0.42},
15 {"x": 8, "y": 0.28},
16 {"x": 9, "y": 0},
17 {"x": 10, "y": 0.31},
18 {"x": 11, "y": 0.93},
19
20 {"x": 0, "y": 1.93},
21 {"x": 1, "y": 1.31},
22 {"x": 2, "y": 1},
23 {"x": 3, "y": 1.28},
24 {"x": 4, "y": 1.42},
25
26 {"x": 7, "y": 1.42},
27 {"x": 8, "y": 1.28},
28 {"x": 9, "y": 1},
29 {"x": 10, "y": 1.31},
30 {"x": 11, "y": 1.93},
31
32 {"x": 0, "y": 2.93},
33 {"x": 1, "y": 2.31},
34 {"x": 2, "y": 2},
35 {"x": 3, "y": 2.28},
36 {"x": 4, "y": 2.42},
37
38 {"x": 7, "y": 2.42},
39 {"x": 8, "y": 2.28},
40 {"x": 9, "y": 2},
41 {"x": 10, "y": 2.31},
42 {"x": 11, "y": 2.93},
43
44 {"x": 3.5, "y": 3.75},
45 {"x": 4.5, "y": 4},
46
47 {"x": 6.5, "y": 4},
48 {"x": 7.5, "y": 3.75}
49 ]
50 }
51 }
52}
diff --git a/keyboards/a_dux/keymaps/default/config.h b/keyboards/a_dux/keymaps/default/config.h
new file mode 100644
index 000000000..cf0fb7478
--- /dev/null
+++ b/keyboards/a_dux/keymaps/default/config.h
@@ -0,0 +1,39 @@
1/*
2Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
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// Set the mouse settings to a comfortable speed/accuracy trade-off,
20// assuming a screen refresh rate of 60 Htz or higher
21// The default is 50. This makes the mouse ~3 times faster and more accurate
22#define MOUSEKEY_INTERVAL 16
23// The default is 20. Since we made the mouse about 3 times faster with the previous setting,
24// give it more time to accelerate to max speed to retain precise control over short distances.
25#define MOUSEKEY_TIME_TO_MAX 40
26// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive
27#define MOUSEKEY_DELAY 100
28// It makes sense to use the same delay for the mouseweel
29#define MOUSEKEY_WHEEL_DELAY 100
30// The default is 100
31#define MOUSEKEY_WHEEL_INTERVAL 50
32// The default is 40
33#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
34
35// Pick good defaults for enabling homerow modifiers
36#define TAPPING_TERM 200
37#define PERMISSIVE_HOLD
38#define IGNORE_MOD_TAP_INTERRUPT
39#define TAPPING_FORCE_HOLD
diff --git a/keyboards/a_dux/keymaps/default/keymap.json b/keyboards/a_dux/keymaps/default/keymap.json
new file mode 100644
index 000000000..555a86c0b
--- /dev/null
+++ b/keyboards/a_dux/keymaps/default/keymap.json
@@ -0,0 +1,106 @@
1{ "version": 1,
2 "notes": "My awesome keymap",
3 "documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
4 "keyboard": "a_dux",
5 "keymap": "default",
6 "layout": "LAYOUT",
7 "layers": [
8 ["KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T",
9 "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P",
10
11 "LSFT_T(KC_A)", "LT(5,KC_S)" , "LT(1,KC_D)" , "LT(3,KC_F)" , "KC_G",
12 "KC_H" , "LT(4,KC_J)" , "LT(2,KC_K)" , "LT(6,KC_L)" , "LSFT_T(KC_SCLN)",
13
14 "KC_Z" , "LCTL_T(KC_X)", "LALT_T(KC_C)" , "KC_V" , "KC_B",
15 "KC_N" , "KC_M" , "LALT_T(KC_COMM)", "LCTL_T(KC_DOT)", "KC_SLSH",
16
17 "KC_P0" , "KC_BSPC",
18 "LT(7,KC_SPC)", "KC_P1"
19 ],
20 ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
21 "KC_TRNS" , "KC_BTN1" , "KC_WH_U" , "KC_BTN2" , "KC_TRNS",
22
23 "KC_TRNS" , "KC_BTN2" , "KC_NO" , "KC_BTN1" , "KC_TRNS",
24 "KC_TRNS" , "KC_MS_L" , "KC_MS_D" , "KC_MS_U" , "KC_MS_R",
25
26 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
27 "KC_TRNS" , "KC_WH_L" , "KC_WH_D" , "KC_WH_R" , "KC_TRNS",
28
29 "KC_TRNS" , "KC_TRNS",
30 "KC_TRNS" , "KC_TRNS"
31 ],
32 ["KC_TRNS" , "KC_TRNS" , "KC_PGUP" , "KC_TRNS" , "KC_TRNS",
33 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
34
35 "KC_LEFT" , "KC_UP" , "KC_DOWN" , "KC_RGHT" , "KC_TRNS",
36 "KC_TRNS" , "KC_LGUI" , "KC_NO" , "LCTL(KC_LALT)" , "LCA(KC_LSFT)",
37
38 "KC_TRNS" , "KC_HOME" , "KC_PGDN" , "KC_END" , "KC_TRNS",
39 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
40
41 "KC_TRNS" , "KC_TRNS",
42 "KC_TRNS" , "KC_TRNS"
43 ],
44 ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
45 "KC_TRNS" , "KC_UNDS" , "KC_PIPE" , "KC_QUOT" , "KC_TRNS",
46
47 "KC_CIRC" , "KC_ASTR" , "KC_AMPR" , "KC_NO" , "KC_TRNS",
48 "KC_HASH" , "KC_TILD" , "KC_SLSH" , "KC_DQUO" , "KC_DLR",
49
50 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
51 "KC_TRNS" , "KC_MINS" , "KC_BSLS" , "KC_GRV" , "KC_TRNS",
52
53 "KC_TRNS" , "KC_TRNS",
54 "KC_TRNS" , "KC_TRNS"
55 ],
56 ["KC_TRNS" , "KC_COLN" , "KC_LT" , "KC_GT" , "KC_SCLN",
57 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
58
59 "KC_LCBR" , "KC_RCBR" , "KC_LPRN" , "KC_RPRN" , "KC_AT",
60 "KC_TRNS" , "KC_NO" , "KC_EQL" , "KC_PLUS" , "KC_PERC",
61
62 "KC_TRNS" , "KC_EXLM" , "KC_LBRC" , "KC_RBRC" , "KC_TRNS",
63 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
64
65 "KC_VOLD" , "KC_TRNS",
66 "KC_TRNS" , "KC_VOLU"
67 ],
68 ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
69 "KC_TRNS" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10",
70
71 "KC_TRNS" , "KC_NO" , "LCTL(KC_LALT)" , "KC_TRNS" , "KC_TRNS",
72 "KC_TRNS" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F11",
73
74 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
75 "KC_TRNS" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F12",
76
77 "KC_TRNS" , "KC_TRNS",
78 "KC_TRNS" , "KC_TRNS"
79 ],
80 ["KC_PSLS" , "KC_7" , "KC_8" , "KC_9" , "KC_PPLS",
81 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
82
83 "KC_0" , "KC_1" , "KC_2" , "KC_3" , "KC_PMNS",
84 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_NO" , "KC_TRNS",
85
86 "KC_PAST" , "KC_4" , "KC_5" , "KC_6" , "KC_PEQL",
87 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
88
89 "KC_TRNS" , "KC_TRNS",
90 "KC_TRNS" , "KC_TRNS"
91 ],
92 ["KC_TRNS" , "KC_TRNS" , "KC_COLN" , "KC_ESC" , "KC_TRNS",
93 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_DEL",
94
95 "KC_TRNS" , "KC_PERC" , "KC_SLSH" , "KC_ENT" , "KC_TRNS",
96 "DF(1)" , "KC_LGUI" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS",
97
98 "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_EXLM" , "KC_TRNS",
99 "DF(0)" , "KC_TRNS" , "RALT_T(KC_COMM)", "RCTL_T(KC_DOT)", "RESET",
100
101 "KC_TRNS" , "KC_TAB",
102 "KC_NO" , "KC_TRNS"
103 ]
104 ],
105 "author": "@pierrec83"
106}
diff --git a/keyboards/a_dux/keymaps/default/readme.md b/keyboards/a_dux/keymaps/default/readme.md
new file mode 100644
index 000000000..5f67a69cb
--- /dev/null
+++ b/keyboards/a_dux/keymaps/default/readme.md
@@ -0,0 +1,122 @@
1A usable default keymap for the A. Dux keyboard
2===============================================
3
4Keymaps in general are quite personal, so it is difficult to come up with a default that will suit every user.
5
6This keymap makes heavy use of keys behaving differently when tapped and held, so that all the keys one may need remain accessible despite the low number of thumb keys.
7
8It comes with a number of layers to give access to most of the keys one may need on a keyboard. It is not meant to be the best possible keymap, but rather a good base on which to build a keymap that works for you.
9
10This is not the only way to make 34 keys a comfortable typing experience, but it is one way to do so. If you don't already know of a better way, this may be as good a starting point as any :)
11
12Note that this keymap was built from the perspective that it is OK to take a steep learning curve if it results in a keymap that is easier to use in the long run. This means that it may take more effort to learn this keymap than some alternatives. "Easy to use" was assessed against the workflow of the author, so your mileage may vary on some of the details.
13
14What do all these layers do?
15----------------------------
16
17### Layer 0: Base layer
18
19![Layer 0](https://i.imgur.com/HjNHUPL.png)
20
21On tapping the keys, our base layer is qwerty with space on the right homing thumb and backspace on the left homing thumb.
22
23In this layer, the non-homing-thumb positions have 0 and 1. I recommend modifying this to some frequently accessed shortcut such as copy/paste, previous/next tab or anything that makes most sense in your own workflow. O and 1 are place-holders and make it easy to troubleshoot that all keys are working properly before soldering in the switches.
24The reason I recommend convenience shortcuts instead of more commonly used keys like tab or meta is that unhoming of the thumbs was a frequent source of typos for me when I used more than one thumb key frequently in the context of typing.
25
26Despite being missing on this layer, "meta", "tab", "esc" and such are accessible from any other layer: see Layer 7.
27
28The behaviour of some keys differ when held:
29* Both homing pinkies behave as shift.
30* Both bottom-row ring fingers behave as ctrl.
31* Both bottom-row middle fingers behave as alt.
32
33* The homing left ring finger gives access to the Function keys layer
34* The homing right ring finger gives access to the Numbers layer
35* The homing left middle finger gives access to the Mouse layer
36* The homing right middle finger gives access to the Navigation layer
37* The homing left index finger gives access to the Right symbols layer
38* The homing right index finger gives access to the Left symbols layer
39* The homing right thumb gives access to the Always accessible layer
40
41### Layer 1: Mouse
42
43![Layer 1](https://i.imgur.com/0fvTuB9.png)
44
45Layer 1 is a mouse layer: it can be used one-handed or two-handed. The most common way to use it is two handed, with left and right click on the homerow of the left hand and directions on the homerow of the right hand.
46Scrolling is available on the right hand with mid finger up and down for vertical scroll and index and ring finger down for horizontal scroll.
47On the right hand, left click and right click are also available with index and ring finger up to allow one handed operation. This can be particularly handy when enabling the mouse layer permanently (no need to hold the left middle finger), which can be done from Layer 7.
48
49Note that thanks to the transparency, shift, ctrl and alt are all accessible on the left hand while operating the mouse.
50
51### Layer 2: Navigation
52
53![Layer 2](https://i.imgur.com/ZquQJRq.png)
54
55The navigation layer somewhat mirrors the mouse layer. It is accessed by holding the right middle finger and gives access to arrow keys on the left homerow. Page up and down, Home and End mirror the vertical scrolling and horizontal scrolling on the mouse layer.
56
57On the right hand, in addition to ctrl and alt which are available through transparency, ctrl + alt, ctrl + alt + shift and meta are accessible on the homerow to enable common shortcuts in some window managers. This part is quite workflow dependent, so make sure to adapt it to your own workflow as appropriate.
58
59### Layer 3: Right symbols
60
61![Layer 3](https://i.imgur.com/9tLAUqG.png)
62
63When holding down the left index, one may access about half of the symbols. The pinkies store `^` and `$` symbols that represent begin and end in vim. The left homerow hosts `*` and `&`, symbols which are related in the way that they represent some form of indirection in programming languages such as rust. On the right hand, most symbols used when navigating the command line are stored together, organized by columns of related symbols.
64
65### Layer 4: Left symbols
66
67![Layer 4](https://i.imgur.com/CkjUSW6.png)
68
69When holding down the right index, one may access the other symbols. On the left hand, most of the different brackets are laid out. The most frequent ones (round brackets and curly brackets) get a spot on the homerow. The rest of the layer hosts the remaining symbols that are easier to access here than on any other layers.
70
71### Layer 5: Function keys
72
73![Layer 5](https://i.imgur.com/fWgVqc4.png)
74
75By holding down the left ring finger, one may access the function keys, roughly in a numpad layout.
76This means that alt+F4 is easy to type, with F4 being on the homerow.
77There is a shortcut for ctrl+alt on the left hand to enable convenient switching between virtual terminals on Linux.
78
79### Layer 6: Numbers
80
81![Layer 6](https://i.imgur.com/S8gq9Kj.png)
82
83The number layer is accessed by holding the right ring finger. It hosts the numbers and some duplicated symbols that are commonly accessed next to numbers, such as mathematical operators.
84The number are layed out similarly to a numpad, but with the middle row and the homerow swapped so that the most used numbers: 0, 1, 2 and 3 are all available in homing positions.
85
86### Layer 7: Always accessible
87
88![Layer 7](https://i.imgur.com/twqBeBb.png)
89
90Layer 7 is accessed by holding the right homing thumb down. Because this position is left transparent from every other layer, this layer is always accessible.
91It gives access to some essential keys that would typically be accessed on a thumb cluster or pinkies, such as meta, enter, tab, esc and delete.
92
93As the layer hosting esc, we duplicated some symbols here to allow for fast navigation in vim. For instance, esc, :, w, q can be done in a single roll.
94
95Where is the keymap.c?
96----------------------
97
98The keymap.c file is not published to the repository. It is generated from `keymap.json` by the build system.
99
100This avoids duplicating information and allow users to edit their keymap from the qmk configurator web interface.
101
102How do I edit and update the keymap?
103------------------------------------
104
105The `keymap.json` file is generated from the qmk configurator interface and formatted for better readability in the context of the A. Dux keyboard.
106
107To edit it, you may:
108* Edit it directly from a text editor.
109* Edit it from the qmk configurator.
110
111If you decide to use the latter workflow, here are the steps to follow:
112
113* From the qmk configurator, hit the "import QMK keymap json file" button (it has a drawing with an up arrow on it).
114* Browse to the location of your keymap (for example, `<your qmk repo>/keyboards/a_dux/keymaps/default/keymap.json`)
115* Perform any modification to the keymap in the web UI
116* Export the keymap to your downloads folder, by hitting the "Export QMK keymap json file" button (it has a drawing with a down arrow on it)
117* Override your original keymap with the output of formatting the exported keymap by running a command such as this one from the root of your qmk repo:
118 ```
119 ./keyboards/a_dux/keymaps/json2crab.py --input <Your download directory>/default.json > ./keyboards/a_dux/keymaps/default/keymap.json
120 ```
121 Note that you may first need to make json2crab executable by using `chmod +x` on it.
122 Also note that you may then want to remove the exported keymap from your dowload directory.
diff --git a/keyboards/a_dux/keymaps/jcmkk3/keymap.c b/keyboards/a_dux/keymaps/jcmkk3/keymap.c
new file mode 100644
index 000000000..608e0c522
--- /dev/null
+++ b/keyboards/a_dux/keymaps/jcmkk3/keymap.c
@@ -0,0 +1,130 @@
1/* Copyright 2021 @jcmkk3
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 QMK_KEYBOARD_H
17
18#include "oneshot.h"
19
20#define LA_UPP OSL(UPP)
21#define LA_SYM OSL(SYM)
22#define LA_NAV MO(NAV)
23
24enum layers {
25 DEF,
26 UPP,
27 SYM,
28 NAV,
29 NUM,
30};
31
32enum keycodes {
33 // Custom oneshot mod implementation with no timers.
34 OS_SHFT = SAFE_RANGE,
35 OS_CTRL,
36 OS_ALT,
37 OS_GUI,
38};
39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41 [DEF] = LAYOUT(
42 KC_Y, KC_C, KC_L, KC_M, KC_K, KC_Z, KC_F, KC_U, KC_QUOT, KC_DQUO,
43 KC_I, KC_S, KC_R, KC_T, KC_G, KC_P, KC_N, KC_E, KC_A, KC_O,
44 KC_Q, KC_V, KC_W, KC_D, KC_J, KC_B, KC_H, KC_COMM, KC_DOT, KC_X,
45 LA_NAV, KC_SPC, LA_UPP, LA_SYM
46 ),
47
48 [UPP] = LAYOUT(
49 S(KC_Y), S(KC_C), S(KC_L), S(KC_M), S(KC_K), S(KC_Z), S(KC_F), S(KC_U), KC_EXLM, KC_QUES,
50 S(KC_I), S(KC_S), S(KC_R), S(KC_T), S(KC_G), S(KC_P), S(KC_N), S(KC_E), S(KC_A), S(KC_O),
51 S(KC_Q), S(KC_V), S(KC_W), S(KC_D), S(KC_J), S(KC_B), S(KC_H), KC_SCLN, KC_COLN, S(KC_X),
52 _______, _______, _______, _______
53 ),
54
55 [SYM] = LAYOUT(
56 KC_LABK, KC_LCBR, KC_LBRC, KC_LPRN, KC_CIRC, KC_DLR, KC_RPRN, KC_RBRC, KC_RCBR, KC_RABK,
57 KC_HASH, KC_UNDS, KC_EQL, KC_MINS, KC_PLUS, KC_AMPR, OS_CTRL, OS_SHFT, OS_ALT, OS_GUI,
58 KC_PERC, KC_GRV, KC_TILD, KC_SLSH, KC_ASTR, KC_PIPE, KC_BSLS, KC_SCLN, KC_COLN, KC_AT,
59 _______, _______, _______, _______
60 ),
61
62 [NAV] = LAYOUT(
63 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TAB, KC_UP, KC_ENT, KC_DEL,
64 OS_GUI, OS_ALT, OS_SHFT, OS_CTRL, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
65 C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
66 _______, _______, KC_BSPC, _______
67 ),
68
69 [NUM] = LAYOUT(
70 KC_7, KC_5, KC_3, KC_1, KC_9, KC_8, KC_0, KC_2, KC_4, KC_6,
71 OS_GUI, OS_ALT, OS_SHFT, OS_CTRL, XXXXXXX, XXXXXXX, OS_CTRL, OS_SHFT, OS_ALT, OS_GUI,
72 XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH,
73 _______, _______, KC_BSPC, _______
74 ),
75};
76
77bool is_oneshot_cancel_key(uint16_t keycode) {
78 switch (keycode) {
79 case LA_SYM:
80 case LA_NAV:
81 return true;
82 default:
83 return false;
84 }
85}
86
87bool is_oneshot_ignored_key(uint16_t keycode) {
88 switch (keycode) {
89 case LA_SYM:
90 case LA_NAV:
91 case KC_LSFT:
92 case OS_SHFT:
93 case OS_CTRL:
94 case OS_ALT:
95 case OS_GUI:
96 return true;
97 default:
98 return false;
99 }
100}
101
102oneshot_state os_shft_state = os_up_unqueued;
103oneshot_state os_ctrl_state = os_up_unqueued;
104oneshot_state os_alt_state = os_up_unqueued;
105oneshot_state os_gui_state = os_up_unqueued;
106
107bool process_record_user(uint16_t keycode, keyrecord_t *record) {
108 update_oneshot(
109 &os_shft_state, KC_LSFT, OS_SHFT,
110 keycode, record
111 );
112 update_oneshot(
113 &os_ctrl_state, KC_LCTL, OS_CTRL,
114 keycode, record
115 );
116 update_oneshot(
117 &os_alt_state, KC_LALT, OS_ALT,
118 keycode, record
119 );
120 update_oneshot(
121 &os_gui_state, KC_LGUI, OS_GUI,
122 keycode, record
123 );
124
125 return true;
126}
127
128layer_state_t layer_state_set_user(layer_state_t state) {
129 return update_tri_layer_state(state, SYM, NAV, NUM);
130}
diff --git a/keyboards/a_dux/keymaps/jcmkk3/oneshot.c b/keyboards/a_dux/keymaps/jcmkk3/oneshot.c
new file mode 100644
index 000000000..e84b5a7b1
--- /dev/null
+++ b/keyboards/a_dux/keymaps/jcmkk3/oneshot.c
@@ -0,0 +1,72 @@
1/* Copyright 2021 @jcmkk3
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 "oneshot.h"
17
18void update_oneshot(
19 oneshot_state *state,
20 uint16_t mod,
21 uint16_t trigger,
22 uint16_t keycode,
23 keyrecord_t *record
24) {
25 if (keycode == trigger) {
26 if (record->event.pressed) {
27 // Trigger keydown
28 if (*state == os_up_unqueued) {
29 register_code(mod);
30 }
31 *state = os_down_unused;
32 } else {
33 // Trigger keyup
34 switch (*state) {
35 case os_down_unused:
36 // If we didn't use the mod while trigger was held, queue it.
37 *state = os_up_queued;
38 break;
39 case os_down_used:
40 // If we did use the mod while trigger was held, unregister it.
41 *state = os_up_unqueued;
42 unregister_code(mod);
43 break;
44 default:
45 break;
46 }
47 }
48 } else {
49 if (record->event.pressed) {
50 if (is_oneshot_cancel_key(keycode) && *state != os_up_unqueued) {
51 // Cancel oneshot on designated cancel keydown.
52 *state = os_up_unqueued;
53 unregister_code(mod);
54 }
55 } else {
56 if (!is_oneshot_ignored_key(keycode)) {
57 // On non-ignored keyup, consider the oneshot used.
58 switch (*state) {
59 case os_down_unused:
60 *state = os_down_used;
61 break;
62 case os_up_queued:
63 *state = os_up_unqueued;
64 unregister_code(mod);
65 break;
66 default:
67 break;
68 }
69 }
70 }
71 }
72}
diff --git a/keyboards/a_dux/keymaps/jcmkk3/oneshot.h b/keyboards/a_dux/keymaps/jcmkk3/oneshot.h
new file mode 100644
index 000000000..b88e68d1d
--- /dev/null
+++ b/keyboards/a_dux/keymaps/jcmkk3/oneshot.h
@@ -0,0 +1,46 @@
1/* Copyright 2021 @jcmkk3
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 QMK_KEYBOARD_H
19
20// Represents the four states a oneshot key can be in
21typedef enum {
22 os_up_unqueued,
23 os_up_queued,
24 os_down_unused,
25 os_down_used,
26} oneshot_state;
27
28// Custom oneshot mod implementation that doesn't rely on timers. If a mod is
29// used while it is held it will be unregistered on keyup as normal, otherwise
30// it will be queued and only released after the next non-mod keyup.
31void update_oneshot(
32 oneshot_state *state,
33 uint16_t mod,
34 uint16_t trigger,
35 uint16_t keycode,
36 keyrecord_t *record
37);
38
39// To be implemented by the consumer. Defines keys to cancel oneshot mods.
40bool is_oneshot_cancel_key(uint16_t keycode);
41
42// To be implemented by the consumer. Defines keys to ignore when determining
43// whether a oneshot mod has been used. Setting this to modifiers and layer
44// change keys allows stacking multiple oneshot modifiers, and carrying them
45// between layers.
46bool is_oneshot_ignored_key(uint16_t keycode);
diff --git a/keyboards/a_dux/keymaps/jcmkk3/rules.mk b/keyboards/a_dux/keymaps/jcmkk3/rules.mk
new file mode 100644
index 000000000..b7dcd87b1
--- /dev/null
+++ b/keyboards/a_dux/keymaps/jcmkk3/rules.mk
@@ -0,0 +1 @@
SRC += oneshot.c
diff --git a/keyboards/a_dux/readme.md b/keyboards/a_dux/readme.md
new file mode 100644
index 000000000..7d9956f1e
--- /dev/null
+++ b/keyboards/a_dux/readme.md
@@ -0,0 +1,38 @@
1# Architeuthis Dux
2
3![Architeuthis Dux](https://raw.githubusercontent.com/tapioki/cephalopoda/main/Images/architeuthis_dux.png)
4
5AKA A. dux, A.D., "Giant squid"
6
734 keys, same stagger as [D. gigas](https://github.com/tapioki/cephalopoda/tree/main/Dosidicus%20gigas), but with two thumb keys included. Pinky, ring, index, and inner columns splayed at 15, 5, 0, -5, -5 degrees. SplitKB Tenting Puck support. All PCB files are available on the [project's github page](https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux)
8
9Thank you [Perce](https://madebyperce.com/) for the logo.
10
11## Cases can be found here:
12
13* [Flat Case](https://github.com/madebyperce/aduxcase)
14* [Tented Case](https://github.com/jdart/adux-tent)
15* [Case with Plates](https://github.com/sadekbaroudi/cephalopoda/tree/main/Architeuthis%20dux/case)
16
17## Keyboard Info
18
19* Keyboard Maintainer: [tapioki](https://github.com/tapioki)
20* Hardware Supported: Architeuthis Dux
21* Hardware Availability: [GitHub](https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux)
22
23Make examples for this keyboard (after setting up your build environment):
24
25 make a_dux:default
26
27 make a_dux:default:avrdude-split-left
28 make a_dux:default:avrdude-split-right
29
30## Bootloader
31
32Enter the bootloader in 3 ways:
33
34* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
35* **Physical reset**: Briefly short the RST and GND pins on the microcontroller using tweezers, a paperclip, or any other conductive material.
36* **Keycode in layout**: Press the key mapped to `RESET` if it is available
37
38See 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).
diff --git a/keyboards/a_dux/rules.mk b/keyboards/a_dux/rules.mk
new file mode 100644
index 000000000..d7671a17b
--- /dev/null
+++ b/keyboards/a_dux/rules.mk
@@ -0,0 +1,23 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = yes # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21AUDIO_ENABLE = no # Audio output
22UNICODE_ENABLE = yes
23SPLIT_KEYBOARD = yes