aboutsummaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c1
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h48
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/Makefile3
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.c459
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.h238
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.txt123
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/config.h100
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile21
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c64
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md1
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile21
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h32
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c272
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md1
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/readme.md58
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/rules.mk48
-rw-r--r--keyboards/handwired/numpad20/Makefile3
-rw-r--r--keyboards/handwired/numpad20/config.h162
-rw-r--r--keyboards/handwired/numpad20/keymaps/default/keymap.c16
-rw-r--r--keyboards/handwired/numpad20/numpad20.c8
-rw-r--r--keyboards/handwired/numpad20/numpad20.h20
-rw-r--r--keyboards/handwired/numpad20/rules.mk83
-rw-r--r--keyboards/handwired/ortho5x13/Makefile3
-rw-r--r--keyboards/handwired/ortho5x13/config.h162
-rw-r--r--keyboards/handwired/ortho5x13/keymaps/default/keymap.c289
-rw-r--r--keyboards/handwired/ortho5x13/ortho5x13.c8
-rw-r--r--keyboards/handwired/ortho5x13/ortho5x13.h36
-rw-r--r--keyboards/handwired/ortho5x13/rules.mk83
29 files changed, 2371 insertions, 0 deletions
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
new file mode 100644
index 000000000..4c735a6c2
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
@@ -0,0 +1 @@
#include "MS-sculpt-mobile.h"
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h
new file mode 100644
index 000000000..1583dea6e
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h
@@ -0,0 +1,48 @@
1#ifndef MICROSOFT_SCULPT_MOBILE_H
2#define MICROSOFT_SCULPT_MOBILE_H
3
4#include "quantum.h"
5
6
7#define KEYMAP( \
8 k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \
9 k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \
10 k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \
11 k0J, k6A, k6B, k6C, k7H, k1A, k1B, k5D, k5E, k5F, k5G, k1C, k7P, k2G, \
12 k2P, k7K, k7L, k7M, k7O, k0A, k0B, k0C, k0D, k0E, k0F, k2L, k6G, k1P,\
13 k1Q, k4N, k3O,k6N, k3K, k0R, k1M, k6H, k6I, k6J \
14) \
15{ \
16 {k0A, k0B, k0C, k0D, k0E, k0F, KC_NO, KC_NO, KC_NO, k0J, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, k0R},\
17 {k1A, k1B, k1C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k1K, k1L, k1M, KC_NO, k1O, k1P, k1Q, KC_NO},\
18 {k2A, k2B, k2C, k2D, k2E, KC_NO, k2G, KC_NO, KC_NO, KC_NO, KC_NO, k2L, KC_NO, KC_NO, KC_NO, k2P, KC_NO, KC_NO},\
19 {k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k3K, KC_NO, KC_NO, KC_NO, k3O, KC_NO, KC_NO, KC_NO},\
20 {k4A, k4B, k4C, k4D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k4N, KC_NO,KC_NO, KC_NO, KC_NO},\
21 {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q, KC_NO },\
22 {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6J, KC_NO, KC_NO, KC_NO, k6N, k6O, k6P, k6Q, k6R},\
23 {k7A, k7B, k7C, k7D, k7E, k7F, KC_NO, k7H, k7I, k7J, k7K, k7L, k7M, KC_NO, k7O, k7P, k7Q, KC_NO},\
24}
25
26
27#define MATRIX_TESTING_KEYMAP( \
28 k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\
29 k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\
30 k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\
31 k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q,\
32 k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q,\
33 k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q,\
34 k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q,\
35 k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q\
36) \
37{ \
38 {k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q},\
39 {k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q},\
40 {k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q},\
41 {k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q},\
42 {k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q},\
43 {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q},\
44 {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q},\
45 {k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q},\
46}
47
48#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/Makefile b/keyboards/handwired/MS-sculpt-mobile/Makefile
new file mode 100644
index 000000000..bd09e5885
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c
new file mode 100644
index 000000000..3a9b86997
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c
@@ -0,0 +1,459 @@
1/* A library to output the right key shortcut in any common app.
2Given a global variable babble_mode to show the environment and a
3key that calls the paste macro, do the right type of paste.
4Setting the context is done by another macro, or TBD interaction with the host.
5
6Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
7and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
8*/
9
10#include "babblePaste.h"
11#include "action_macro.h"
12
13#ifdef USE_BABLPASTE
14
15// GLOBAL variable to determine mode. Sets startup default if no eeppom
16uint8_t babble_mode =0 ;
17
18// small function that we might also want to call from a keymap.
19
20macro_t* switch_babble_mode( uint8_t id) {
21 babble_mode= id;
22 return MACRO_NONE; //less typing where called
23}
24
25
26// Today I learned that the preprocessor can not create a switch statement label from an argument
27// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
28#define BABLM(ent, macro...) \
29 if ( ent == shortcut ) \
30 { action_macro_play( MACRO(macro)); return MACRO_NONE; }
31
32
33/* this function runs the appropriate babblepaste macro, given
34the global babble_mode, and a shortcut from the ENUM in babblePaste.h
35TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
36But that requires even more clever preprocessor foo.
37*/
38const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
39/*
40 if ( shortcut < BABL_START_NUM || \
41 shortcut >= (BABL_START_NUM + BABL_NUM_MACROS ) ) {
42 return MACRO_NONE;
43 }
44*/
45
46
47#ifdef MS_MODE
48 if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
49#endif
50#ifdef MAC_MODE
51 if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
52#endif
53#ifdef LINUX_MODE
54 if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
55#endif
56 #ifdef READMUX_MODE
57 if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
58#endif
59#ifdef VI_MODE
60 if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
61#endif
62#ifdef EMACS_MODE
63 if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); }
64#endif
65
66
67
68 switch(babble_mode) {
69
70#ifdef MS_MODE
71
72 case MS_MODE:
73 BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
74 BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
75 BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END );
76 BABLM( BABL_GO_RIGHT_WORD, D(LCTL), T(RIGHT), U(LCTL), END );
77 BABLM( BABL_GO_START_LINE, T(HOME), END );
78 BABLM( BABL_GO_END_LINE, T(END), END );
79 BABLM( BABL_GO_START_DOC, D(LCTL),T(HOME), U(LCTL),END );
80 BABLM( BABL_GO_END_DOC, D(LCTL),T(END), U(LCTL),END );
81 BABLM( BABL_GO_NEXT_LINE, T(DOWN), END );
82 BABLM( BABL_GO_PREV_LINE, T(UP), END );
83 BABLM( BABL_PGDN, T(PGDN), END );
84 BABLM( BABL_PGUP, T(PGUP), END );
85 BABLM( BABL_DEL_RIGHT_1C, T(DEL), END );
86 BABLM( BABL_DEL_LEFT_WORD, D(LCTL), T(BSPACE), U(LCTL), END );
87 BABLM( BABL_DEL_RIGHT_WORD, D(LCTL), T(DEL), U(LCTL), END );
88 BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
89 BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END );
90#ifndef BABL_MOVEMENTONLY
91 BABLM( BABL_UNDO, D(LCTL), T(Z), U(LCTL), END );
92 BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END );
93 BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END );
94 BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END );
95 BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
96 BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
97 BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
98 BABLM( BABL_FIND_NEXT, T(F3),END );
99 BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END );
100 BABLM( BABL_RUNAPP, D(LGUI),T(R), U(LGUI),END );
101 BABLM( BABL_SWITCH_APP_NEXT, D(LALT),T(TAB), U(LALT),END );
102 BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END );
103 BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
104 BABLM( BABL_HELP, T(F1),END );
105#ifndef BABL_NOBROWSER
106 BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
107 BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END );
108 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END );
109 BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END );
110 BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END );
111 BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END );
112 BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END );
113 BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
114 BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
115 BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
116 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
117 BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
118 // Chrome
119 BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
120 BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F
121 BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), D(RSFT), T(EQL), U(RSFT), U(LCTL),END ); // ctr+ +
122 BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END );
123#endif
124#endif
125
126 // Todo, ring bell, flash light, show user this isn't supported
127 return MACRO_NONE;
128
129
130#endif /* MS_MODE*/
131
132
133#ifdef LINUX_MODE
134
135 case LINUX_MODE:
136 BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
137 BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
138 BABLM( BABL_GO_LEFT_WORD , D(LCTL), T(LEFT), U(LCTL), END );
139 BABLM( BABL_GO_RIGHT_WORD , D(LCTL), T(RIGHT), U(LCTL), END );
140 BABLM( BABL_GO_START_LINE , T(HOME), END );
141 BABLM( BABL_GO_END_LINE , T(END), END );
142 BABLM( BABL_GO_START_DOC , D(LCTL),T(HOME), U(LCTL),END );
143 BABLM( BABL_GO_END_DOC , D(LCTL),T(END), U(LCTL),END );
144 BABLM( BABL_GO_NEXT_LINE , T(DOWN), END );
145 BABLM( BABL_GO_PREV_LINE , T(UP), END );
146 BABLM( BABL_PGDN , T(PGDN), END );
147 BABLM( BABL_PGUP , T(PGUP), END );
148 BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
149 BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
150 BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END );
151 BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
152 BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END );
153#ifndef BABL_MOVEMENTONLY
154 BABLM( BABL_UNDO , D(LCTL), T(Z), U(LCTL), END );
155 BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END );
156 BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END );
157 BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END );
158 BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
159 BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
160 BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
161 /* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */
162 BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/
163 /* BABLM( , D(LCTL),T(R), U(LCTL),END ); KDE */
164 BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END ); // Gnome*/
165 BABLM( BABL_RUNAPP, D(LALT),T(F2), U(LALT),END );
166 BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END );
167 BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END );
168 BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
169 //BABLM( BABL_HELP, END );
170
171#ifndef BABL_NOBROWSER
172 BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
173 BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END );
174 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END );
175 BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END );
176 BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END );
177 BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END );
178 BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END );
179 BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
180 BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
181 BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
182 BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
183 BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
184 BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F
185 BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), T(PLUS), U(LCTL),END );
186 BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END );
187#endif
188#endif
189 return MACRO_NONE;
190
191#endif
192
193#ifdef MAC_MODE
194
195 case MAC_MODE:
196 BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
197 BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END );
198 BABLM( BABL_GO_LEFT_WORD , D(LALT), T(LEFT), U(LALT), END );
199 BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(RIGHT), U(LALT), END );
200 BABLM( BABL_GO_START_LINE , D(LGUI), T(LEFT), U(LGUI), END );
201 BABLM( BABL_GO_END_LINE , D(LGUI), T(RIGHT), U(LGUI), END );
202 BABLM( BABL_GO_START_DOC , D(LGUI),T(UP), U(LGUI),END );
203 BABLM( BABL_GO_END_DOC , D(LGUI),T(DOWN), U(LGUI),END );
204 BABLM( BABL_GO_NEXT_LINE , T(DOWN), END );
205 BABLM( BABL_GO_PREV_LINE , T(UP), END );
206 BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END );
207 BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END );
208 BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
209 BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END );
210 BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END );
211 BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way
212 BABLM( BABL_DEL_TO_LINE_START, D(LGUI), T(BSPACE), U(LGUI), END );
213#ifndef BABL_MOVEMENTONLY
214 BABLM( BABL_UNDO , D(1), D(LGUI), T(Z), U(LGUI), END );
215 BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END );
216 BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END );
217 BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END );
218 BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
219 BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END );
220 BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END );
221 BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END );
222 BABLM( BABL_FIND_REPLACE, D(LGUI),T(F), U(LGUI),END );
223 BABLM( BABL_RUNAPP , D(LGUI),T(R), U(LGUI),END );
224 BABLM( BABL_SWITCH_APP_NEXT , D(LGUI),T(TAB), U(LGUI),END );
225 BABLM( BABL_SWITCH_APP_LAST , D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END );
226 BABLM( BABL_CLOSE_APP , D(LGUI),T(Q), U(LGUI),END );
227 BABLM( BABL_HELP , D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END );
228
229#ifndef BABL_NOBROWSER
230 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
231 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
232 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
233 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
234 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
235 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
236 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
237 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
238 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
239 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
240 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
241 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
242 // Chrome
243 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
244 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
245 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ +
246 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
247#endif
248#endif
249
250 return MACRO_NONE;
251#endif
252
253#ifdef EMACS_MODE
254
255 case EMACS_MODE:
256 switch(shortcut) {
257//probably should allow meta to not be ALT
258
259 BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
260 BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END );
261 BABLM( BABL_GO_LEFT_WORD, D(LALT), T(B), U(LALT), END );
262 BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END );
263 BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END );
264 BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END );
265 BABLM( BABL_GO_START_DOC , D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END );
266 BABLM( BABL_GO_END_DOC , D(LALT), D(LSFT), T(DOT), U(LSFT), U(LALT) ,END );
267 BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END );
268 BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
269 BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END );
270 BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END );
271 BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
272 BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
273 BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
274 BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
275 BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END );
276#ifndef BABL_MOVEMENTONLY
277 BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END );
278 BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
279 BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END );
280 BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really?
281 BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
282 BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
283 BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END );
284 BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END );
285 BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
286 BABLM( BABL_RUNAPP , D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably
287 BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably
288 BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably
289 BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END );
290 BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help
291#ifndef BABL_NOBROWSER
292/* you get to figure w3 out
293 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
294 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
295 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
296 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
297 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
298 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
299 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
300 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
301 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
302 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
303 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
304 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
305 // Chrome
306 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
307 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
308 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ +
309 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
310*/
311#endif
312#endif
313 break;
314
315 return MACRO_NONE;
316 }
317
318#endif
319
320
321#ifdef VI_MODE
322 case VI_MODE:
323// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
324
325
326 BABLM( BABL_GO_LEFT_1C , T(H), END );
327 BABLM( BABL_GO_RIGHT_1C , T(L), END );
328 BABLM( BABL_GO_LEFT_WORD , T(B),END );
329 BABLM( BABL_GO_RIGHT_WORD , T(W), END );
330 BABLM( BABL_GO_START_LINE , D(LSFT), T(6),U(LSFT), END ); //^
331 BABLM( BABL_GO_END_LINE , D(LSFT), T(4),U(LSFT) , END ); //$
332 BABLM( BABL_GO_START_DOC , T(G),T(G) ,END );
333 BABLM( BABL_GO_END_DOC , D(LSFT), T(G),U(LSFT),END );
334 BABLM( BABL_GO_NEXT_LINE , T(J), END );
335 BABLM( BABL_GO_PREV_LINE, T(K), END );
336 BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END );
337 BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END );
338 BABLM( BABL_DEL_RIGHT_1C , T(X),END );
339 BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END );
340 BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END );
341 BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$
342 BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
343#ifndef BABL_MOVEMENTONLY
344 BABLM( BABL_UNDO , T(U), END );
345 BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
346 BABLM( BABL_CUT , T(X), END );
347 BABLM( BABL_COPY , T(Y),END );
348 BABLM( BABL_PASTE , T(P), END );
349 BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
350 BABLM( BABL_FIND , T(SLASH),END );
351 BABLM( BABL_FIND_NEXT , T(N),END );
352 BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
353 BABLM( BABL_RUNAPP,END );
354 BABLM( BABL_SWITCH_APP_NEXT ,END );
355 BABLM( BABL_SWITCH_APP_LAST ,END );
356 BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END );
357 BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help
358#ifndef BABL_NOBROWSER
359/* you get to figure this out
360 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
361 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
362 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
363 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
364 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
365 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
366 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
367 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
368 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
369 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
370 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
371 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
372 // Chrome
373 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
374 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
375 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END );
376 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
377*/
378#endif
379#endif
380 return MACRO_NONE;
381#endif
382
383
384
385
386#ifdef READMUX_MODE
387// Readline command line editing + tmux windowing
388// I havent decided how much to do readline and how much tmux
389
390
391 case READMUX_MODE:
392
393 BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
394 BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
395 BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END );
396 BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END );
397 BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END );
398 BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END );
399 //BABLM( BABL_GO_START_DOC ,END );// tmux?
400 //BABLM( BABL_GO_END_DOC ,END ); // tmux?
401 BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END );
402 BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
403 BABLM( BABL_PGDN , T(PGDN), END );
404 BABLM( BABL_PGUP , T(PGUP), END );
405 BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
406 BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END );
407 BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
408 BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
409 BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END );
410#ifndef BABL_MOVEMENTONLY
411 BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END );
412 BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
413 BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time
414 //BABLM( BABL_COPY ,END );
415 BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
416 BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
417 BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history
418 BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END );
419 //BABLM( BABL_FIND_REPLACE ,END );
420 BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux
421 BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux
422 BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux
423 BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want
424 // BABLM( BABL_HELP ,END );
425#ifndef BABL_NOBROWSER
426/* Add lynx shortcuts?
427 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
428 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
429 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
430 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
431 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
432 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
433 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
434 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
435 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
436 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
437 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
438 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
439 // Chrome
440 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
441 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
442 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END );
443 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
444*/
445#endif
446#endif
447
448 return MACRO_NONE;
449
450#endif
451
452 default:
453 return MACRO_NONE;
454 }
455
456}
457
458
459#endif \ No newline at end of file
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
new file mode 100644
index 000000000..3067c854d
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
@@ -0,0 +1,238 @@
1/* A library to output the right key shortcut in any common app.
2Given a global variable babble_mode to show the environment and a
3key that calls the paste macro, do the right type of paste.
4
5Setting the bable_mode is done by another macro, or TBD interaction with the host.
6
7Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
8and jeebak & algernon's keymap
9*/
10#ifndef _babblePaste_h_included__
11#define _babblePaste_h_included__
12#include "action_layer.h"
13#include "quantum_keycodes.h"
14#include "config.h"
15
16#ifdef USE_BABLPASTE
17
18/* ***************************
19
20// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
21// Expect to get errors if you comment a feature out and leave it in your keymap.
22
23#define USE_BABLPASTE
24
25//#define MS_MODE 0 // Windows.
26//#define MAC_MODE 1
27//#define LINUX_MODE 2 //aka gnome+KDE
28//#define EMACS_MODE 3
29//#define VI_MODE 4
30//#define WORDSTAR_MODE 5
31//#define READMUX 6 // Readline and tmux
32
33// This removes everything but cursor movement
34//#define BABL_MOVEMENTONLY
35// and this just removes browser shortcuts
36//#define BABL_NOBROWSER
37****************************/
38
39
40// Uncomment if you need more free flash space
41// It removes everything but cursor movement
42//#define BABL_MOVEMENTONLY
43
44
45// Define starting number for BABL macros in the macro range.
46// Probably can start the default even lower
47#define BABL_START_NUM 50
48
49/* Macros handled by babblepaste. Most should be available for all platforms.
50Whatever isn't defined will NOP */
51enum {
52// Movement macros
53 // left & right
54 BABL_GO_LEFT_1C= BABL_START_NUM,
55 BABL_GO_RIGHT_1C,
56 BABL_GO_LEFT_WORD,
57 BABL_GO_RIGHT_WORD,
58 BABL_GO_START_LINE,
59 BABL_GO_END_LINE,
60 // now up & down
61 BABL_GO_START_DOC,
62 BABL_GO_END_DOC,
63 BABL_GO_NEXT_LINE,
64 BABL_GO_PREV_LINE,
65 BABL_PGDN,
66 BABL_PGUP,
67 // And the delete options
68 //BABL_DEL_LEFT_1C == backspace, so why bother.
69 BABL_DEL_RIGHT_1C, // usually = Del
70 BABL_DEL_LEFT_WORD,
71 BABL_DEL_RIGHT_WORD,
72 BABL_DEL_TO_LINE_END, // delete from cursor to end of line
73 BABL_DEL_TO_LINE_START, // delete from cursor to begining line
74#ifndef BABL_MOVEMENTONLY
75 // Cut & Paste
76 BABL_UNDO,
77 BABL_REDO,
78 BABL_CUT,
79 BABL_COPY,
80 BABL_PASTE,
81 BABL_SELECT_ALL,
82 /* not yet implemented
83 BABL_SWAP_LAST2C // swap last characters before the cursor
84 BABL_SWAP_LAST2W // Swap the last two words before the cursor
85 */
86 // find & replace
87 BABL_FIND,
88 BABL_FIND_NEXT,
89 BABL_FIND_REPLACE,
90 // GUI or app
91 BABL_RUNAPP,
92 BABL_SWITCH_APP_NEXT,
93 BABL_SWITCH_APP_LAST, // previous
94 BABL_CLOSE_APP,
95 BABL_HELP,
96
97#ifndef BABL_NOBROWSER
98 BABL_BROWSER_NEW_TAB,
99 BABL_BROWSER_CLOSE_TAB,
100 BABL_BROWSER_REOPEN_LAST_TAB,
101 BABL_BROWSER_NEXT_TAB,
102 BABL_BROWSER_PREV_TAB,
103 BABL_BROWSER_URL_BAR,
104 BABL_BROWSER_FORWARD,
105 BABL_BROWSER_BACK,
106 BABL_BROWSER_FIND,
107 BABL_BROWSER_BOOKMARK,
108 BABL_BROWSER_DEV_TOOLS, // hard one to remember
109 BABL_BROWSER_RELOAD,
110 BABL_BROWSER_FULLSCREEN,
111 BABL_BROWSER_ZOOM_IN,
112 BABL_BROWSER_ZOOM_OUT,
113
114#endif
115
116#endif
117// Macros for mode switching
118#ifdef MS_MODE
119 BABL_WINDOWS,
120#endif
121#ifdef MAC_MODE
122 BABL_MAC,
123#endif
124#ifdef LINUX_MODE
125 BABL_LINUX,
126#endif
127#ifdef EMACS_MODE
128 BABL_EMACS,
129#endif
130#ifdef VI_MODE
131 BABL_VI,
132#endif
133#ifdef READMUX_MODE
134 BABL_READLINE,
135#endif
136
137
138};
139
140// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
141#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
142
143/* And all the shorthand keymap ready versions */
144// First the mode switching macros
145#ifdef MS_MODE
146#define B_WIN M(BABL_WINDOWS)
147#endif
148#ifdef MAC_MODE
149#define B_MAC M(BABL_MAC)
150#endif
151#ifdef LINUX_MODE
152#define B_LNX M(BABL_LINUX)
153#endif
154#ifdef EMACS_MODE
155#define B_EMAX M(BABL_EMACS)
156#endif
157#ifdef VI_MODE
158#define B_VI M(BABL_VI)
159#endif
160#ifdef READMUX_MODE
161#define B_READ M(BABL_READLINE)
162#endif
163
164// and all the movement & action.
165
166#define B_L1C M(BABL_GO_LEFT_1C)
167#define B_R1C M(BABL_GO_RIGHT_1C)
168#define B_L1W M(BABL_GO_LEFT_WORD)
169#define B_R1W M(BABL_GO_RIGHT_WORD)
170#define B_GSOL M(BABL_GO_START_LINE)
171#define B_GEOL M(BABL_GO_END_LINE)
172#define B_GTOP M(BABL_GO_START_DOC)
173#define B_GEND M(BABL_GO_END_DOC)
174#define B_DOWN M(BABL_GO_NEXT_LINE)
175#define B_UP M(BABL_GO_PREV_LINE)
176#define B_PGDN M(BABL_PGDN)
177#define B_PGUP M(BABL_PGUP)
178//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
179#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
180#define B_DLW M(BABL_DEL_LEFT_WORD)
181#define B_DRW M(BABL_DEL_RIGHT_WORD)
182#define B_DEOL M(BABL_DEL_TO_LINE_END) // delete from cursor to end of line
183#define B_DSOL M(BABL_DEL_TO_LINE_START) // delete from cursor to begining line
184#define B_UNDO M(BABL_UNDO)
185#define B_REDO M(BABL_REDO)
186#define B_CUT M(BABL_CUT)
187#define B_COPY M(BABL_COPY)
188#define B_PAST M(BABL_PASTE)
189#define B_SELA M(BABL_SELECT_ALL)
190#define B_FIND M(BABL_FIND)
191#define B_FINDN M(BABL_FIND_NEXT)
192#define B_FINDR M(BABL_FIND_REPLACE)
193#define B_RAPP M(BABL_RUNAPP)
194#define B_NAPP M(BABL_SWITCH_APP_NEXT)
195#define B_PAPP M(BABL_SWITCH_APP_LAST) // previous
196#define B_CAPP M(BABL_CLOSE_APP)
197#define B_HELP M(BABL_HELP)
198#define B_NTAB M(BABL_BROWSER_NEW_TAB)
199#define B_CTAB M(BABL_BROWSER_CLOSE_TAB)
200#define B_ROTB M(BABL_BROWSER_REOPEN_LAST_TAB)
201#define B_NXTB M(BABL_BROWSER_NEXT_TAB)
202#define B_PTAB M(BABL_BROWSER_PREV_TAB)
203#define B_NURL M(BABL_BROWSER_URL_BAR)
204#define B_BFWD M(BABL_BROWSER_FORWARD)
205#define B_BBAK M(BABL_BROWSER_BACK)
206#define B_BFND M(BABL_BROWSER_FIND)
207#define B_BOOK M(BABL_BROWSER_BOOKMARK)
208#define B_BDEV M(BABL_BROWSER_DEV_TOOLS) // hard one to remember
209#define B_BRLD M(BABL_BROWSER_RELOAD)
210#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
211#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
212#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)
213
214
215
216
217
218
219
220/* from action_macro.h
221typedef uint8_t macro_t;
222
223#define MACRO_NONE (macro_t*)0
224#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
225#define MACRO_GET(p) pgm_read_byte(p)
226
227#define BABL_MSTART (entry, os, macro...) ( const macro_t bablDict[entry][os] PROGMEM = { macro... }; )
228
229*/
230
231const macro_t *babblePaste(keyrecord_t *record, uint8_t shortcut);
232
233macro_t* switch_babble_mode( uint8_t id);
234
235
236#endif
237#endif
238
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt
new file mode 100644
index 000000000..cf75e153e
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt
@@ -0,0 +1,123 @@
1 BabblePaste is a library of common macros used to make sure that
2you can have one "paste" button on one layer, and it will do the
3right thing on any OS or app. Windows=Ctrl-V. Mac = Command-V and so on.
4
5The babblepaste library looks for the current status in a babble_mode global variable.
6To switch modes, run the switch_babble_mode() function, or a pre defined macro.
7Currently supported are Windows, OS X, Gnome/kde, Emacs, VI and readline,
8across 42+ common macro actions.
9
10
11###To use the library
121) Paste the following into your config.h.
13
14//////Begin//////
15#define USE_BABLPASTE 1
16
17#ifdef USE_BABLPASTE
18/* define BabblePaste maps. Whatever = 0 will be the default. */
19// MAC_MODE 0
20// MS_MODE 1
21// LINUX_MODE 2
22// EMACS_MODE 3
23// VI_MODE 3
24// Readline and tmux
25// READMUX_MODE 2
26// WORDSTAR_MODE 5
27#endif
28
29// Uncomment these to remove options an free up flash space
30
31// This removes everything but cursor movement
32// BABL_MOVEMENTONLY
33// and this just removes browser shortcuts
34// BABL_NOBROWSER
35///////End///////
36
372) Add the following to your keymap in the action_get_macro
38
39//////Begin//////
40#ifdef USE_BABLPASTE
41
42 if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
43 if (record->event.pressed) { // is there a case where this isn't desired?
44
45 babblePaste ( record, id );
46 return MACRO_NONE;
47 }
48 }
49#endif
50///////End///////
51
523) add Babbelpaste actions to your keymap. See the full list in babblePaste.h, or the
53list below
54B_L1C // go left 1 char
55B_R1C // go Right 1 char
56 B_L1W //GO_LEFT_1 WORD
57 B_R1W //BABL_GO_RIGHT_1 WORD
58 B_GSOL // BABL_GOTO_START of _LINE
59 B_GEOL // BABL_GOTO_END_LINE
60 B_GTOP //BABL_GOTO_START_DOC
61 B_GEND //BABL_GO_END_DOC
62 B_DOWN //BABL_GO_NEXT_LINE
63 B_UP // BABL_GO_PREV_LINE
64 B_PGDN //PGDN
65 B_PGUP //PGUP
66// B_BKSP //backspace so why bother.
67 B_DEL // DEL_RIGHT_1 Char // usually = Del
68 B_DLW // DEL_LEFT_ 1 WORD)
69 B_DRW //DEL_RIGHT_1 WORD
70 B_DEOL // delete from cursor to end of line
71 B_DSOL // delete from cursor to begining line
72 B_UNDO //UNDO
73 B_REDO // REDO
74 B_CUT // CUT)
75 B_COPY // COPY)
76 B_PAST // PASTE)
77 B_SELA // SELECT_ALL
78 B_FIND // FIND)
79 B_FINDN //FIND_NEXT)
80 B_FINDR // FIND_REPLACE)
81 B_RAPP // open application launcher
82 B_NAPP // switch to next app
83 B_PAPP // switch to previous app
84 B_CAPP // CLOSE_APP)
85 B_HELP // HELP)
86 B_NTAB // BROWSER_NEW_TAB)
87 B_CTAB //BROWSER_CLOSE_TAB)
88 B_ROTB //BROWSER_REOPEN_LAST_TAB)
89 B_NXTB //BROWSER_NEXT_TAB)
90 B_PTAB //BROWSER_PREV_TAB)
91 B_NURL //BROWSER_jump to URL_BAR)
92 B_BFWD // BROWSER_FORWARD (in history)
93 B_BBAK //BROWSER_BACK (in history)
94 B_BFND // BROWSER_FIND)
95 B_BOOK //BROWSER_New BOOKMARK)
96 B_BDEV //BROWSER_ Open DEV_TOOLS) // hard one to remember
97 B_BRLD // BROWSER_RELOAD Page
98 B_BFUlL // BROWSER_FULLSCREEN)
99 B_ZMIN // BROWSER_ZOOM_IN)
100 B_ZMOT //BROWSER_ZOOM_OUT)
101
102
103#### Development notes
104-Why a new function? Because it would make the keymap too ugly to put it there.
105-Why not return the macro to action_get_macro? Because I kept running into scope problems
106and pointers to the wrong type.
107-Why not an array of arrays as a lookup instead of a function? That would allow you
108to store the lookup table in PROGMEM. True, but that takes more pre-processor skill
109than I had.
110
111-Have you tested this on every platform? No. Submit a patch.
112
113
114### Next steps for someone.
115Make it easier to pair macros with modifiers. So key foo will jump to start of line, and
116Shift(foo) will jump to the first tab in a browser.
117
118## Thanks
119
120Thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
121and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
122And of course QMK...
123
diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS-sculpt-mobile/config.h
new file mode 100644
index 000000000..f89514278
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/config.h
@@ -0,0 +1,100 @@
1/*
2Copyright 2012 Jun Wako <wakojun@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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Microsoftplus
28#define DESCRIPTION 6000
29
30/* key matrix size */
31#define MATRIX_ROWS 8
32#define MATRIX_COLS 18
33
34#ifdef ASTAR
35#define PRODUCT sculpt mobile astar
36 /*0 1 2 3 4 5 6 7 8 */
37#define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2}
38/* A B C D E F G H I J K L M N O P Q R */
39#define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3}
40
41#else
42#define PRODUCT sculpt mobile teensypp
43/* 0 1 2 3 4 5 6 7 */
44#define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0}
45/* A B C D E F G H I J K L M N O P Q R */
46#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7}
47#define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 }
48
49
50#endif
51
52/* COL2ROW or ROW2COL */
53#define DIODE_DIRECTION ROW2COL
54
55/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
56#define DEBOUNCING_DELAY 5
57
58/* define if matrix has ghost (lacks anti-ghosting diodes) */
59//#define MATRIX_HAS_GHOST
60
61
62/*
63 * Magic Key Options
64 *
65 * Magic keys are hotkey commands that allow control over firmware functions of
66 * the keyboard. They are best used in combination with the HID Listen program,
67 * found here: https://www.pjrc.com/teensy/hid_listen.html
68 *
69 * The options below allow the magic key functionality to be changed. This is
70 * useful if your keyboard/keypad is missing keys and you want magic key support.
71 *
72 */
73
74/* key combination for magic key command */
75#define IS_COMMAND() ( \
76 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
77)
78
79
80/*
81 * Feature disable options
82 * These options are also useful to firmware size reduction.
83 */
84
85/* disable debug print */
86//#define NO_DEBUG
87
88/* disable print */
89//#define NO_PRINT
90
91/* disable action features */
92//#define NO_ACTION_LAYER
93//#define NO_ACTION_TAPPING
94//#define NO_ACTION_ONESHOT
95//#define NO_ACTION_MACRO
96//#define NO_ACTION_FUNCTION
97
98#define PREVENT_STUCK_MODIFIERS
99
100#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile
new file mode 100644
index 000000000..8b829218b
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../../Makefile
21endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h
new file mode 100644
index 000000000..8893d122e
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c
new file mode 100644
index 000000000..ab09dcdd1
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c
@@ -0,0 +1,64 @@
1#include "MS-sculpt-mobile.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4/*
5*
6* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute|
7* -------------------------------------------------------------------------------'
8* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del |
9* --------------------------------------------------------------------------
10* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
11* -------------------------------------------------------------------------------'
12* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
13* --------------------------------------------------------------------------------
14* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
15* ---------------------------------------------------------------------------------
16* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght|
17* ---------------------------------------------------------------------------------
18*/
19
20[0] = KEYMAP( \
21 KC_ESC, 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_VOLD, KC_VOLU, KC_MUTE,\
22 KC_GRAVE, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
23 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,\
24 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
25 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,\
26 KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
27)
28
29};
30const uint16_t PROGMEM fn_actions[] = {
31
32};
33
34const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
35{
36 // MACRODOWN only works in this function
37 switch(id) {
38 case 0:
39 if (record->event.pressed) {
40 register_code(KC_RSFT);
41 } else {
42 unregister_code(KC_RSFT);
43 }
44 break;
45 }
46 return MACRO_NONE;
47};
48
49
50void matrix_init_user(void) {
51
52}
53
54void matrix_scan_user(void) {
55
56}
57
58bool process_record_user(uint16_t keycode, keyrecord_t *record) {
59 return true;
60}
61
62void led_set_user(uint8_t usb_led) {
63
64}
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md
new file mode 100644
index 000000000..e67ddc6fe
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for microsoft-sculpt-mobile
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile
new file mode 100644
index 000000000..1209ad781
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../../Makefile
21endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h
new file mode 100644
index 000000000..8cf4202cd
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h
@@ -0,0 +1,32 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#define USE_BABLPASTE
7
8// Expect to get errors if you comment a feature out and leave it in your keymap.
9
10#ifdef USE_BABLPASTE
11//define BabblePaste maps
12// Windows.
13#define MAC_MODE 0
14#define MS_MODE 1
15//aka gnome+KDE
16//#define LINUX_MODE 2
17//#define EMACS_MODE 3
18#define VI_MODE 3
19// Readline and tmux
20#define READMUX_MODE 2
21//#define WORDSTAR_MODE 5
22#endif
23
24// Uncomment if you need more free flash space
25
26// This removes everything but cursor movement
27//#define BABL_MOVEMENTONLY
28// and this just removes browser shortcuts
29//#define BABL_NOBROWSER
30
31// place overrides here
32#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c
new file mode 100644
index 000000000..395a9fb47
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c
@@ -0,0 +1,272 @@
1#include "MS-sculpt-mobile.h"
2#include "action_layer.h"
3#include "action_util.h"
4#include "babblePaste.h"
5
6#ifdef AUDIO_ENABLE
7 #include "audio.h"
8#endif
9
10#define _QWR 0
11#define _CDH 2
12#define _SYM 3
13#define _MOV 4
14#define _TRAN 5
15
16
17enum layer_keycodes {
18QWR,
19CDH,
20SYM,
21MOV,
22NUM,
23TRAN
24};
25
26
27// Shorter spacing
28#define XXXX KC_NO
29#define ____ KC_TRNS
30
31// Custom macros
32
33/* Fn Keys */
34#define TT_SYM MO(_SYM)
35#define TT_MOV KC_FN2
36#define TT_NUM MO(_NUM)
37#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT)
38
39enum macro_keycodes {
40DHPASTE=1,
41VIBRK,
42};
43
44
45const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
46/* QWERTY
47*
48* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH|
49* -------------------------------------------------------------------------------'
50* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
51* ---------------------------------------------------------------------------
52* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
53* -------------------------------------------------------------------------------'
54* |Bak/Mov| a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
55* --------------------------------------------------------------------------------
56* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
57* ---------------------------------------------------------------------------------
58* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
59* ---------------------------------------------------------------------------------
60*/
61
62[_QWR] = KEYMAP( \
63 KC_ESC, 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_VOLD, KC_VOLU, CDH,\
64 KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
65 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,\
66 TT_MOV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
67 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
68 KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
69),
70
71[_CDH] = KEYMAP (\
72 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \
73 KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
74 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
75 TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_2,\
76 KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, KC_1,\
77 ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____
78
79),
80
81
82/* SYM
83*
84* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH|
85* -------------------------------------------------------------------------------'
86* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace|Del |
87* --------------------------------------------------------------------------
88* | ESC: | ^ | { | } | @ | % | | [ | ( | ) | _ | [ | ] | \ | |
89* -------------------------------------------------------------------------------'
90* |Bak/Mov| ! | # | 0 | = | { | } | - | 1 | + | ] | ` | enter |PgUp|
91* --------------------------------------------------------------------------------
92* |Lsft | ; | ~ | : | ~ | "|"| $ | * | | . | / | Rsft| Up| PgDn|
93* ---------------------------------------------------------------------------------
94* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
95* ---------------------------------------------------------------------------------
96*/
97
98[_SYM] = KEYMAP (\
99 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
100 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
101 M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\
102 ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_LCBR, KC_RCBR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\
103 ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\
104 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
105),
106/*
107* |ESC | MAC| Win|RdLn| VI | | | | | | | | | | | |
108* -------------------------------------------------------------------------------'
109* | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
110* ---------------------------------------------------------------------------
111* | tab | | |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | |
112* -------------------------------------------------------------------------------'
113* |Bak/Mov| | | | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp|
114* --------------------------------------------------------------------------------
115* |Lsft |Undo| Cut|Copy|Pste| | | | | | / | Rsft| Up| PgDn|
116* ---------------------------------------------------------------------------------
117* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
118* ---------------------------------------------------------------------------------
119*/
120
121[_MOV] = KEYMAP (\
122 ____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
123 ____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
124 ____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \
125 ____, B_SELA, B_BRLD, ____, ____, B_NXTB, B_GSOL, B_L1C, B_DOWN, B_R1C,B_GEOL, ____, ____, ____,\
126 ____, B_UNDO,B_CUT, B_COPY, B_PAST, B_PAST, ____, ____, ____, ____, ____, ____, ____, ____, \
127 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
128),
129
130[_TRAN] = KEYMAP (\
131 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
132 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
133 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
134 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
135 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
136 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
137)
138};
139
140const uint16_t PROGMEM fn_actions[] = {
141[1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE),
142[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC)
143};
144
145#ifdef AUDIO_ENABLE
146
147float tone_startup[][2] = SONG(STARTUP_SOUND);
148float tone_qwerty[][2] = SONG(QWERTY_SOUND);
149float tone_colemak[][2] = SONG(COLEMAK_SOUND);
150#endif
151
152
153bool process_record_user(uint16_t keycode, keyrecord_t *record) {
154 switch (keycode) {
155 case QWR:
156 if (record->event.pressed) {
157 #ifdef AUDIO_ENABLE
158 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
159 #endif
160 layer_off(_CDH);
161 }
162 return false;
163 break;
164
165 case CDH:
166 if (record->event.pressed) {
167 #ifdef AUDIO_ENABLE
168 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
169 #endif
170 layer_on(_CDH);
171 }
172 return false;
173 break;
174
175 case SYM:
176 if (record->event.pressed) {
177 layer_on(_SYM);
178 } else {
179 layer_off(_SYM);
180 }
181 return false;
182 break;
183
184 }
185 return true;
186
187}
188
189const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
190{
191
192/* If id is in the range of BABL macros, call the babl function */
193/* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/
194#ifdef USE_BABLPASTE
195
196 if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
197 if (record->event.pressed) { // is there a case where this isn't desired?
198
199 babblePaste ( record, id );
200 return MACRO_NONE;
201 }
202 }
203#endif
204
205
206 // MACRODOWN only works in this function
207 switch(id) {
208 case 0:
209 if (record->event.pressed) {
210 register_code(KC_RSFT);
211 } else {
212 unregister_code(KC_RSFT);
213 }
214 break;
215
216 /* Colemak mod-dh moves the D key to the qwerty V position
217 This hack makes apple-V_position do what I mean */
218 case DHPASTE:
219 if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) {
220 if (record->event.pressed) {
221 clear_keyboard_but_mods();
222 register_code(KC_V);
223 } else {
224 unregister_code(KC_V);
225 }
226 } else {
227 if (record->event.pressed) {
228 register_code(KC_D);
229 } else {
230 unregister_code(KC_D);
231 }
232 }
233 break;
234
235 case VIBRK: // vi esc:
236 if (record->event.pressed) {
237 return MACRO( T(ESC),D(LSFT),T(SCLN),U(LSFT), END );
238 }
239 break;
240
241
242
243
244 default:
245 return MACRO_NONE;
246 }
247
248
249return MACRO_NONE;
250};
251
252
253
254
255
256void matrix_init_user(void) {
257}
258
259void matrix_scan_user(void) {
260
261}
262
263
264void led_set_user(uint8_t usb_led) {
265
266}
267
268
269
270
271
272
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md
new file mode 100644
index 000000000..96ee0e77a
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md
@@ -0,0 +1 @@
# A more programmer oriented keymap for microsoft-sculpt-mobile
diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS-sculpt-mobile/readme.md
new file mode 100644
index 000000000..d435b449f
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/readme.md
@@ -0,0 +1,58 @@
1
2This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
3into a hard-wired keyboard running QMK.
4
5The keyboard is known under several different names:
6Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded
7
8I had a stack of them,since they're cheap on ebay, travel well, and are just ergo enough.
9
10The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
11"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
12
13Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
14They're also allow the cable to be inserted on top or bottom.
15
16If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
17and avoid the wires dangling out the bottom.
18
19As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
20but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
21half millimeter off the end of the ribbon cable & the errors go away.
22
23My method for discovering the matrix was to set up a KEYMAP macro that included all pins.
24See MATRIX_TESTING_KEYMAP if you need it. Then set up a keymap that has all printable symbols
25in the first 4 rows. test each key & record output. Then switch the printable symbols to the
26bottom 4 rows & repeat. This was enough to show the matrix.
27
28
29The full original keymap for the sculpt is
30 A B C D E F G H --->
310 b n m , . /
321 g h "
332 7 8 9 0 Del PgUp
343 p [ ] \
354 y u i o
365 ~ - += j k l ; 5
376 a s d q w e, Up left
387 F7 F8 F9 F10 F11 F12 f
39
40-----> I J K L M N O P Q R
410 Caps FN
421 Vol+ mute Rctl vol- pgdn LCTL
432 Rshift LShift
443 Ralt LAlt
454 LGUI
465 6 bakspc 1 2 3 4 F4 F5 F6
476 Down right spc F1 F2 F3 tab
487 r t z x c v enter Esc
49
50This works with 18 cols + 8 rows on a Teensy++, or Arm based Teensy.
51
52The Astar mini has all pins exposed , so you can do 18x8
53If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns
54R and L to the same pin.
55
56Building - add ASTAR=1 to the compile line or leave out for teensy2++
57
58
diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS-sculpt-mobile/rules.mk
new file mode 100644
index 000000000..680389c84
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/rules.mk
@@ -0,0 +1,48 @@
1
2## Project specific files
3SRC= babblePaste.c
4
5
6ifdef ASTAR
7 CFLAGS=-D ASTAR
8 OPT_DEFS += -DBOOTLOADER_SIZE=4096
9 MCU = atmega32u4
10 OPT_DEFS += -DCATERINA_BOOTLOADER
11 SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \
12 avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
13
14else
15 MCU = at90usb1286
16 OPT_DEFS += -DBOOTLOADER_SIZE=2048
17 SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
18endif
19
20F_CPU = 16000000
21ARCH = AVR8
22F_USB = $(F_CPU)
23# Interrupt driven control endpoint task(+60)
24OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
25
26#
27BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
28MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
29EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
30CONSOLE_ENABLE ?= yes # Console for debug(+400)
31COMMAND_ENABLE ?= yes # Commands for debug and configuration
32# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
33SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
34# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
35NKRO_ENABLE ?= no # USB Nkey Rollover
36BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
37MIDI_ENABLE ?= no # MIDI controls
38UNICODE_ENABLE ?= no # Unicode
39BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
40AUDIO_ENABLE ?= no # Audio output on port C6
41
42
43USB ?= /dev/cu.usbmodem14141
44
45
46
47upload: build
48 $(SCULPT_UPLOAD_COMMAND)
diff --git a/keyboards/handwired/numpad20/Makefile b/keyboards/handwired/numpad20/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/numpad20/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h
new file mode 100644
index 000000000..847f2111f
--- /dev/null
+++ b/keyboards/handwired/numpad20/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xBB80
25#define PRODUCT_ID 0x0504
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Hexwire
28#define PRODUCT Numpad 20
29#define DESCRIPTION Handwired 4x5 numpad
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 4
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { F6, B1, B3, B6, B5 }
46#define MATRIX_COL_PINS { D1, D0, F5, F4 }
47#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/handwired/numpad20/keymaps/default/keymap.c b/keyboards/handwired/numpad20/keymaps/default/keymap.c
new file mode 100644
index 000000000..37031206a
--- /dev/null
+++ b/keyboards/handwired/numpad20/keymaps/default/keymap.c
@@ -0,0 +1,16 @@
1#include "numpad20.h"
2
3#define KC_ KC_TRNS
4
5const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6 [0] = COMPACT_KEYMAP(
7 LEFT,RGHT, UP ,DOWN, \
8 P7 , P8 , P9 ,PLUS, \
9 P4 , P5 , P6 ,MINS, \
10 P1 , P2 , P3 , ENT, \
11 P0 ,DOT ,RGHT, TAB \
12 )
13};
14
15const uint16_t PROGMEM fn_actions[] = {
16};
diff --git a/keyboards/handwired/numpad20/numpad20.c b/keyboards/handwired/numpad20/numpad20.c
new file mode 100644
index 000000000..101cf2cb4
--- /dev/null
+++ b/keyboards/handwired/numpad20/numpad20.c
@@ -0,0 +1,8 @@
1#include "numpad20.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
diff --git a/keyboards/handwired/numpad20/numpad20.h b/keyboards/handwired/numpad20/numpad20.h
new file mode 100644
index 000000000..191979be0
--- /dev/null
+++ b/keyboards/handwired/numpad20/numpad20.h
@@ -0,0 +1,20 @@
1#ifndef NUMPAD20_H
2#define NUMPAD20_H
3
4#include "quantum.h"
5
6#define COMPACT_KEYMAP( \
7 K00, K01, K02, K03, \
8 K10, K11, K12, K13, \
9 K20, K21, K22, K23, \
10 K30, K31, K32, K33, \
11 K40, K41, K42, K43 \
12 ) { \
13 { KC_##K00, KC_##K01, KC_##K02, KC_##K03 }, \
14 { KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \
15 { KC_##K20, KC_##K21, KC_##K22, KC_##K23 }, \
16 { KC_##K30, KC_##K31, KC_##K32, KC_##K33 }, \
17 { KC_##K40, KC_##K41, KC_##K42, KC_##K43 } \
18}
19
20#endif \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk
new file mode 100644
index 000000000..e897ef252
--- /dev/null
+++ b/keyboards/handwired/numpad20/rules.mk
@@ -0,0 +1,83 @@
1
2# MCU name
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=512
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68
69ifndef QUANTUM_DIR
70 include ../../../Makefile
71endif
72
73avrdude: build
74 ls /dev/tty* > /tmp/1; \
75 echo "Reset your Pro Micro now"; \
76 while [[ -z $$USB ]]; do \
77 sleep 1; \
78 ls /dev/tty* > /tmp/2; \
79 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
80 done; \
81 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
82
83.PHONY: avrdude
diff --git a/keyboards/handwired/ortho5x13/Makefile b/keyboards/handwired/ortho5x13/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h
new file mode 100644
index 000000000..f85159596
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xBB80
25#define PRODUCT_ID 0x050D
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Hexwire
28#define PRODUCT Ortho 5x13
29#define DESCRIPTION Handwired 5x13 ortholinear keyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 13
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 }
46#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
47#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
new file mode 100644
index 000000000..c1262a83d
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
@@ -0,0 +1,289 @@
1#include "ortho5x13.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12#define _QWERTY 0
13#define _COLEMAK 1
14#define _DVORAK 2
15#define _LOWER 3
16#define _RAISE 4
17#define _ADJUST 16
18
19enum custom_keycodes {
20 QWERTY = SAFE_RANGE,
21 COLEMAK,
22 DVORAK,
23 LOWER,
24 RAISE,
25 BACKLIT
26};
27
28// Fillers to make layering more clear
29#define _______ KC_TRNS
30#define XXXXXXX KC_NO
31
32#define KC_L1 LOWER
33#define KC_L2 RAISE
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* Qwerty
38 * ,------------------------------------------------------------------------------------------.
39 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
40 * |------+------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |
42 * |------+------+------+------+------+-------------+------+------+------+------+------+------|
43 * | ` | A | S | D | F | G | H | J | K | L | ; | ' | \ |
44 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
45 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | Up |
46 * |------+------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Bksp |Shift | Left | Down |Right |
48 * `------------------------------------------------------------------------------------------'
49 */
50[_QWERTY] = COMPACT_KEYMAP(
51 //,----+----+----+----+----+----+----+----+----+----+----+----+----.
52 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,
53 //|----+----+----+----+----+----+----+----+----+----+----+----+----|
54 TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC,
55 //|----+----+----+----+----+----+----+----+----+----+----+----+----|
56 GRV , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,BSLS,
57 //|----+----+----+----+----+----+----+----+----+----+----+----+----|
58 LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENT , UP ,
59 //|----+----+----+----+----+---------+----+----+----+----+----+----|
60 HYPR,LCTL,LALT,LGUI, L1 , SPACE , L2 ,BSPC,RSFT,LEFT,RGHT,DOWN
61 //`----+----+----+----+----+---------+----+----+----+----+----+----'
62 ),
63
64/* Colemak
65 * ,-----------------------------------------------------------------------------------.
66 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
69 * |------+------+------+------+------+-------------+------+------+------+------+------|
70 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
71 * |------+------+------+------+------+------|------+------+------+------+------+------|
72 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
73 * |------+------+------+------+------+------+------+------+------+------+------+------|
74 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
75 * `-----------------------------------------------------------------------------------'
76 */
77[_COLEMAK] = {
78 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
79 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL},
80 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
81 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
82 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
83},
84
85/* Dvorak
86 * ,-----------------------------------------------------------------------------------.
87 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
88 * |------+------+------+------+------+------+------+------+------+------+------+------|
89 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_DVORAK] = {
99 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
100 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL},
101 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
102 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
103 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
104},
105
106/* Lower
107 * ,-----------------------------------------------------------------------------------.
108 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
109 * |------+------+------+------+------+-------------+------+------+------+------+------|
110 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
111 * |------+------+------+------+------+-------------+------+------+------+------+------|
112 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
113 * |------+------+------+------+------+------|------+------+------+------+------+------|
114 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
115 * |------+------+------+------+------+------+------+------+------+------+------+------|
116 * | | | | | | | | Next | Vol- | Vol+ | Play |
117 * `-----------------------------------------------------------------------------------'
118 */
119[_LOWER] = {
120 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
121 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
122 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
123 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
124 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
125},
126
127/* Raise
128 * ,-----------------------------------------------------------------------------------.
129 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
132 * |------+------+------+------+------+-------------+------+------+------+------+------|
133 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
134 * |------+------+------+------+------+------|------+------+------+------+------+------|
135 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
136 * |------+------+------+------+------+------+------+------+------+------+------+------|
137 * | | | | | | | | Next | Vol- | Vol+ | Play |
138 * `-----------------------------------------------------------------------------------'
139 */
140[_RAISE] = {
141 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
142 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
143 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
144 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
145 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
146},
147
148/* Adjust (Lower + Raise)
149 * ,-----------------------------------------------------------------------------------.
150 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
151 * |------+------+------+------+------+------+------+------+------+------+------+------|
152 * | | Reset| | | | | | | | | | Del |
153 * |------+------+------+------+------+-------------+------+------+------+------+------|
154 * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
155 * |------+------+------+------+------+------|------+------+------+------+------+------|
156 * | |Voice-|Voice+|Musoff|Mus on| | | | | | | |
157 * |------+------+------+------+------+------+------+------+------+------+------+------|
158 * | | | | | | | | | | | |
159 * `-----------------------------------------------------------------------------------'
160 */
161[_ADJUST] = {
162 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
163 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
164 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
165 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
166 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
167}
168
169
170};
171
172#ifdef AUDIO_ENABLE
173float tone_startup[][2] = {
174 {NOTE_B5, 20},
175 {NOTE_B6, 8},
176 {NOTE_DS6, 20},
177 {NOTE_B6, 8}
178};
179
180float tone_qwerty[][2] = SONG(QWERTY_SOUND);
181float tone_dvorak[][2] = SONG(DVORAK_SOUND);
182float tone_colemak[][2] = SONG(COLEMAK_SOUND);
183
184float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
185
186float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
187#endif
188
189void persistant_default_layer_set(uint16_t default_layer) {
190 eeconfig_update_default_layer(default_layer);
191 default_layer_set(default_layer);
192}
193
194bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 switch (keycode) {
196 case QWERTY:
197 if (record->event.pressed) {
198 #ifdef AUDIO_ENABLE
199 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
200 #endif
201 persistant_default_layer_set(1UL<<_QWERTY);
202 }
203 return false;
204 break;
205 case COLEMAK:
206 if (record->event.pressed) {
207 #ifdef AUDIO_ENABLE
208 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
209 #endif
210 persistant_default_layer_set(1UL<<_COLEMAK);
211 }
212 return false;
213 break;
214 case DVORAK:
215 if (record->event.pressed) {
216 #ifdef AUDIO_ENABLE
217 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
218 #endif
219 persistant_default_layer_set(1UL<<_DVORAK);
220 }
221 return false;
222 break;
223 case LOWER:
224 if (record->event.pressed) {
225 layer_on(_LOWER);
226 update_tri_layer(_LOWER, _RAISE, _ADJUST);
227 } else {
228 layer_off(_LOWER);
229 update_tri_layer(_LOWER, _RAISE, _ADJUST);
230 }
231 return false;
232 break;
233 case RAISE:
234 if (record->event.pressed) {
235 layer_on(_RAISE);
236 update_tri_layer(_LOWER, _RAISE, _ADJUST);
237 } else {
238 layer_off(_RAISE);
239 update_tri_layer(_LOWER, _RAISE, _ADJUST);
240 }
241 return false;
242 break;
243 case BACKLIT:
244 if (record->event.pressed) {
245 register_code(KC_RSFT);
246 #ifdef BACKLIGHT_ENABLE
247 backlight_step();
248 #endif
249 } else {
250 unregister_code(KC_RSFT);
251 }
252 return false;
253 break;
254 }
255 return true;
256};
257
258void matrix_init_user(void) {
259 #ifdef AUDIO_ENABLE
260 startup_user();
261 #endif
262}
263
264#ifdef AUDIO_ENABLE
265
266void startup_user()
267{
268 _delay_ms(20); // gets rid of tick
269 PLAY_NOTE_ARRAY(tone_startup, false, 0);
270}
271
272void shutdown_user()
273{
274 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
275 _delay_ms(150);
276 stop_all_notes();
277}
278
279void music_on_user(void)
280{
281 music_scale_user();
282}
283
284void music_scale_user(void)
285{
286 PLAY_NOTE_ARRAY(music_scale, false, 0);
287}
288
289#endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.c b/keyboards/handwired/ortho5x13/ortho5x13.c
new file mode 100644
index 000000000..cf8352cc4
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/ortho5x13.c
@@ -0,0 +1,8 @@
1#include "ortho5x13.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.h b/keyboards/handwired/ortho5x13/ortho5x13.h
new file mode 100644
index 000000000..d442212fe
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/ortho5x13.h
@@ -0,0 +1,36 @@
1#ifndef ORTHO5X13_H
2#define ORTHO5X13_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
8 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
9 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
10 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
11 k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
12) \
13{ \
14 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \
15 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \
16 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \
17 { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b, k3c }, \
18 { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c } \
19}
20
21#define COMPACT_KEYMAP( \
22 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
23 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
24 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
25 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
26 k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
27) \
28{ \
29 { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, KC_##k0c }, \
30 { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, KC_##k1c }, \
31 { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, KC_##k2c }, \
32 { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c }, \
33 { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_NO, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c } \
34}
35
36#endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk
new file mode 100644
index 000000000..e897ef252
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/rules.mk
@@ -0,0 +1,83 @@
1
2# MCU name
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=512
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68
69ifndef QUANTUM_DIR
70 include ../../../Makefile
71endif
72
73avrdude: build
74 ls /dev/tty* > /tmp/1; \
75 echo "Reset your Pro Micro now"; \
76 while [[ -z $$USB ]]; do \
77 sleep 1; \
78 ls /dev/tty* > /tmp/2; \
79 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
80 done; \
81 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
82
83.PHONY: avrdude