aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjprMesh <mrachhh@gmail.com>2017-03-07 11:44:58 -0500
committerJonas Rogers <jprmesh@gmail.com>2017-06-17 21:18:04 -0400
commita5ba30338f8a1c8e7faaf90f4b05e7c5515d00b3 (patch)
tree4673a0258e638e787fd6c3fd7b4db07870d1f6d9
parent98316ef0170c6e0f994a45e1f62959ae0f278177 (diff)
downloadqmk_firmware-a5ba30338f8a1c8e7faaf90f4b05e7c5515d00b3.tar.gz
qmk_firmware-a5ba30338f8a1c8e7faaf90f4b05e7c5515d00b3.zip
Atreus52- Initial Atreus52 file creation.
-rw-r--r--keyboards/atreus62/keymaps/atreus52/Makefile5
-rw-r--r--keyboards/atreus62/keymaps/atreus52/README.md10
-rw-r--r--keyboards/atreus62/keymaps/atreus52/config.h23
-rw-r--r--keyboards/atreus62/keymaps/atreus52/keymap.c90
4 files changed, 128 insertions, 0 deletions
diff --git a/keyboards/atreus62/keymaps/atreus52/Makefile b/keyboards/atreus62/keymaps/atreus52/Makefile
new file mode 100644
index 000000000..046aec273
--- /dev/null
+++ b/keyboards/atreus62/keymaps/atreus52/Makefile
@@ -0,0 +1,5 @@
1TAP_DANCE_ENABLE = yes
2NKRO_ENABLE = true
3MOUSEKEY_ENABLE = no
4EXTRAKEY_ENABLE = yes
5CONSOLE_ENABLE = no
diff --git a/keyboards/atreus62/keymaps/atreus52/README.md b/keyboards/atreus62/keymaps/atreus52/README.md
new file mode 100644
index 000000000..245df7deb
--- /dev/null
+++ b/keyboards/atreus62/keymaps/atreus52/README.md
@@ -0,0 +1,10 @@
1<!-- -*- mode: markdown; fill-column: 8192 -*- -->
2
3Atreus52 Modification
4=======================
5
6Firmware for my custom keyboard based on the Atreus layout, but with 5 rows and only 5 columns per hand.
7More documentation coming soon.
8
9# License
10 GPL-3+
diff --git a/keyboards/atreus62/keymaps/atreus52/config.h b/keyboards/atreus62/keymaps/atreus52/config.h
new file mode 100644
index 000000000..80c3739b9
--- /dev/null
+++ b/keyboards/atreus62/keymaps/atreus52/config.h
@@ -0,0 +1,23 @@
1#include "../../config.h"
2
3#undef MANUFACTURER
4#undef PRODUCT
5#undef DESCRIPTION
6#undef MATRIX_ROWS
7#undef MATRIX_COLS
8#undef MATRIX_ROW_PINS
9#undef MATRIX_COL_PINS
10
11/* USB Device descriptor parameter */
12#define MANUFACTURER Mesh Industries
13#define PRODUCT Atreus52 Treeboard
14#define DESCRIPTION q.m.k. keyboard firmware for Atreus52
15
16/* key matrix size */
17#define MATRIX_ROWS 5
18#define MATRIX_COLS 11
19
20// wiring of each half
21#define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 }
22#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6 }
23
diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c
new file mode 100644
index 000000000..c64e9d498
--- /dev/null
+++ b/keyboards/atreus62/keymaps/atreus52/keymap.c
@@ -0,0 +1,90 @@
1// this is the style you want to emulate.
2// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
3
4#include "menelaus.h"
5
6#define ____ KC_TRNS
7#define xxxx KC_NO
8
9// Layers
10#define QW 0
11#define DV 1
12#define QL 2
13#define DL 3
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16[_QWERTY] = KEYMAP(
17 1, 2, 3, 4, 5, ____, 6, 7, 8, 9, 0, \
18 Q, W, E, R, T, ____, Y, U, I, O, P, \
19 A, S, D, F, G, ____, H, J, K, L, SCLN, \
20 Z, X, C, V, B, BSPC, N, M, COMM, DOT, SLSH, \
21 ESC, TAB, LCTL, MO(QL),LSFT, ENT, SPC, LALT, LGUI, LEFT, RGHT ),
22
23[_QUP] = KEYMAP(
24 F1, F2, F3, F4, F5, ____, F6, F7, F8, F9, F10, \
25 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
26 ____, ____, ____, ____, ____, ____, ____, LEFT, DOWN, UP, RGHT, \
27 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
28 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ),
29
30[_DVORAK] = KEYMAP(
31 1, 2, 3, 4, 5, ____, 6, 7, 8, 9, 0, \
32 QUOT, COMM, DOT, P, Y, ____, F, G, C, R, L, \
33 A, O, E, U, I, ____, D, H, T, N, S, \
34 SCLN, Q, J, K, X, BSPC, B, M, W, V, Z, \
35 ESC, TAB, LCTL, MO(DP),LSFT, ENT, SPC, LALT, LGUI, LEFT, RGHT ),
36
37[_QUP] = KEYMAP(
38 F1, F2, F3, F4, F5, ____, F6, F7, F8, F9, F10, \
39 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
40 ____, ____, ____, ____, ____, ____, ____, LEFT, DOWN, UP, RGHT, \
41 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
42 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, )
43
44};
45
46const uint16_t PROGMEM fn_actions[] = {
47
48};
49
50const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
51{
52 // MACRODOWN only works in this function
53 switch (id) {
54 case 0:
55 if (record->event.pressed) {
56 register_code(KC_RSFT);
57 }
58 else {
59 unregister_code(KC_RSFT);
60 }
61 break;
62 }
63 return MACRO_NONE;
64};
65
66static uint8_t qw_dv_swap_state = 0;
67
68bool process_record_user (uint16_t keycode, keyrecord_t *record) {
69 if (keycode == KC_LGUI) {
70 if (record->event.pressed)
71 qw_dv_swap_state |= B00000001;
72 else
73 qw_dv_swap_state &= ~(B00000001);
74 }
75 if (keycode == KC_LCTL) {
76 if (record->event.pressed)
77 qw_dv_swap_state |= B00000010;
78 else
79 qw_dv_swap_state &= ~(B00000010);
80 }
81
82 if (qw_dv_swap_state == B00000011) {
83 uint8_t layer = biton32(layer_state);
84 if (layer == QW)
85 TO(DV);
86 else if (layer == DV)
87 TO(QW);
88 return true;
89 }
90}