aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-01-21 11:22:21 -0800
committerDrashna Jaelre <drashna@live.com>2019-01-21 11:22:21 -0800
commit4822ad6be194f416f6c95c468e26197dd442ac52 (patch)
tree533bc97ba994576b111bc58e65692c5ff9b4e1e8
parent37b042a594d5f268ed04ad3d484ab81715862403 (diff)
downloadqmk_firmware-4822ad6be194f416f6c95c468e26197dd442ac52.tar.gz
qmk_firmware-4822ad6be194f416f6c95c468e26197dd442ac52.zip
handwired/retro_refit: refactor, Configurator support and readme update (#4899)
* handwired/retro_refit: refactor - retro_refit.h - updated to use #pragma once include guard - refactored layout macro to not auto-prepend KC_ to keycodes - renamed to LAYOUT (from KEYMAP) - aligned for readability - default keymap.c - now uses #include QMK_KEYBOARD_H - removed unused fn_actions and action_get_macro blocks * handwired/retro_refit: Configurator support * handwired/retro_refit: readme update Updated readme to format of current QMK template.
-rw-r--r--keyboards/handwired/retro_refit/info.json95
-rw-r--r--keyboards/handwired/retro_refit/keymaps/default/keymap.c33
-rw-r--r--keyboards/handwired/retro_refit/readme.md72
-rw-r--r--keyboards/handwired/retro_refit/retro_refit.h51
4 files changed, 155 insertions, 96 deletions
diff --git a/keyboards/handwired/retro_refit/info.json b/keyboards/handwired/retro_refit/info.json
new file mode 100644
index 000000000..44ae97cd1
--- /dev/null
+++ b/keyboards/handwired/retro_refit/info.json
@@ -0,0 +1,95 @@
1{
2 "keyboard_name": "handwired/retro_refit",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 15.5,
6 "height": 6.5,
7 "layouts": {
8 "LAYOUT": {
9 "key_count": 81,
10 "layout": [
11 {"label":"Esc", "x":0, "y":0},
12 {"label":"F1", "x":1, "y":0},
13 {"label":"F2", "x":2, "y":0},
14 {"label":"F3", "x":3, "y":0},
15 {"label":"F4", "x":4, "y":0},
16 {"label":"F5", "x":5, "y":0},
17 {"label":"F6", "x":6, "y":0},
18 {"label":"F7", "x":7, "y":0},
19 {"label":"F8", "x":8, "y":0},
20 {"label":"F9", "x":9, "y":0},
21 {"label":"F10", "x":10, "y":0},
22 {"label":"Num Lock", "x":11.5, "y":0},
23 {"label":"Scroll Lock", "x":12.5, "y":0},
24 {"label":"Print Screen", "x":13.5, "y":0},
25 {"label":"Pause", "x":14.5, "y":0},
26 {"label":"`", "x":0, "y":1.5},
27 {"label":"1", "x":1, "y":1.5},
28 {"label":"2", "x":2, "y":1.5},
29 {"label":"3", "x":3, "y":1.5},
30 {"label":"4", "x":4, "y":1.5},
31 {"label":"5", "x":5, "y":1.5},
32 {"label":"6", "x":6, "y":1.5},
33 {"label":"7", "x":7, "y":1.5},
34 {"label":"8", "x":8, "y":1.5},
35 {"label":"9", "x":9, "y":1.5},
36 {"label":"0", "x":10, "y":1.5},
37 {"label":"-", "x":11, "y":1.5},
38 {"label":"=", "x":12, "y":1.5},
39 {"label":"Backspace", "x":13, "y":1.5, "w":1.5},
40 {"label":"Home", "x":14.5, "y":1.5},
41 {"label":"Tab", "x":0, "y":2.5, "w":1.5},
42 {"label":"Q", "x":1.5, "y":2.5},
43 {"label":"W", "x":2.5, "y":2.5},
44 {"label":"E", "x":3.5, "y":2.5},
45 {"label":"R", "x":4.5, "y":2.5},
46 {"label":"T", "x":5.5, "y":2.5},
47 {"label":"Y", "x":6.5, "y":2.5},
48 {"label":"U", "x":7.5, "y":2.5},
49 {"label":"I", "x":8.5, "y":2.5},
50 {"label":"O", "x":9.5, "y":2.5},
51 {"label":"P", "x":10.5, "y":2.5},
52 {"label":"[", "x":11.5, "y":2.5},
53 {"label":"]", "x":12.5, "y":2.5},
54 {"label":"Page Up", "x":14.5, "y":2.5},
55 {"label":"Ctrl", "x":0, "y":3.5, "w":1.75},
56 {"label":"A", "x":1.75, "y":3.5},
57 {"label":"S", "x":2.75, "y":3.5},
58 {"label":"D", "x":3.75, "y":3.5},
59 {"label":"F", "x":4.75, "y":3.5},
60 {"label":"G", "x":5.75, "y":3.5},
61 {"label":"H", "x":6.75, "y":3.5},
62 {"label":"J", "x":7.75, "y":3.5},
63 {"label":"K", "x":8.75, "y":3.5},
64 {"label":"L", "x":9.75, "y":3.5},
65 {"label":";", "x":10.75, "y":3.5},
66 {"label":"'", "x":11.75, "y":3.5},
67 {"label":"Enter", "x":12.75, "y":3.5, "w":1.75},
68 {"label":"Page Down", "x":14.5, "y":3.5},
69 {"label":"Shift", "x":0, "y":4.5, "w":2.25},
70 {"label":"Z", "x":2.25, "y":4.5},
71 {"label":"X", "x":3.25, "y":4.5},
72 {"label":"C", "x":4.25, "y":4.5},
73 {"label":"V", "x":5.25, "y":4.5},
74 {"label":"B", "x":6.25, "y":4.5},
75 {"label":"N", "x":7.25, "y":4.5},
76 {"label":"M", "x":8.25, "y":4.5},
77 {"label":",", "x":9.25, "y":4.5},
78 {"label":".", "x":10.25, "y":4.5},
79 {"label":"/", "x":11.25, "y":4.5},
80 {"label":"Shift", "x":12.25, "y":4.5, "w":1.25},
81 {"label":"Up", "x":13.5, "y":4.5},
82 {"label":"End", "x":14.5, "y":4.5},
83 {"label":"Alt", "x":0, "y":5.5, "w":1.25},
84 {"label":"Caps Lock", "x":1.25, "y":5.5, "w":1.25},
85 {"label":"\\", "x":2.5, "y":5.5},
86 {"label":"Space", "x":3.5, "y":5.5, "w":7},
87 {"label":"Insert", "x":10.5, "y":5.5},
88 {"label":"Delete", "x":11.5, "y":5.5},
89 {"label":"Left", "x":12.5, "y":5.5},
90 {"label":"Down", "x":13.5, "y":5.5},
91 {"label":"Right", "x":14.5, "y":5.5}
92 ]
93 }
94 }
95}
diff --git a/keyboards/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c
index a850bd508..2f9f28478 100644
--- a/keyboards/handwired/retro_refit/keymaps/default/keymap.c
+++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c
@@ -1,27 +1,12 @@
1 1#include QMK_KEYBOARD_H
2#include "retro_refit.h"
3 2
4const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
5[0] = 4 [0] = LAYOUT( \
6 KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ 5 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NLCK, KC_SLCK, KC_PSCR, KC_PAUS, \
7 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ 6 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \
8 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ 7 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_PGUP, \
9 BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ 8 KC_BSLS, 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_PGDN, \
10 LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ 9 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_END, \
11 LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), 10 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_INS, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT \
12}; 11 ),
13
14const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
15{
16 // MACRODOWN only works in this function
17 switch(id) {
18 case 0:
19 if (record->event.pressed) {
20 register_code(KC_RSFT);
21 } else {
22 unregister_code(KC_RSFT);
23 }
24 break;
25 }
26 return MACRO_NONE;
27}; 12};
diff --git a/keyboards/handwired/retro_refit/readme.md b/keyboards/handwired/retro_refit/readme.md
index 9f10edf9f..8dfca7b10 100644
--- a/keyboards/handwired/retro_refit/readme.md
+++ b/keyboards/handwired/retro_refit/readme.md
@@ -1,60 +1,42 @@
1retro_refit keyboard firmware 1# retro_refit
2======================
3
4## Keyboard Info
5 2
6The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop". 3The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop".
7 4
8http://imgur.com/a/08Fyj 5[Image Gallery](https://imgur.com/a/08Fyj)
9 6
10This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow". 7This keyboard uses a LAYOUT macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow".
11 8
12The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y. 9The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corresponds to a key in row x column y.
13 10
14``` 11```
15#define KEYMAP( \ 12#define LAYOUT( \
16 K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ 13 K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \
17 K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ 14 K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \
18 K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ 15 K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \
19 K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ 16 K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \
20 K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ 17 K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \
21 K10, K06, K25, K07, K86, K85, K95, K90, K93 \ 18 K10, K06, K25, K07, K86, K85, K95, K90, K93 \
22) { \ 19) { \
23{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ 20 { K00, K01, K02, K03, K04, K05, K06, K07 }, \
24{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ 21 { K10, K11, K12, K13, K14, K15, K16, K17 }, \
25{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ 22 { K20, K21, K22, K23, K24, K25, K26, K27 }, \
26{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ 23 { K30, K31, K32, K33, K34, K35, K36, K37 }, \
27{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ 24 { K40, K41, K42, K43, K44, K45, K46, K47 }, \
28{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \ 25 { K50, K51, K52, K53, K54, K55, K56, K57 }, \
29{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \ 26 { K60, K61, K62, K63, K64, K65, K66, K67 }, \
30{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ 27 { K70, K71, K72, K73, K74, K75, K76, K77 }, \
31{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ 28 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K85, K86, K87 }, \
32{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ 29 { K90, K91, KC_NO, K93, K94, K95, KC_NO, K97 }, \
33{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ 30 { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7 } \
34} 31}
35``` 32```
36 33
37 34
38## Quantum MK Firmware 35Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
39 36Hardware Supported: Leading Edge D3 386 keyboard, Teensy
40For the full Quantum feature list, see [the parent readme.md](/readme.md).
41
42## Building
43
44Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
45
46Depending on which keymap you would like to use, you will have to compile slightly differently.
47 37
48### Default 38Make example for this keyboard (after setting up your build environment):
49To build with the default keymap, simply run `make default`.
50 39
51### Other Keymaps 40 make handwired/retro_refit:default
52Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
53
54To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
55
56```
57$ make [default|jack|<name>]
58```
59 41
60Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. \ No newline at end of file 42See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/retro_refit/retro_refit.h b/keyboards/handwired/retro_refit/retro_refit.h
index 109acdc39..ad1c567a8 100644
--- a/keyboards/handwired/retro_refit/retro_refit.h
+++ b/keyboards/handwired/retro_refit/retro_refit.h
@@ -1,38 +1,35 @@
1#ifndef RETRO_REFIT_H 1#pragma once
2#define RETRO_REFIT_H
3 2
4#include "quantum.h" 3#include "quantum.h"
5 4
6// This macro is an example of using a non-standard row-column matrix. The 5// This macro is an example of using a non-standard row-column matrix. The
7// keyboard in question had 11 rows and 8 columns, but the rows were not all 6// keyboard in question had 11 rows and 8 columns, but the rows were not all
8// horizontal, and the columns were not all vertical. For example, row 2 7// horizontal, and the columns were not all vertical. For example, row 2
9// contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and 8// contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and
10// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", 9// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B",
11// "Left Alt", "Up Arrow", and "Down Arrow". 10// "Left Alt", "Up Arrow", and "Down Arrow".
12// 11//
13// The macro makes programming the keys easier and in a more straight-forward 12// The macro makes programming the keys easier and in a more straight-forward
14// manner because it realigns the keys into a 6x15 sensible keyboard layout 13// manner because it realigns the keys into a 6x15 sensible keyboard layout
15// instead of the obtuse 11x8 matrix. 14// instead of the obtuse 11x8 matrix.
16 15
17#define KEYMAP( \ 16#define LAYOUT( \
18 K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ 17 K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \
19 K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ 18 K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \
20 K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ 19 K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \
21 K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ 20 K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \
22 K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ 21 K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \
23 K10, K06, K25, K07, K86, K85, K95, K90, K93 \ 22 K10, K06, K25, K07, K86, K85, K95, K90, K93 \
24) { \ 23) { \
25{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ 24 { K00, K01, K02, K03, K04, K05, K06, K07 }, \
26{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ 25 { K10, K11, K12, K13, K14, K15, K16, K17 }, \
27{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ 26 { K20, K21, K22, K23, K24, K25, K26, K27 }, \
28{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ 27 { K30, K31, K32, K33, K34, K35, K36, K37 }, \
29{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ 28 { K40, K41, K42, K43, K44, K45, K46, K47 }, \
30{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \ 29 { K50, K51, K52, K53, K54, K55, K56, K57 }, \
31{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \ 30 { K60, K61, K62, K63, K64, K65, K66, K67 }, \
32{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ 31 { K70, K71, K72, K73, K74, K75, K76, K77 }, \
33{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ 32 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K85, K86, K87 }, \
34{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ 33 { K90, K91, KC_NO, K93, K94, K95, KC_NO, K97 }, \
35{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ 34 { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7 } \
36} 35}
37
38#endif \ No newline at end of file