diff options
| author | Merlin04 <Merlin04@users.noreply.github.com> | 2018-07-21 12:14:32 -0700 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-07-21 12:14:32 -0700 |
| commit | 3fc5a05d663ae2ea960e16fa16e976f9dd70b0f2 (patch) | |
| tree | 40d8ce346fe59f41e1cca3f609735fc6a2cd50da | |
| parent | 1147fc24adfe22eac6e67f9d7f0f1184f358f141 (diff) | |
| download | qmk_firmware-3fc5a05d663ae2ea960e16fa16e976f9dd70b0f2.tar.gz qmk_firmware-3fc5a05d663ae2ea960e16fa16e976f9dd70b0f2.zip | |
Keyboard: Added support for the Fractal keyboard (#3457)
* Added support for the Fractal keyboard
* Try to fix the issue
* Add support for the Fractal keyboard.
* Fix errors with files
| -rwxr-xr-x | keyboards/fractal/config.h | 58 | ||||
| -rwxr-xr-x | keyboards/fractal/fractal.c | 1 | ||||
| -rwxr-xr-x | keyboards/fractal/fractal.h | 36 | ||||
| -rw-r--r-- | keyboards/fractal/info.json | 15 | ||||
| -rw-r--r-- | keyboards/fractal/keymaps/default/config.h | 38 | ||||
| -rw-r--r-- | keyboards/fractal/keymaps/default/keymap.c | 225 | ||||
| -rw-r--r-- | keyboards/fractal/keymaps/default/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/fractal/readme.md | 14 | ||||
| -rwxr-xr-x | keyboards/fractal/rules.mk | 61 |
9 files changed, 450 insertions, 0 deletions
diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h new file mode 100755 index 000000000..30b703b6e --- /dev/null +++ b/keyboards/fractal/config.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | #ifndef CONFIG_H | ||
| 2 | #define CONFIG_H | ||
| 3 | |||
| 4 | #include "config_common.h" | ||
| 5 | |||
| 6 | /* USB Device descriptor parameter */ | ||
| 7 | #define VENDOR_ID 0xFEED | ||
| 8 | #define PRODUCT_ID 0x6060 | ||
| 9 | #define DEVICE_VER 0x0001 | ||
| 10 | #define MANUFACTURER KeyPCB | ||
| 11 | #define PRODUCT Fractal | ||
| 12 | #define DESCRIPTION Keyboard | ||
| 13 | |||
| 14 | /* key matrix size */ | ||
| 15 | #define MATRIX_ROWS 5 | ||
| 16 | #define MATRIX_COLS 12 | ||
| 17 | |||
| 18 | /* key matrix pins */ | ||
| 19 | #define MATRIX_ROW_PINS { B1, F7, F6, F5, F4 } | ||
| 20 | #define MATRIX_COL_PINS { B3, B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2 } | ||
| 21 | #define UNUSED_PINS | ||
| 22 | |||
| 23 | /* COL2ROW or ROW2COL */ | ||
| 24 | #define DIODE_DIRECTION COL2ROW | ||
| 25 | |||
| 26 | /* number of backlight levels */ | ||
| 27 | |||
| 28 | #ifdef BACKLIGHT_PIN | ||
| 29 | #define BACKLIGHT_LEVELS 0 | ||
| 30 | #endif | ||
| 31 | |||
| 32 | /* Set 0 if debouncing isn't needed */ | ||
| 33 | #define DEBOUNCING_DELAY 5 | ||
| 34 | |||
| 35 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 36 | #define LOCKING_SUPPORT_ENABLE | ||
| 37 | |||
| 38 | /* Locking resynchronize hack */ | ||
| 39 | #define LOCKING_RESYNC_ENABLE | ||
| 40 | |||
| 41 | /* key combination for command */ | ||
| 42 | #define IS_COMMAND() ( \ | ||
| 43 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 44 | ) | ||
| 45 | |||
| 46 | /* prevent stuck modifiers */ | ||
| 47 | #define PREVENT_STUCK_MODIFIERS | ||
| 48 | |||
| 49 | |||
| 50 | #ifdef RGB_DI_PIN | ||
| 51 | #define RGBLIGHT_ANIMATIONS | ||
| 52 | #define RGBLED_NUM 0 | ||
| 53 | #define RGBLIGHT_HUE_STEP 8 | ||
| 54 | #define RGBLIGHT_SAT_STEP 8 | ||
| 55 | #define RGBLIGHT_VAL_STEP 8 | ||
| 56 | #endif | ||
| 57 | |||
| 58 | #endif | ||
diff --git a/keyboards/fractal/fractal.c b/keyboards/fractal/fractal.c new file mode 100755 index 000000000..e315c7ab4 --- /dev/null +++ b/keyboards/fractal/fractal.c | |||
| @@ -0,0 +1 @@ | |||
| #include "fractal.h" | |||
diff --git a/keyboards/fractal/fractal.h b/keyboards/fractal/fractal.h new file mode 100755 index 000000000..1eefcecd7 --- /dev/null +++ b/keyboards/fractal/fractal.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | #ifndef FRACTAL_H | ||
| 2 | #define FRACTAL_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | #define LAYOUT_ortho_5x12( \ | ||
| 7 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ | ||
| 8 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ | ||
| 9 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ | ||
| 10 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, \ | ||
| 11 | K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \ | ||
| 12 | ) { \ | ||
| 13 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ | ||
| 14 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ | ||
| 15 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ | ||
| 16 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \ | ||
| 17 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 } \ | ||
| 18 | } | ||
| 19 | |||
| 20 | #define LAYOUT_preonic_mit( \ | ||
| 21 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ | ||
| 22 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ | ||
| 23 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ | ||
| 24 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, \ | ||
| 25 | K400, K401, K402, K403, K404, K406, K407, K408, K409, K410, K411 \ | ||
| 26 | ) { \ | ||
| 27 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ | ||
| 28 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ | ||
| 29 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ | ||
| 30 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \ | ||
| 31 | { K400, K401, K402, K403, K404, KC_NO, K406, K407, K408, K409, K410, K411 } \ | ||
| 32 | } | ||
| 33 | |||
| 34 | #define KEYMAP LAYOUT_preonic_mit | ||
| 35 | |||
| 36 | #endif | ||
diff --git a/keyboards/fractal/info.json b/keyboards/fractal/info.json new file mode 100644 index 000000000..25bc70e7d --- /dev/null +++ b/keyboards/fractal/info.json | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Fractal", | ||
| 3 | "url": "https://keypcb.bigcartel.com/product/fractal-keyboard-group-buy", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 12, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_ortho_5x12": { | ||
| 9 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}] | ||
| 10 | }, | ||
| 11 | "LAYOUT_preonic_mit": { | ||
| 12 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4, "w":2}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}] | ||
| 13 | } | ||
| 14 | } | ||
| 15 | } | ||
diff --git a/keyboards/fractal/keymaps/default/config.h b/keyboards/fractal/keymaps/default/config.h new file mode 100644 index 000000000..5c760681e --- /dev/null +++ b/keyboards/fractal/keymaps/default/config.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef AUDIO_ENABLE | ||
| 4 | #define STARTUP_SONG SONG(PLANCK_SOUND) | ||
| 5 | // #define STARTUP_SONG SONG(NO_SOUND) | ||
| 6 | |||
| 7 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ | ||
| 8 | SONG(COLEMAK_SOUND), \ | ||
| 9 | SONG(DVORAK_SOUND) \ | ||
| 10 | } | ||
| 11 | #endif | ||
| 12 | |||
| 13 | #define MUSIC_MASK (keycode != KC_NO) | ||
| 14 | |||
| 15 | /* | ||
| 16 | * MIDI options | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 20 | //#define MIDI_ENABLE_STRICT 1 | ||
| 21 | |||
| 22 | /* enable basic MIDI features: | ||
| 23 | - MIDI notes can be sent when in Music mode is on | ||
| 24 | */ | ||
| 25 | |||
| 26 | #define MIDI_BASIC | ||
| 27 | |||
| 28 | /* enable advanced MIDI features: | ||
| 29 | - MIDI notes can be added to the keymap | ||
| 30 | - Octave shift and transpose | ||
| 31 | - Virtual sustain, portamento, and modulation wheel | ||
| 32 | - etc. | ||
| 33 | */ | ||
| 34 | //#define MIDI_ADVANCED | ||
| 35 | |||
| 36 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 37 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | ||
| 38 | |||
diff --git a/keyboards/fractal/keymaps/default/keymap.c b/keyboards/fractal/keymaps/default/keymap.c new file mode 100644 index 000000000..8bb1f9831 --- /dev/null +++ b/keyboards/fractal/keymaps/default/keymap.c | |||
| @@ -0,0 +1,225 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * Modified by KeyPCB for the Fractal keyboard | ||
| 3 | * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps | ||
| 4 | * | ||
| 5 | * This program is free software: you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | |||
| 21 | enum preonic_layers { | ||
| 22 | _QWERTY, | ||
| 23 | _COLEMAK, | ||
| 24 | _DVORAK, | ||
| 25 | _LOWER, | ||
| 26 | _RAISE, | ||
| 27 | _ADJUST | ||
| 28 | }; | ||
| 29 | |||
| 30 | enum preonic_keycodes { | ||
| 31 | QWERTY = SAFE_RANGE, | ||
| 32 | COLEMAK, | ||
| 33 | DVORAK, | ||
| 34 | LOWER, | ||
| 35 | RAISE, | ||
| 36 | BACKLIT | ||
| 37 | }; | ||
| 38 | |||
| 39 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 40 | |||
| 41 | /* Qwerty | ||
| 42 | * ,-----------------------------------------------------------------------------------. | ||
| 43 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 44 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 45 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | | ||
| 46 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 47 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | | ||
| 48 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 49 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
| 50 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 51 | * | Ctrl | Alt | GUI |Lower | Bksp | Space |Raise | Left | Down | Up |Right | | ||
| 52 | * `-----------------------------------------------------------------------------------' | ||
| 53 | */ | ||
| 54 | [_QWERTY] = LAYOUT_ortho_5x12( \ | ||
| 55 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 56 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ | ||
| 57 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | ||
| 58 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ | ||
| 59 | KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
| 60 | ), | ||
| 61 | |||
| 62 | /* Colemak | ||
| 63 | * ,-----------------------------------------------------------------------------------. | ||
| 64 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 65 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 66 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | | ||
| 67 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 68 | * | Esc | A | R | S | T | D | H | N | E | I | O | " | | ||
| 69 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 70 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | ||
| 71 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 72 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 73 | * `-----------------------------------------------------------------------------------' | ||
| 74 | */ | ||
| 75 | [_COLEMAK] = LAYOUT_ortho_5x12( \ | ||
| 76 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 77 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ | ||
| 78 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ | ||
| 79 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ | ||
| 80 | KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
| 81 | ), | ||
| 82 | |||
| 83 | /* Dvorak | ||
| 84 | * ,-----------------------------------------------------------------------------------. | ||
| 85 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 86 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 87 | * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | | ||
| 88 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 89 | * | Esc | A | O | E | U | I | D | H | T | N | S | / | | ||
| 90 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 91 | * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | | ||
| 92 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 93 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 94 | * `-----------------------------------------------------------------------------------' | ||
| 95 | */ | ||
| 96 | [_DVORAK] = LAYOUT_ortho_5x12( \ | ||
| 97 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 98 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ | ||
| 99 | KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ | ||
| 100 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ | ||
| 101 | KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
| 102 | ), | ||
| 103 | |||
| 104 | /* Lower | ||
| 105 | * ,-----------------------------------------------------------------------------------. | ||
| 106 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
| 107 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 108 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | | ||
| 109 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 110 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 111 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 112 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | | ||
| 113 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 114 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 115 | * `-----------------------------------------------------------------------------------' | ||
| 116 | */ | ||
| 117 | [_LOWER] = LAYOUT_ortho_5x12( \ | ||
| 118 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ | ||
| 119 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ | ||
| 120 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ | ||
| 121 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ | ||
| 122 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | ||
| 123 | ), | ||
| 124 | |||
| 125 | /* Raise | ||
| 126 | * ,-----------------------------------------------------------------------------------. | ||
| 127 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 128 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 129 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 130 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 131 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 132 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 133 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | | ||
| 134 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 135 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 136 | * `-----------------------------------------------------------------------------------' | ||
| 137 | */ | ||
| 138 | [_RAISE] = LAYOUT_ortho_5x12( \ | ||
| 139 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 140 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
| 141 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
| 142 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ | ||
| 143 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | ||
| 144 | ), | ||
| 145 | |||
| 146 | /* Adjust (Lower + Raise) | ||
| 147 | * ,-----------------------------------------------------------------------------------. | ||
| 148 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 149 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 150 | * | | Reset| | | | | | | | | | Del | | ||
| 151 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 152 | * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | | ||
| 153 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 154 | * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | | ||
| 155 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 156 | * | | | | | | | | | | | | | ||
| 157 | * `-----------------------------------------------------------------------------------' | ||
| 158 | */ | ||
| 159 | [_ADJUST] = LAYOUT_ortho_5x12( \ | ||
| 160 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ | ||
| 161 | _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ | ||
| 162 | _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ | ||
| 163 | _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ | ||
| 164 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 165 | ) | ||
| 166 | |||
| 167 | |||
| 168 | }; | ||
| 169 | |||
| 170 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 171 | switch (keycode) { | ||
| 172 | case QWERTY: | ||
| 173 | if (record->event.pressed) { | ||
| 174 | set_single_persistent_default_layer(_QWERTY); | ||
| 175 | } | ||
| 176 | return false; | ||
| 177 | break; | ||
| 178 | case COLEMAK: | ||
| 179 | if (record->event.pressed) { | ||
| 180 | set_single_persistent_default_layer(_COLEMAK); | ||
| 181 | } | ||
| 182 | return false; | ||
| 183 | break; | ||
| 184 | case DVORAK: | ||
| 185 | if (record->event.pressed) { | ||
| 186 | set_single_persistent_default_layer(_DVORAK); | ||
| 187 | } | ||
| 188 | return false; | ||
| 189 | break; | ||
| 190 | case LOWER: | ||
| 191 | if (record->event.pressed) { | ||
| 192 | layer_on(_LOWER); | ||
| 193 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 194 | } else { | ||
| 195 | layer_off(_LOWER); | ||
| 196 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 197 | } | ||
| 198 | return false; | ||
| 199 | break; | ||
| 200 | case RAISE: | ||
| 201 | if (record->event.pressed) { | ||
| 202 | layer_on(_RAISE); | ||
| 203 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 204 | } else { | ||
| 205 | layer_off(_RAISE); | ||
| 206 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 207 | } | ||
| 208 | return false; | ||
| 209 | break; | ||
| 210 | case BACKLIT: | ||
| 211 | if (record->event.pressed) { | ||
| 212 | register_code(KC_RSFT); | ||
| 213 | #ifdef BACKLIGHT_ENABLE | ||
| 214 | backlight_step(); | ||
| 215 | #endif | ||
| 216 | PORTE &= ~(1<<6); | ||
| 217 | } else { | ||
| 218 | unregister_code(KC_RSFT); | ||
| 219 | PORTE |= (1<<6); | ||
| 220 | } | ||
| 221 | return false; | ||
| 222 | break; | ||
| 223 | } | ||
| 224 | return true; | ||
| 225 | }; | ||
diff --git a/keyboards/fractal/keymaps/default/readme.md b/keyboards/fractal/keymaps/default/readme.md new file mode 100644 index 000000000..9722e901e --- /dev/null +++ b/keyboards/fractal/keymaps/default/readme.md | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # The Default Fractal Layout | ||
| 2 | |||
diff --git a/keyboards/fractal/readme.md b/keyboards/fractal/readme.md new file mode 100644 index 000000000..1bb41cf7f --- /dev/null +++ b/keyboards/fractal/readme.md | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | Fractal | ||
| 2 | === | ||
| 3 | |||
| 4 | The Fractal keyboard has a layout inspired by keyboards such as Preonic and JJ50. It aims to deliver a good quality but affordable keyboard. It supports Alps and MX switches and uses a Pro Micro as the controller. | ||
| 5 | |||
| 6 | Keyboard Maintainer: The QMK Community | ||
| 7 | Hardware Supported: Fractal | ||
| 8 | Hardware Availability: [KeyPCB](https://keypcb.bigcartel.com/product/fractal-keyboard-group-buy) | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make fractal:default | ||
| 13 | |||
| 14 | See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. | ||
diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk new file mode 100755 index 000000000..b5808c15e --- /dev/null +++ b/keyboards/fractal/rules.mk | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Processor frequency. | ||
| 5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 8 | # automatically to create a 32-bit value in your source code. | ||
| 9 | # | ||
| 10 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 12 | # does not *change* the processor frequency - it should merely be updated to | ||
| 13 | # reflect the processor speed set externally so that the code can use accurate | ||
| 14 | # software delays. | ||
| 15 | F_CPU = 16000000 | ||
| 16 | |||
| 17 | # | ||
| 18 | # LUFA specific | ||
| 19 | # | ||
| 20 | # Target architecture (see library "Board Types" documentation). | ||
| 21 | ARCH = AVR8 | ||
| 22 | |||
| 23 | # Input clock frequency. | ||
| 24 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 25 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 26 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 27 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 28 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 29 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 30 | # source code. | ||
| 31 | # | ||
| 32 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 33 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 34 | F_USB = $(F_CPU) | ||
| 35 | |||
| 36 | # Interrupt driven control endpoint task(+60) | ||
| 37 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 38 | |||
| 39 | |||
| 40 | # Boot Section Size in *bytes* | ||
| 41 | BOOTLOADER = caterina | ||
| 42 | |||
| 43 | |||
| 44 | # Build Options | ||
| 45 | # change yes to no to disable | ||
| 46 | # | ||
| 47 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 48 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 49 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 50 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 51 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 52 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 53 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 54 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
| 55 | MIDI_ENABLE = no # MIDI controls | ||
| 56 | UNICODE_ENABLE = no # Unicode | ||
| 57 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 58 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 59 | |||
| 60 | LAYOUTS = preonic_mit ortho_5x12 | ||
| 61 | LAYOUTS_HAS_RGB = no | ||
