diff options
22 files changed, 1226 insertions, 32 deletions
diff --git a/keyboards/atreus62/Makefile b/keyboards/atreus62/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/atreus62/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/atreus62/atreus62.c b/keyboards/atreus62/atreus62.c new file mode 100644 index 000000000..ba5bce989 --- /dev/null +++ b/keyboards/atreus62/atreus62.c | |||
| @@ -0,0 +1 @@ | |||
| #include "atreus62.h" \ No newline at end of file | |||
diff --git a/keyboards/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h new file mode 100644 index 000000000..eacf5b451 --- /dev/null +++ b/keyboards/atreus62/atreus62.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #ifndef ATREUS62_H | ||
| 2 | #define ATREUS62_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | void promicro_bootloader_jmp(bool program); | ||
| 7 | |||
| 8 | // This a shortcut to help you visually see your layout. | ||
| 9 | // The first section contains all of the arguements | ||
| 10 | // The second converts the arguments into a two-dimensional array | ||
| 11 | #define KEYMAP( \ | ||
| 12 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 13 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 14 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 15 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ | ||
| 16 | k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ | ||
| 17 | ) \ | ||
| 18 | { \ | ||
| 19 | { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ | ||
| 20 | { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ | ||
| 21 | { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \ | ||
| 22 | { k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \ | ||
| 23 | { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \ | ||
| 24 | } | ||
| 25 | |||
| 26 | #endif \ No newline at end of file | ||
diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h new file mode 100644 index 000000000..90a4aa05a --- /dev/null +++ b/keyboards/atreus62/config.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along 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 | |||
| 25 | #define VENDOR_ID 0xFEED | ||
| 26 | #define PRODUCT_ID 0x6062 | ||
| 27 | #define DEVICE_VER 0x0001 | ||
| 28 | #define MANUFACTURER Profet | ||
| 29 | #define PRODUCT Atreus62 | ||
| 30 | #define DESCRIPTION q.m.k. keyboard firmware for Atreus62 | ||
| 31 | |||
| 32 | /* key matrix size */ | ||
| 33 | // Rows are doubled-up | ||
| 34 | #define MATRIX_ROWS 5 | ||
| 35 | #define MATRIX_COLS 13 | ||
| 36 | |||
| 37 | // wiring of each half | ||
| 38 | #define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 } | ||
| 39 | #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, C6 } | ||
| 40 | |||
| 41 | #define CATERINA_BOOTLOADER | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION ROW2COL | ||
| 45 | |||
| 46 | /* define if matrix has ghost */ | ||
| 47 | //#define MATRIX_HAS_GHOST | ||
| 48 | |||
| 49 | /* number of backlight levels */ | ||
| 50 | // #define BACKLIGHT_LEVELS 3 | ||
| 51 | |||
| 52 | /* Set 0 if debouncing isn't needed */ | ||
| 53 | #define DEBOUNCING_DELAY 5 | ||
| 54 | |||
| 55 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 56 | #define LOCKING_SUPPORT_ENABLE | ||
| 57 | /* Locking resynchronize hack */ | ||
| 58 | #define LOCKING_RESYNC_ENABLE | ||
| 59 | |||
| 60 | /* key combination for command */ | ||
| 61 | #define IS_COMMAND() ( \ | ||
| 62 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 63 | ) | ||
| 64 | |||
| 65 | /* | ||
| 66 | * Feature disable options | ||
| 67 | * These options are also useful to firmware size reduction. | ||
| 68 | */ | ||
| 69 | |||
| 70 | /* disable debug print */ | ||
| 71 | // #define NO_DEBUG | ||
| 72 | |||
| 73 | /* disable print */ | ||
| 74 | // #define NO_PRINT | ||
| 75 | |||
| 76 | /* disable action features */ | ||
| 77 | //#define NO_ACTION_LAYER | ||
| 78 | //#define NO_ACTION_TAPPING | ||
| 79 | //#define NO_ACTION_ONESHOT | ||
| 80 | //#define NO_ACTION_MACRO | ||
| 81 | //#define NO_ACTION_FUNCTION | ||
| 82 | |||
| 83 | #endif | ||
diff --git a/keyboards/atreus62/keymaps/default/keymap.c b/keyboards/atreus62/keymaps/default/keymap.c new file mode 100644 index 000000000..52802c77b --- /dev/null +++ b/keyboards/atreus62/keymaps/default/keymap.c | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | // this is the style you want to emulate. | ||
| 2 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | ||
| 3 | |||
| 4 | #include "atreus62.h" | ||
| 5 | |||
| 6 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 7 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 8 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 9 | // entirely and just use numbers. | ||
| 10 | #define _DEFAULT 0 | ||
| 11 | #define _NAV 1 | ||
| 12 | #define _RESET 2 | ||
| 13 | |||
| 14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 15 | [_DEFAULT] = { /* qwerty */ | ||
| 16 | { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, | ||
| 17 | { KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC }, | ||
| 18 | { KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, | ||
| 19 | { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC }, | ||
| 20 | { KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI } | ||
| 21 | }, | ||
| 22 | |||
| 23 | [_NAV] = { | ||
| 24 | { TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, | ||
| 25 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS }, | ||
| 26 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS }, | ||
| 27 | { TO(_RESET), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, | ||
| 28 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } | ||
| 29 | }, | ||
| 30 | |||
| 31 | [_RESET] = { | ||
| 32 | { TO(_DEFAULT), KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, | ||
| 33 | { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, | ||
| 34 | { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, | ||
| 35 | { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, | ||
| 36 | { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , RESET } | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | /* | ||
| 41 | [_TRNS] = { | ||
| 42 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, | ||
| 43 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, | ||
| 44 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, | ||
| 45 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, | ||
| 46 | { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } | ||
| 47 | }, | ||
| 48 | */ | ||
| 49 | }; | ||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | const uint16_t PROGMEM fn_actions[] = { | ||
| 54 | |||
| 55 | }; | ||
| 56 | |||
| 57 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 58 | { | ||
| 59 | // MACRODOWN only works in this function | ||
| 60 | switch (id) { | ||
| 61 | case 0: | ||
| 62 | if (record->event.pressed) { | ||
| 63 | register_code(KC_RSFT); | ||
| 64 | } | ||
| 65 | else { | ||
| 66 | unregister_code(KC_RSFT); | ||
| 67 | } | ||
| 68 | break; | ||
| 69 | } | ||
| 70 | return MACRO_NONE; | ||
| 71 | }; | ||
diff --git a/keyboards/atreus62/pro_micro.h b/keyboards/atreus62/pro_micro.h new file mode 100644 index 000000000..f9e7ed75d --- /dev/null +++ b/keyboards/atreus62/pro_micro.h | |||
| @@ -0,0 +1,362 @@ | |||
| 1 | /* | ||
| 2 | pins_arduino.h - Pin definition functions for Arduino | ||
| 3 | Part of Arduino - http://www.arduino.cc/ | ||
| 4 | |||
| 5 | Copyright (c) 2007 David A. Mellis | ||
| 6 | |||
| 7 | This library is free software; you can redistribute it and/or | ||
| 8 | modify it under the terms of the GNU Lesser General Public | ||
| 9 | License as published by the Free Software Foundation; either | ||
| 10 | version 2.1 of the License, or (at your option) any later version. | ||
| 11 | |||
| 12 | This library is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | Lesser General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU Lesser General | ||
| 18 | Public License along with this library; if not, write to the | ||
| 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, | ||
| 20 | Boston, MA 02111-1307 USA | ||
| 21 | |||
| 22 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef Pins_Arduino_h | ||
| 26 | #define Pins_Arduino_h | ||
| 27 | |||
| 28 | #include <avr/pgmspace.h> | ||
| 29 | |||
| 30 | // Workaround for wrong definitions in "iom32u4.h". | ||
| 31 | // This should be fixed in the AVR toolchain. | ||
| 32 | #undef UHCON | ||
| 33 | #undef UHINT | ||
| 34 | #undef UHIEN | ||
| 35 | #undef UHADDR | ||
| 36 | #undef UHFNUM | ||
| 37 | #undef UHFNUML | ||
| 38 | #undef UHFNUMH | ||
| 39 | #undef UHFLEN | ||
| 40 | #undef UPINRQX | ||
| 41 | #undef UPINTX | ||
| 42 | #undef UPNUM | ||
| 43 | #undef UPRST | ||
| 44 | #undef UPCONX | ||
| 45 | #undef UPCFG0X | ||
| 46 | #undef UPCFG1X | ||
| 47 | #undef UPSTAX | ||
| 48 | #undef UPCFG2X | ||
| 49 | #undef UPIENX | ||
| 50 | #undef UPDATX | ||
| 51 | #undef TCCR2A | ||
| 52 | #undef WGM20 | ||
| 53 | #undef WGM21 | ||
| 54 | #undef COM2B0 | ||
| 55 | #undef COM2B1 | ||
| 56 | #undef COM2A0 | ||
| 57 | #undef COM2A1 | ||
| 58 | #undef TCCR2B | ||
| 59 | #undef CS20 | ||
| 60 | #undef CS21 | ||
| 61 | #undef CS22 | ||
| 62 | #undef WGM22 | ||
| 63 | #undef FOC2B | ||
| 64 | #undef FOC2A | ||
| 65 | #undef TCNT2 | ||
| 66 | #undef TCNT2_0 | ||
| 67 | #undef TCNT2_1 | ||
| 68 | #undef TCNT2_2 | ||
| 69 | #undef TCNT2_3 | ||
| 70 | #undef TCNT2_4 | ||
| 71 | #undef TCNT2_5 | ||
| 72 | #undef TCNT2_6 | ||
| 73 | #undef TCNT2_7 | ||
| 74 | #undef OCR2A | ||
| 75 | #undef OCR2_0 | ||
| 76 | #undef OCR2_1 | ||
| 77 | #undef OCR2_2 | ||
| 78 | #undef OCR2_3 | ||
| 79 | #undef OCR2_4 | ||
| 80 | #undef OCR2_5 | ||
| 81 | #undef OCR2_6 | ||
| 82 | #undef OCR2_7 | ||
| 83 | #undef OCR2B | ||
| 84 | #undef OCR2_0 | ||
| 85 | #undef OCR2_1 | ||
| 86 | #undef OCR2_2 | ||
| 87 | #undef OCR2_3 | ||
| 88 | #undef OCR2_4 | ||
| 89 | #undef OCR2_5 | ||
| 90 | #undef OCR2_6 | ||
| 91 | #undef OCR2_7 | ||
| 92 | |||
| 93 | #define NUM_DIGITAL_PINS 30 | ||
| 94 | #define NUM_ANALOG_INPUTS 12 | ||
| 95 | |||
| 96 | #define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) | ||
| 97 | #define TXLED0 PORTD |= (1<<5) | ||
| 98 | #define TXLED1 PORTD &= ~(1<<5) | ||
| 99 | #define RXLED0 PORTB |= (1<<0) | ||
| 100 | #define RXLED1 PORTB &= ~(1<<0) | ||
| 101 | |||
| 102 | static const uint8_t SDA = 2; | ||
| 103 | static const uint8_t SCL = 3; | ||
| 104 | #define LED_BUILTIN 13 | ||
| 105 | |||
| 106 | // Map SPI port to 'new' pins D14..D17 | ||
| 107 | static const uint8_t SS = 17; | ||
| 108 | static const uint8_t MOSI = 16; | ||
| 109 | static const uint8_t MISO = 14; | ||
| 110 | static const uint8_t SCK = 15; | ||
| 111 | |||
| 112 | // Mapping of analog pins as digital I/O | ||
| 113 | // A6-A11 share with digital pins | ||
| 114 | static const uint8_t ADC0 = 18; | ||
| 115 | static const uint8_t ADC1 = 19; | ||
| 116 | static const uint8_t ADC2 = 20; | ||
| 117 | static const uint8_t ADC3 = 21; | ||
| 118 | static const uint8_t ADC4 = 22; | ||
| 119 | static const uint8_t ADC5 = 23; | ||
| 120 | static const uint8_t ADC6 = 24; // D4 | ||
| 121 | static const uint8_t ADC7 = 25; // D6 | ||
| 122 | static const uint8_t ADC8 = 26; // D8 | ||
| 123 | static const uint8_t ADC9 = 27; // D9 | ||
| 124 | static const uint8_t ADC10 = 28; // D10 | ||
| 125 | static const uint8_t ADC11 = 29; // D12 | ||
| 126 | |||
| 127 | #define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) | ||
| 128 | #define digitalPinToPCICRbit(p) 0 | ||
| 129 | #define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) | ||
| 130 | #define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) | ||
| 131 | |||
| 132 | // __AVR_ATmega32U4__ has an unusual mapping of pins to channels | ||
| 133 | extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; | ||
| 134 | #define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) | ||
| 135 | |||
| 136 | #define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) | ||
| 137 | |||
| 138 | #ifdef ARDUINO_MAIN | ||
| 139 | |||
| 140 | // On the Arduino board, digital pins are also used | ||
| 141 | // for the analog output (software PWM). Analog input | ||
| 142 | // pins are a separate set. | ||
| 143 | |||
| 144 | // ATMEL ATMEGA32U4 / ARDUINO LEONARDO | ||
| 145 | // | ||
| 146 | // D0 PD2 RXD1/INT2 | ||
| 147 | // D1 PD3 TXD1/INT3 | ||
| 148 | // D2 PD1 SDA SDA/INT1 | ||
| 149 | // D3# PD0 PWM8/SCL OC0B/SCL/INT0 | ||
| 150 | // D4 A6 PD4 ADC8 | ||
| 151 | // D5# PC6 ??? OC3A/#OC4A | ||
| 152 | // D6# A7 PD7 FastPWM #OC4D/ADC10 | ||
| 153 | // D7 PE6 INT6/AIN0 | ||
| 154 | // | ||
| 155 | // D8 A8 PB4 ADC11/PCINT4 | ||
| 156 | // D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 | ||
| 157 | // D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 | ||
| 158 | // D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 | ||
| 159 | // D12 A11 PD6 T1/#OC4D/ADC9 | ||
| 160 | // D13# PC7 PWM10 CLK0/OC4A | ||
| 161 | // | ||
| 162 | // A0 D18 PF7 ADC7 | ||
| 163 | // A1 D19 PF6 ADC6 | ||
| 164 | // A2 D20 PF5 ADC5 | ||
| 165 | // A3 D21 PF4 ADC4 | ||
| 166 | // A4 D22 PF1 ADC1 | ||
| 167 | // A5 D23 PF0 ADC0 | ||
| 168 | // | ||
| 169 | // New pins D14..D17 to map SPI port to digital pins | ||
| 170 | // | ||
| 171 | // MISO D14 PB3 MISO,PCINT3 | ||
| 172 | // SCK D15 PB1 SCK,PCINT1 | ||
| 173 | // MOSI D16 PB2 MOSI,PCINT2 | ||
| 174 | // SS D17 PB0 RXLED,SS/PCINT0 | ||
| 175 | // | ||
| 176 | // Connected LEDs on board for TX and RX | ||
| 177 | // TXLED D24 PD5 XCK1 | ||
| 178 | // RXLED D17 PB0 | ||
| 179 | // HWB PE2 HWB | ||
| 180 | |||
| 181 | // these arrays map port names (e.g. port B) to the | ||
| 182 | // appropriate addresses for various functions (e.g. reading | ||
| 183 | // and writing) | ||
| 184 | const uint16_t PROGMEM port_to_mode_PGM[] = { | ||
| 185 | NOT_A_PORT, | ||
| 186 | NOT_A_PORT, | ||
| 187 | (uint16_t) &DDRB, | ||
| 188 | (uint16_t) &DDRC, | ||
| 189 | (uint16_t) &DDRD, | ||
| 190 | (uint16_t) &DDRE, | ||
| 191 | (uint16_t) &DDRF, | ||
| 192 | }; | ||
| 193 | |||
| 194 | const uint16_t PROGMEM port_to_output_PGM[] = { | ||
| 195 | NOT_A_PORT, | ||
| 196 | NOT_A_PORT, | ||
| 197 | (uint16_t) &PORTB, | ||
| 198 | (uint16_t) &PORTC, | ||
| 199 | (uint16_t) &PORTD, | ||
| 200 | (uint16_t) &PORTE, | ||
| 201 | (uint16_t) &PORTF, | ||
| 202 | }; | ||
| 203 | |||
| 204 | const uint16_t PROGMEM port_to_input_PGM[] = { | ||
| 205 | NOT_A_PORT, | ||
| 206 | NOT_A_PORT, | ||
| 207 | (uint16_t) &PINB, | ||
| 208 | (uint16_t) &PINC, | ||
| 209 | (uint16_t) &PIND, | ||
| 210 | (uint16_t) &PINE, | ||
| 211 | (uint16_t) &PINF, | ||
| 212 | }; | ||
| 213 | |||
| 214 | const uint8_t PROGMEM digital_pin_to_port_PGM[] = { | ||
| 215 | PD, // D0 - PD2 | ||
| 216 | PD, // D1 - PD3 | ||
| 217 | PD, // D2 - PD1 | ||
| 218 | PD, // D3 - PD0 | ||
| 219 | PD, // D4 - PD4 | ||
| 220 | PC, // D5 - PC6 | ||
| 221 | PD, // D6 - PD7 | ||
| 222 | PE, // D7 - PE6 | ||
| 223 | |||
| 224 | PB, // D8 - PB4 | ||
| 225 | PB, // D9 - PB5 | ||
| 226 | PB, // D10 - PB6 | ||
| 227 | PB, // D11 - PB7 | ||
| 228 | PD, // D12 - PD6 | ||
| 229 | PC, // D13 - PC7 | ||
| 230 | |||
| 231 | PB, // D14 - MISO - PB3 | ||
| 232 | PB, // D15 - SCK - PB1 | ||
| 233 | PB, // D16 - MOSI - PB2 | ||
| 234 | PB, // D17 - SS - PB0 | ||
| 235 | |||
| 236 | PF, // D18 - A0 - PF7 | ||
| 237 | PF, // D19 - A1 - PF6 | ||
| 238 | PF, // D20 - A2 - PF5 | ||
| 239 | PF, // D21 - A3 - PF4 | ||
| 240 | PF, // D22 - A4 - PF1 | ||
| 241 | PF, // D23 - A5 - PF0 | ||
| 242 | |||
| 243 | PD, // D24 - PD5 | ||
| 244 | PD, // D25 / D6 - A7 - PD7 | ||
| 245 | PB, // D26 / D8 - A8 - PB4 | ||
| 246 | PB, // D27 / D9 - A9 - PB5 | ||
| 247 | PB, // D28 / D10 - A10 - PB6 | ||
| 248 | PD, // D29 / D12 - A11 - PD6 | ||
| 249 | }; | ||
| 250 | |||
| 251 | const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { | ||
| 252 | _BV(2), // D0 - PD2 | ||
| 253 | _BV(3), // D1 - PD3 | ||
| 254 | _BV(1), // D2 - PD1 | ||
| 255 | _BV(0), // D3 - PD0 | ||
| 256 | _BV(4), // D4 - PD4 | ||
| 257 | _BV(6), // D5 - PC6 | ||
| 258 | _BV(7), // D6 - PD7 | ||
| 259 | _BV(6), // D7 - PE6 | ||
| 260 | |||
| 261 | _BV(4), // D8 - PB4 | ||
| 262 | _BV(5), // D9 - PB5 | ||
| 263 | _BV(6), // D10 - PB6 | ||
| 264 | _BV(7), // D11 - PB7 | ||
| 265 | _BV(6), // D12 - PD6 | ||
| 266 | _BV(7), // D13 - PC7 | ||
| 267 | |||
| 268 | _BV(3), // D14 - MISO - PB3 | ||
| 269 | _BV(1), // D15 - SCK - PB1 | ||
| 270 | _BV(2), // D16 - MOSI - PB2 | ||
| 271 | _BV(0), // D17 - SS - PB0 | ||
| 272 | |||
| 273 | _BV(7), // D18 - A0 - PF7 | ||
| 274 | _BV(6), // D19 - A1 - PF6 | ||
| 275 | _BV(5), // D20 - A2 - PF5 | ||
| 276 | _BV(4), // D21 - A3 - PF4 | ||
| 277 | _BV(1), // D22 - A4 - PF1 | ||
| 278 | _BV(0), // D23 - A5 - PF0 | ||
| 279 | |||
| 280 | _BV(5), // D24 - PD5 | ||
| 281 | _BV(7), // D25 / D6 - A7 - PD7 | ||
| 282 | _BV(4), // D26 / D8 - A8 - PB4 | ||
| 283 | _BV(5), // D27 / D9 - A9 - PB5 | ||
| 284 | _BV(6), // D28 / D10 - A10 - PB6 | ||
| 285 | _BV(6), // D29 / D12 - A11 - PD6 | ||
| 286 | }; | ||
| 287 | |||
| 288 | const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { | ||
| 289 | NOT_ON_TIMER, | ||
| 290 | NOT_ON_TIMER, | ||
| 291 | NOT_ON_TIMER, | ||
| 292 | TIMER0B, /* 3 */ | ||
| 293 | NOT_ON_TIMER, | ||
| 294 | TIMER3A, /* 5 */ | ||
| 295 | TIMER4D, /* 6 */ | ||
| 296 | NOT_ON_TIMER, | ||
| 297 | |||
| 298 | NOT_ON_TIMER, | ||
| 299 | TIMER1A, /* 9 */ | ||
| 300 | TIMER1B, /* 10 */ | ||
| 301 | TIMER0A, /* 11 */ | ||
| 302 | |||
| 303 | NOT_ON_TIMER, | ||
| 304 | TIMER4A, /* 13 */ | ||
| 305 | |||
| 306 | NOT_ON_TIMER, | ||
| 307 | NOT_ON_TIMER, | ||
| 308 | NOT_ON_TIMER, | ||
| 309 | NOT_ON_TIMER, | ||
| 310 | NOT_ON_TIMER, | ||
| 311 | NOT_ON_TIMER, | ||
| 312 | |||
| 313 | NOT_ON_TIMER, | ||
| 314 | NOT_ON_TIMER, | ||
| 315 | NOT_ON_TIMER, | ||
| 316 | NOT_ON_TIMER, | ||
| 317 | NOT_ON_TIMER, | ||
| 318 | NOT_ON_TIMER, | ||
| 319 | NOT_ON_TIMER, | ||
| 320 | NOT_ON_TIMER, | ||
| 321 | NOT_ON_TIMER, | ||
| 322 | NOT_ON_TIMER, | ||
| 323 | }; | ||
| 324 | |||
| 325 | const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { | ||
| 326 | 7, // A0 PF7 ADC7 | ||
| 327 | 6, // A1 PF6 ADC6 | ||
| 328 | 5, // A2 PF5 ADC5 | ||
| 329 | 4, // A3 PF4 ADC4 | ||
| 330 | 1, // A4 PF1 ADC1 | ||
| 331 | 0, // A5 PF0 ADC0 | ||
| 332 | 8, // A6 D4 PD4 ADC8 | ||
| 333 | 10, // A7 D6 PD7 ADC10 | ||
| 334 | 11, // A8 D8 PB4 ADC11 | ||
| 335 | 12, // A9 D9 PB5 ADC12 | ||
| 336 | 13, // A10 D10 PB6 ADC13 | ||
| 337 | 9 // A11 D12 PD6 ADC9 | ||
| 338 | }; | ||
| 339 | |||
| 340 | #endif /* ARDUINO_MAIN */ | ||
| 341 | |||
| 342 | // These serial port names are intended to allow libraries and architecture-neutral | ||
| 343 | // sketches to automatically default to the correct port name for a particular type | ||
| 344 | // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, | ||
| 345 | // the first hardware serial port whose RX/TX pins are not dedicated to another use. | ||
| 346 | // | ||
| 347 | // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor | ||
| 348 | // | ||
| 349 | // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial | ||
| 350 | // | ||
| 351 | // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library | ||
| 352 | // | ||
| 353 | // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. | ||
| 354 | // | ||
| 355 | // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX | ||
| 356 | // pins are NOT connected to anything by default. | ||
| 357 | #define SERIAL_PORT_MONITOR Serial | ||
| 358 | #define SERIAL_PORT_USBVIRTUAL Serial | ||
| 359 | #define SERIAL_PORT_HARDWARE Serial1 | ||
| 360 | #define SERIAL_PORT_HARDWARE_OPEN Serial1 | ||
| 361 | |||
| 362 | #endif /* Pins_Arduino_h */ | ||
diff --git a/keyboards/atreus62/readme.md b/keyboards/atreus62/readme.md new file mode 100644 index 000000000..0245b4f9f --- /dev/null +++ b/keyboards/atreus62/readme.md | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | atreus62 keyboard firmware | ||
| 2 | ====================== | ||
| 3 | |||
| 4 | This firmware is for the atreus62 keyboard. | ||
| 5 | |||
| 6 | This version utilizes a Pro Micro for its controller and has a 62 key layout. | ||
| 7 | |||
| 8 | https://github.com/profet23/atreus62 | ||
| 9 | |||
| 10 | TODO: More information \ No newline at end of file | ||
diff --git a/keyboards/atreus62/rules.mk b/keyboards/atreus62/rules.mk new file mode 100644 index 000000000..f5d0be23a --- /dev/null +++ b/keyboards/atreus62/rules.mk | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | |||
| 2 | # MCU name | ||
| 3 | #MCU = at90usb1287 | ||
| 4 | MCU = atmega32u4 | ||
| 5 | |||
| 6 | # Processor frequency. | ||
| 7 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 8 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 9 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 10 | # automatically to create a 32-bit value in your source code. | ||
| 11 | # | ||
| 12 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 13 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 14 | # does not *change* the processor frequency - it should merely be updated to | ||
| 15 | # reflect the processor speed set externally so that the code can use accurate | ||
| 16 | # software delays. | ||
| 17 | F_CPU = 16000000 | ||
| 18 | |||
| 19 | # | ||
| 20 | # LUFA specific | ||
| 21 | # | ||
| 22 | # Target architecture (see library "Board Types" documentation). | ||
| 23 | ARCH = 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. | ||
| 36 | F_USB = $(F_CPU) | ||
| 37 | |||
| 38 | # Interrupt driven control endpoint task(+60) | ||
| 39 | OPT_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 | ||
| 48 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 49 | |||
| 50 | # Build Options | ||
| 51 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 52 | # the appropriate keymap folder that will get included automatically | ||
| 53 | # | ||
| 54 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 55 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 56 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 57 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 58 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 59 | NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 60 | #BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality | ||
| 61 | #MIDI_ENABLE ?= no # MIDI controls | ||
| 62 | UNICODE_ENABLE ?= yes # Unicode | ||
| 63 | #BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 64 | |||
| 65 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 66 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboards/ergodox/infinity/infinity.c b/keyboards/ergodox/infinity/infinity.c index c5793385f..02db67eaf 100644 --- a/keyboards/ergodox/infinity/infinity.c +++ b/keyboards/ergodox/infinity/infinity.c | |||
| @@ -38,7 +38,6 @@ void init_serial_link_hal(void) { | |||
| 38 | // Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced | 38 | // Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced |
| 39 | // Which will reduce the brightness range | 39 | // Which will reduce the brightness range |
| 40 | #define PRESCALAR_DEFINE 0 | 40 | #define PRESCALAR_DEFINE 0 |
| 41 | #ifdef VISUALIZER_ENABLE | ||
| 42 | void lcd_backlight_hal_init(void) { | 41 | void lcd_backlight_hal_init(void) { |
| 43 | // Setup Backlight | 42 | // Setup Backlight |
| 44 | SIM->SCGC6 |= SIM_SCGC6_FTM0; | 43 | SIM->SCGC6 |= SIM_SCGC6_FTM0; |
| @@ -76,7 +75,6 @@ void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { | |||
| 76 | CHANNEL_GREEN.CnV = g; | 75 | CHANNEL_GREEN.CnV = g; |
| 77 | CHANNEL_BLUE.CnV = b; | 76 | CHANNEL_BLUE.CnV = b; |
| 78 | } | 77 | } |
| 79 | #endif | ||
| 80 | 78 | ||
| 81 | __attribute__ ((weak)) | 79 | __attribute__ ((weak)) |
| 82 | void matrix_init_user(void) { | 80 | void matrix_init_user(void) { |
| @@ -92,6 +90,10 @@ void matrix_init_kb(void) { | |||
| 92 | // runs once when the firmware starts up | 90 | // runs once when the firmware starts up |
| 93 | 91 | ||
| 94 | matrix_init_user(); | 92 | matrix_init_user(); |
| 93 | // The backlight always has to be initialized, otherwise it will stay lit | ||
| 94 | #ifndef VISUALIZER_ENABLE | ||
| 95 | lcd_backlight_hal_init(); | ||
| 96 | #endif | ||
| 95 | } | 97 | } |
| 96 | 98 | ||
| 97 | void matrix_scan_kb(void) { | 99 | void matrix_scan_kb(void) { |
diff --git a/keyboards/ergodox/infinity/led.c b/keyboards/ergodox/infinity/led.c index 77195bb35..8175c1c5c 100644 --- a/keyboards/ergodox/infinity/led.c +++ b/keyboards/ergodox/infinity/led.c | |||
| @@ -21,29 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | void led_set(uint8_t usb_led) { | 23 | void led_set(uint8_t usb_led) { |
| 24 | // The LCD backlight functionality conflicts with this simple | 24 | //TODO: Add led emulation if there's no customized visualization |
| 25 | // red backlight | ||
| 26 | #if !defined(LCD_BACKLIGHT_ENABLE) && defined(STATUS_LED_ENABLE) | ||
| 27 | // PTC1: LCD Backlight Red(0:on/1:off) | ||
| 28 | GPIOC->PDDR |= (1<<1); | ||
| 29 | PORTC->PCR[1] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1); | ||
| 30 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 31 | GPIOC->PCOR |= (1<<1); | ||
| 32 | } else { | ||
| 33 | GPIOC->PSOR |= (1<<1); | ||
| 34 | } | ||
| 35 | #elif !defined(LCD_BACKLIGHT_ENABLE) | ||
| 36 | (void)usb_led; | 25 | (void)usb_led; |
| 37 | GPIOC->PDDR |= (1<<1); | ||
| 38 | PORTC->PCR[1] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1); | ||
| 39 | GPIOC->PSOR |= (1<<1); | ||
| 40 | GPIOC->PDDR |= (1<<2); | ||
| 41 | PORTC->PCR[2] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1); | ||
| 42 | GPIOC->PSOR |= (1<<2); | ||
| 43 | GPIOC->PDDR |= (1<<3); | ||
| 44 | PORTC->PCR[3] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1); | ||
| 45 | GPIOC->PSOR |= (1<<3); | ||
| 46 | #else | ||
| 47 | (void)usb_led; | ||
| 48 | #endif | ||
| 49 | } | 26 | } |
diff --git a/keyboards/ergodox/keymaps/dvorak_emacs/keymap.c b/keyboards/ergodox/keymaps/dvorak_emacs/keymap.c new file mode 100755 index 000000000..d33c6e527 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_emacs/keymap.c | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | #include "ergodox.h" | ||
| 2 | #include "debug.h" | ||
| 3 | #include "action_layer.h" | ||
| 4 | |||
| 5 | /****************************************************************************************** | ||
| 6 | * DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/) | ||
| 7 | * Layer 1: auxiliary keys | ||
| 8 | * Layer 2: full qwerty layout | ||
| 9 | *****************************************************************************************/ | ||
| 10 | |||
| 11 | // LAYERS | ||
| 12 | #define BASE 0 // dvorak layout (default) | ||
| 13 | #define AUX 1 // auxiliary keys | ||
| 14 | |||
| 15 | // MACROS | ||
| 16 | /* #define OBRACE 0 // key { or shift */ | ||
| 17 | /* #define CBRACE 1 // key } or shift */ | ||
| 18 | /* #define OBRACK 2 // key [ or left alt */ | ||
| 19 | /* #define CBRACK 3 // key ] or left alt */ | ||
| 20 | /* #define CAPS 4 // caps lock */ | ||
| 21 | |||
| 22 | // LEDS | ||
| 23 | #define USB_LED_NUM_LOCK 0 | ||
| 24 | #define USB_LED_CAPS_LOCK 1 | ||
| 25 | #define USB_LED_SCROLL_LOCK 2 | ||
| 26 | #define USB_LED_COMPOSE 3 | ||
| 27 | #define USB_LED_KANA 4 | ||
| 28 | |||
| 29 | // TIMERS | ||
| 30 | #define KEY_TAP_FAST 85 | ||
| 31 | #define KEY_TAP_SLOW 95 | ||
| 32 | |||
| 33 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 34 | /* Keymap 0: Base layer | ||
| 35 | * Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively | ||
| 36 | * | ||
| 37 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 38 | * | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + | | ||
| 39 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 40 | * | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? | | ||
| 41 | * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| | ||
| 42 | * | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ | | ||
| 43 | * |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------| | ||
| 44 | * | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft | | ||
| 45 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 46 | * | | | | | ~L1 | | ~L1 | | | \ / || | | ||
| 47 | * `----------------------------------' `----------------------------------' | ||
| 48 | * ,-------------. ,-------------. | ||
| 49 | * | HOME | END | | LEFT | RIGHT| | ||
| 50 | * ,------|------|------| |------+--------+------. | ||
| 51 | * | BSPC | DEL | PGUP | | UP | SPACE |RETURN| | ||
| 52 | * | / | / |------| |------| / | / | | ||
| 53 | * | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL | | ||
| 54 | * `--------------------' `----------------------' | ||
| 55 | * | ||
| 56 | */ | ||
| 57 | [BASE] = KEYMAP( | ||
| 58 | // left hand | ||
| 59 | KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, | ||
| 60 | KC_TILD, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_LBRACKET, | ||
| 61 | KC_TAB, KC_A, KC_O, KC_E, SFT_T(KC_U), LT(AUX, KC_I), | ||
| 62 | SFT_T(KC_LBRC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, | ||
| 63 | KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX), | ||
| 64 | KC_HOME, KC_END, | ||
| 65 | KC_PGUP, | ||
| 66 | CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN, | ||
| 67 | // right hand | ||
| 68 | KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, | ||
| 69 | KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, | ||
| 70 | LT(AUX, KC_D), SFT_T(KC_H), KC_T, KC_N, KC_S, KC_MINUS, | ||
| 71 | KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_RBRC), | ||
| 72 | MO(AUX), KC_NO, KC_NO, KC_BSLASH, KC_NO, | ||
| 73 | KC_LEFT, KC_RIGHT, | ||
| 74 | KC_UP, | ||
| 75 | KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC) | ||
| 76 | ), | ||
| 77 | /* Keymap 1: Aux layer | ||
| 78 | * | ||
| 79 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 80 | * | VolUp | | | | | | SLEEP | PWR | | | | | | | | ||
| 81 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 82 | * | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | | | ||
| 83 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 84 | * | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | | | ||
| 85 | * |--------+------+------+------+------+------| | |PSCR |------+------+------+------+------+--------| | ||
| 86 | * | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS | | ||
| 87 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 88 | * |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | | | ||
| 89 | * `----------------------------------' `----------------------------------' | ||
| 90 | * ,-------------. ,-------------. | ||
| 91 | * | TRANS| TRANS| | TRANS| TRANS| | ||
| 92 | * ,------|------|------| |------+------+------. | ||
| 93 | * | | | TRANS| | TRANS| | | | ||
| 94 | * |TRANS |TRANS |------| |------| TRANS| TRANS| | ||
| 95 | * | | | TRANS| | TRANS| | | | ||
| 96 | * `--------------------' `--------------------' | ||
| 97 | */ | ||
| 98 | [AUX] = KEYMAP( | ||
| 99 | // left hand | ||
| 100 | KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, | ||
| 101 | KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, | ||
| 102 | KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, | ||
| 103 | KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, | ||
| 104 | LCTL(KC_S), LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), KC_TRNS, | ||
| 105 | KC_TRNS , KC_TRNS, | ||
| 106 | KC_TRNS, | ||
| 107 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 108 | // right hand | ||
| 109 | KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
| 110 | KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO, | ||
| 111 | KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO, | ||
| 112 | KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS, | ||
| 113 | KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO, | ||
| 114 | KC_TRNS , KC_TRNS, | ||
| 115 | KC_TRNS, | ||
| 116 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 117 | ), | ||
| 118 | }; | ||
| 119 | |||
| 120 | const uint16_t PROGMEM fn_actions[] = { | ||
| 121 | [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) | ||
| 122 | }; | ||
| 123 | |||
| 124 | |||
| 125 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 126 | { | ||
| 127 | // MACRODOWN only works in this function | ||
| 128 | switch(id) { | ||
| 129 | case 0: | ||
| 130 | if (record->event.pressed) { | ||
| 131 | register_code(KC_RSFT); | ||
| 132 | } else { | ||
| 133 | unregister_code(KC_RSFT); | ||
| 134 | } | ||
| 135 | break; | ||
| 136 | } | ||
| 137 | return MACRO_NONE; | ||
| 138 | }; | ||
| 139 | |||
| 140 | // Runs just one time when the keyboard initializes. | ||
| 141 | void matrix_init_user(void) { | ||
| 142 | |||
| 143 | }; | ||
| 144 | |||
| 145 | // Runs constantly in the background, in a loop. | ||
| 146 | void matrix_scan_user(void) { | ||
| 147 | |||
| 148 | uint8_t layer = biton32(layer_state); | ||
| 149 | |||
| 150 | ergodox_board_led_off(); | ||
| 151 | ergodox_right_led_1_off(); | ||
| 152 | ergodox_right_led_2_off(); | ||
| 153 | ergodox_right_led_3_off(); | ||
| 154 | switch (layer) { | ||
| 155 | case 1: | ||
| 156 | ergodox_right_led_1_on(); | ||
| 157 | break; | ||
| 158 | case 2: | ||
| 159 | ergodox_right_led_2_on(); | ||
| 160 | break; | ||
| 161 | default: | ||
| 162 | // none | ||
| 163 | break; | ||
| 164 | } | ||
| 165 | } | ||
diff --git a/keyboards/ergodox/keymaps/dvorak_emacs/readme.md b/keyboards/ergodox/keymaps/dvorak_emacs/readme.md new file mode 100644 index 000000000..a3fc34afe --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_emacs/readme.md | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | # Ergodox Dvorak Layout with emacs binding in mind | ||
| 2 | * Control & Alt key on the thumbs (activated if pressed with another key). | ||
| 3 | * In the same way, "U" and "R" are the shift modifier if pressed with another key. | ||
| 4 | * "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key. | ||
| 5 | * Software layout set to english. | ||
| 6 | |||
| 7 | ## Keymap Layers | ||
| 8 | - L0: dvorak with some customizations (see layout below) | ||
| 9 | - L1: auxiliary keys (includes function keys, numpad...) | ||
| 10 | |||
| 11 | |||
| 12 | ### Keymap 0: Base layer | ||
| 13 | Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively | ||
| 14 | |||
| 15 | <pre><code> | ||
| 16 | |||
| 17 | ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 18 | | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = | | ||
| 19 | |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 20 | | ~ | ' | , | . | P | Y | [ | | ] | F | G | C | H | L | / | | ||
| 21 | |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| | ||
| 22 | | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - | | ||
| 23 | |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------| | ||
| 24 | | {/LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | }/RSft | | ||
| 25 | `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 26 | | | | | | ~L1 | | ~L1 | | | \ | | | ||
| 27 | `----------------------------------' `----------------------------------' | ||
| 28 | ,-------------. ,-------------. | ||
| 29 | | HOME | END | | LEFT | RIGHT| | ||
| 30 | ,------|------|------| |------+--------+------. | ||
| 31 | | BSPC | DEL | PGUP | | UP | SPACE |RETURN| | ||
| 32 | | / | / |------| |------| / | / | | ||
| 33 | | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL | | ||
| 34 | `--------------------' `----------------------' | ||
| 35 | |||
| 36 | </pre></code> | ||
| 37 | |||
| 38 | ### Keymap 1: Aux layer | ||
| 39 | |||
| 40 | <pre><code> | ||
| 41 | |||
| 42 | ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 43 | | VolUp | | | | | | SLEEP | PWR | | | | | | | | ||
| 44 | |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 45 | | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | | | ||
| 46 | |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 47 | | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | | | ||
| 48 | |--------+------+------+------+------+------| | |PSCR |------+------+------+------+------+--------| | ||
| 49 | | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS | | ||
| 50 | `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 51 | |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | | | ||
| 52 | `----------------------------------' `----------------------------------' | ||
| 53 | ,-------------. ,-------------. | ||
| 54 | | TRANS| TRANS| | TRANS| TRANS| | ||
| 55 | ,------|------|------| |------+------+------. | ||
| 56 | | | | TRANS| | TRANS| | | | ||
| 57 | |TRANS |TRANS |------| |------| TRANS| TRANS| | ||
| 58 | | | | TRANS| | TRANS| | | | ||
| 59 | `--------------------' `--------------------' | ||
| 60 | |||
| 61 | </pre></code> | ||
| 62 | |||
| 63 | |||
| 64 | |||
| 65 | ## Generation of .hex file | ||
| 66 | > In the "qmk_firmware/keyboards/ergodox" directory. | ||
| 67 | |||
| 68 | > Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware". | ||
| 69 | |||
| 70 | > Flash with `teensy_loader` binary | ||
diff --git a/keyboards/ergodox/keymaps/galson/Makefile b/keyboards/ergodox/keymaps/galson/Makefile new file mode 100644 index 000000000..f008f5079 --- /dev/null +++ b/keyboards/ergodox/keymaps/galson/Makefile | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 2 | |||
diff --git a/keyboards/ergodox/keymaps/galson/keymap.c b/keyboards/ergodox/keymaps/galson/keymap.c new file mode 100644 index 000000000..0d3e7560d --- /dev/null +++ b/keyboards/ergodox/keymaps/galson/keymap.c | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | #include "ergodox.h" | ||
| 2 | #include "debug.h" | ||
| 3 | #include "action_layer.h" | ||
| 4 | #include "version.h" | ||
| 5 | |||
| 6 | #define BASE 0 // default layer | ||
| 7 | #define SYMB 1 // symbols | ||
| 8 | #define MDIA 2 // media keys | ||
| 9 | |||
| 10 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 11 | /* Keymap 0: Basic layer | ||
| 12 | * | ||
| 13 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 14 | * | + | 1 | 2 | 3 | 4 | 5 | rclk | | lclk | 6 | 7 | 8 | 9 | 0 | - | | ||
| 15 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 16 | * | = | Q | W | E | R |cmd/T |shift | |shift |cmd/Y | U | I | O | P | \ | | ||
| 17 | * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| | ||
| 18 | * | " | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' | | ||
| 19 | * |--------+------+------+------+------+------| ctrl | | ctrl |------+------+------+------+------+--------| | ||
| 20 | * | { | Z | X | C | V | B | [ | | ] | N | M | , | . | / | } | | ||
| 21 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 22 | * | _ | ` | $ | Left | Right| | Up | Down | : | * | ! | | ||
| 23 | * `----------------------------------' `----------------------------------' | ||
| 24 | * ,-------------. ,-------------. | ||
| 25 | * | < | | | | & | > | | ||
| 26 | * ,------|------|------| |------+--------+------. | ||
| 27 | * | | | # | | @ | | | | ||
| 28 | * | Space|Backsp|------| |------| Tab |Enter | | ||
| 29 | * | |ace | % | | ESC | | | | ||
| 30 | * `--------------------' `----------------------' | ||
| 31 | */ | ||
| 32 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | ||
| 33 | // Otherwise, it needs KC_* | ||
| 34 | [BASE] = KEYMAP( // layer 0 : default | ||
| 35 | // left hand | ||
| 36 | KC_PLUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BTN2, | ||
| 37 | KC_EQL, KC_Q, KC_W, KC_E, KC_R, GUI_T(KC_T), KC_LSPO, | ||
| 38 | KC_DQUO, KC_A, KC_S, KC_D, KC_F, KC_G, | ||
| 39 | KC_LCBR, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_LBRC), | ||
| 40 | KC_UNDS, KC_GRV, KC_DLR, KC_LEFT,KC_RGHT, | ||
| 41 | KC_LABK, KC_PIPE, | ||
| 42 | KC_HASH, | ||
| 43 | KC_SPC, KC_BSPC,KC_PERC, | ||
| 44 | // right hand | ||
| 45 | KC_BTN1, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | ||
| 46 | KC_RSPC, GUI_T(KC_Y), KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
| 47 | KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, | ||
| 48 | CTL_T(KC_RBRC), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RCBR, | ||
| 49 | KC_UP, KC_DOWN,KC_COLN,KC_ASTR, KC_EXLM, | ||
| 50 | KC_AMPR, KC_RABK, | ||
| 51 | KC_AT, | ||
| 52 | KC_ESC, KC_TAB, KC_ENT | ||
| 53 | ), | ||
| 54 | /* Keymap 1: Symbol Layer | ||
| 55 | * | ||
| 56 | * ,--------------------------------------------------. | ||
| 57 | * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | | ||
| 58 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 59 | * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | | ||
| 60 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 61 | * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | | ||
| 62 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 63 | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | | ||
| 64 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 65 | * | | | | | | | | . | 0 | = | | | ||
| 66 | * `----------------------------------' `----------------------------------' | ||
| 67 | * ,-------------. ,-------------. | ||
| 68 | * | | | | | | | ||
| 69 | * ,------|------|------| |------+------+------. | ||
| 70 | * | | | | | | | | | ||
| 71 | * | | |------| |------| | | | ||
| 72 | * | | | | | | | | | ||
| 73 | * `--------------------' `--------------------' | ||
| 74 | */ | ||
| 75 | // SYMBOLS | ||
| 76 | [SYMB] = KEYMAP( | ||
| 77 | // left hand | ||
| 78 | M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, | ||
| 79 | KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, | ||
| 80 | KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, | ||
| 81 | KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, | ||
| 82 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | ||
| 83 | KC_TRNS,KC_TRNS, | ||
| 84 | KC_TRNS, | ||
| 85 | KC_TRNS,KC_TRNS,KC_TRNS, | ||
| 86 | // right hand | ||
| 87 | KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
| 88 | KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, | ||
| 89 | KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, | ||
| 90 | KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, | ||
| 91 | KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, | ||
| 92 | KC_TRNS, KC_TRNS, | ||
| 93 | KC_TRNS, | ||
| 94 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 95 | ), | ||
| 96 | /* Keymap 2: Media and mouse keys | ||
| 97 | * | ||
| 98 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 99 | * | | | | | | | | | | | | | | | | | ||
| 100 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 101 | * | | | | MsUp | | | | | | | | | | | | | ||
| 102 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 103 | * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | | ||
| 104 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 105 | * | | | | | | | | | | | | Prev | Next | | | | ||
| 106 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 107 | * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | | ||
| 108 | * `----------------------------------' `----------------------------------' | ||
| 109 | * ,-------------. ,-------------. | ||
| 110 | * | | | | | | | ||
| 111 | * ,------|------|------| |------+------+------. | ||
| 112 | * | | | | | | |Brwser| | ||
| 113 | * | | |------| |------| |Back | | ||
| 114 | * | | | | | | | | | ||
| 115 | * `--------------------' `--------------------' | ||
| 116 | */ | ||
| 117 | // MEDIA AND MOUSE | ||
| 118 | [MDIA] = KEYMAP( | ||
| 119 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 120 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 121 | KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, | ||
| 122 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 123 | KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, | ||
| 124 | KC_TRNS, KC_TRNS, | ||
| 125 | KC_TRNS, | ||
| 126 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 127 | // right hand | ||
| 128 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 129 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 130 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, | ||
| 131 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, | ||
| 132 | KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, | ||
| 133 | KC_TRNS, KC_TRNS, | ||
| 134 | KC_TRNS, | ||
| 135 | KC_TRNS, KC_TRNS, KC_WBAK | ||
| 136 | ), | ||
| 137 | }; | ||
| 138 | |||
| 139 | const uint16_t PROGMEM fn_actions[] = { | ||
| 140 | [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) | ||
| 141 | }; | ||
| 142 | |||
| 143 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 144 | { | ||
| 145 | // MACRODOWN only works in this function | ||
| 146 | switch(id) { | ||
| 147 | case 0: | ||
| 148 | if (record->event.pressed) { | ||
| 149 | SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 150 | } | ||
| 151 | break; | ||
| 152 | } | ||
| 153 | return MACRO_NONE; | ||
| 154 | }; | ||
| 155 | |||
| 156 | // Runs just one time when the keyboard initializes. | ||
| 157 | void matrix_init_user(void) { | ||
| 158 | |||
| 159 | }; | ||
| 160 | |||
| 161 | // Runs constantly in the background, in a loop. | ||
| 162 | void matrix_scan_user(void) { | ||
| 163 | |||
| 164 | uint8_t layer = biton32(layer_state); | ||
| 165 | |||
| 166 | ergodox_board_led_off(); | ||
| 167 | ergodox_right_led_1_off(); | ||
| 168 | ergodox_right_led_2_off(); | ||
| 169 | ergodox_right_led_3_off(); | ||
| 170 | switch (layer) { | ||
| 171 | // TODO: Make this relevant to the ErgoDox EZ. | ||
| 172 | case 1: | ||
| 173 | ergodox_right_led_1_on(); | ||
| 174 | break; | ||
| 175 | case 2: | ||
| 176 | ergodox_right_led_2_on(); | ||
| 177 | break; | ||
| 178 | default: | ||
| 179 | // none | ||
| 180 | break; | ||
| 181 | } | ||
| 182 | |||
| 183 | }; | ||
diff --git a/keyboards/ergodox/keymaps/galson/readme.md b/keyboards/ergodox/keymaps/galson/readme.md new file mode 100644 index 000000000..ebc916725 --- /dev/null +++ b/keyboards/ergodox/keymaps/galson/readme.md | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # Galson keymap | ||
| 2 | |||
| 3 | |||
| 4 | Sep 26, 2016. | ||
| 5 | |||
| 6 | This is an ergonomic layout for programming for those with typing-related injuries. Key features: | ||
| 7 | |||
| 8 | - As many symbol keys as possible are accessible without shifting. These should be accessed by moving the entire hand and pressing with a strong finger. | ||
| 9 | - Arrow keys and left and right mouse clicks for mouse-free navigation when combined with head mouse or eyetracker. | ||
| 10 | - Modifier keys are dual role and relocated to positions convenient for the index finger. | ||
| 11 | - Positions are more convenient when the keyboard is vertically mounted (as it should be!) \ No newline at end of file | ||
diff --git a/keyboards/hhkb/keymaps/sh_jp/Makefile b/keyboards/hhkb/keymaps/sh_jp/Makefile new file mode 100644 index 000000000..a7f700f01 --- /dev/null +++ b/keyboards/hhkb/keymaps/sh_jp/Makefile | |||
| @@ -0,0 +1 @@ | |||
| OPT_DEFS += -DHHKB_JP | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/README.md b/keyboards/hhkb/keymaps/sh_jp/README.md new file mode 100644 index 000000000..4f82f2f4e --- /dev/null +++ b/keyboards/hhkb/keymaps/sh_jp/README.md | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | ###Keymaps with both Dvorak layout and QWER layout for HHKB JP. | ||
| 2 | |||
| 3 | 1. The default layout is Dvorak. | ||
| 4 | 2. Use `Tog` to toggle between Dvorak and QWER | ||
| 5 | 3. Holding `NewCmd`, the original `LftCmd`, will activate the `NewCmd` layer which means `NewCmd+key` is the same as `Cmd+key` in normal QWER layout.<sup>[1](#cmdTab)</sup> | ||
| 6 | - For example, no matter you are in Dvorak layout or QWER layout, you can use `Cmd+s` to save a currently editing file. | ||
| 7 | 4. `Symb` makes type symbols easier | ||
| 8 | - for example: `Symb+a` is `!`. | ||
| 9 | 5. `Spc+key` equals to `Shft+key` while using `Spc` alone will yield a space as usual. | ||
| 10 | 6. There's an extra `Tab` in the last line. | ||
| 11 | |||
| 12 | ``` | ||
| 13 | Layer DVOR: | ||
| 14 | ,-----------------------------------------------------------. | ||
| 15 | |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| |Bsp| | ||
| 16 | |-----------------------------------------------------------| | ||
| 17 | |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| | | ||
| 18 | |------------------------------------------------------` Ent| | ||
| 19 | |Ctrl | A| O| E| U| I| D| H| T| N| S| -| \| | | ||
| 20 | |-----------------------------------------------------------| | ||
| 21 | |Shft | ;| Q| J| K| X| B| M| W| V| Z| | Up| | | ||
| 22 | |-----------------------------------------------------------| | ||
| 23 | |FN| `| Alt|NewCmd|Symb| Spc |Symb|Tab|RCmd|Tog|Lft|Dwn|Rgh| | ||
| 24 | `-----------------------------------------------------------' | ||
| 25 | ``` | ||
| 26 | |||
| 27 | ``` | ||
| 28 | Layer QWER: | ||
| 29 | ,-----------------------------------------------------------. | ||
| 30 | |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =| |Bsp| | ||
| 31 | |-----------------------------------------------------------| | ||
| 32 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | ||
| 33 | |------------------------------------------------------` Ent| | ||
| 34 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| \| | | ||
| 35 | |-----------------------------------------------------------| | ||
| 36 | |Shft | Z| X| C| V| B| N| M| ,| .| /| | Up| | | ||
| 37 | |-----------------------------------------------------------| | ||
| 38 | |FN| `| Alt|NewCmd|Symb| Spc |Symb|Tab|Cmd|Tog|Lft|Dwn|Rgh| | ||
| 39 | `-----------------------------------------------------------' | ||
| 40 | ``` | ||
| 41 | |||
| 42 | ``` | ||
| 43 | Layer Symb: | ||
| 44 | ,-----------------------------------------------------------. | ||
| 45 | | | | | | | | | | | | | | | | | | ||
| 46 | |-----------------------------------------------------------| | ||
| 47 | | | | | [| ]| | | {| }| | | | | | | ||
| 48 | |------------------------------------------------------` | | ||
| 49 | | | !| @| #| $| %| ^| &| *| (| )| '| \| | | ||
| 50 | |-----------------------------------------------------------| | ||
| 51 | | | | | | | | | | | | | | | | | ||
| 52 | |-----------------------------------------------------------| | ||
| 53 | | | | | | | | | | | | | | | | ||
| 54 | `-----------------------------------------------------------' | ||
| 55 | ``` | ||
| 56 | |||
| 57 | ``` | ||
| 58 | Layer FUNC: HHKB mode (HHKB Fn) | ||
| 59 | ,-----------------------------------------------------------. | ||
| 60 | |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| | ||
| 61 | |-----------------------------------------------------------| | ||
| 62 | |Caps | | | | | | | |Psc|Slk|Pus|Up | | | | ||
| 63 | |------------------------------------------------------` | | ||
| 64 | | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | | ||
| 65 | |-----------------------------------------------------------| | ||
| 66 | | | | | | | | +| -|End|PgD|Dow| | | | | ||
| 67 | |-----------------------------------------------------------| | ||
| 68 | | || | | | | | | | | || | | | | ||
| 69 | `-----------------------------------------------------------' | ||
| 70 | ``` | ||
| 71 | |||
| 72 | ``` | ||
| 73 | Empty Layer: | ||
| 74 | ,-----------------------------------------------------------. | ||
| 75 | | | | | | | | | | | | | | | | | | ||
| 76 | |-----------------------------------------------------------| | ||
| 77 | | | | | | | | | | | | | | | | | ||
| 78 | |------------------------------------------------------` | | ||
| 79 | | | | | | | | | | | | | | | | | ||
| 80 | |-----------------------------------------------------------| | ||
| 81 | | | | | | | | | | | | | | | | | ||
| 82 | |-----------------------------------------------------------| | ||
| 83 | | | | | | | | | | | | | | | | ||
| 84 | `-----------------------------------------------------------' | ||
| 85 | ``` | ||
| 86 | <a name="cmdTab">1</a>: `NewCmd + Tab` does not work, you can use `RCmd+Tab` to switch among applications. | ||
diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/keymaps/sh_jp/keymap.c new file mode 100644 index 000000000..d4cb3b041 --- /dev/null +++ b/keyboards/hhkb/keymaps/sh_jp/keymap.c | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | #include "hhkb.h" | ||
| 2 | |||
| 3 | #define _______ KC_TRNS | ||
| 4 | |||
| 5 | enum { | ||
| 6 | DVOR, | ||
| 7 | QWER, | ||
| 8 | NEW_CMD, | ||
| 9 | SYMB, | ||
| 10 | FUNC | ||
| 11 | }; | ||
| 12 | |||
| 13 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 14 | [DVOR] = KEYMAP_JP( | ||
| 15 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_JYEN, KC_BSPC, | ||
| 16 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, | ||
| 17 | KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, | ||
| 18 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RO, KC_UP, KC_RSFT, | ||
| 19 | MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, TG(QWER), KC_LEFT, KC_DOWN, KC_RGHT | ||
| 20 | ), | ||
| 21 | [QWER] = KEYMAP_JP( | ||
| 22 | KC_ESC, 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_JYEN, KC_BSPC, | ||
| 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, | ||
| 24 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, | ||
| 25 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, | ||
| 26 | MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, _______, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 27 | ), | ||
| 28 | |||
| 29 | [NEW_CMD] = KEYMAP_JP( | ||
| 30 | _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), _______, _______, _______, LGUI(KC_BSPC), | ||
| 31 | _______, LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), | ||
| 32 | _______, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), _______, _______, _______, _______, | ||
| 33 | LGUI(KC_LSFT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), _______, _______, _______, | ||
| 34 | _______, _______, _______, _______, _______, LGUI(KC_SPC), _______, _______, _______, _______, LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT) | ||
| 35 | ), | ||
| 36 | |||
| 37 | [SYMB] = KEYMAP_JP( | ||
| 38 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 39 | _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, LSFT(KC_LBRC), LSFT(KC_RBRC), _______, _______,_______, _______, | ||
| 40 | _______, LSFT(KC_1),LSFT(KC_2),LSFT(KC_3),LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), _______, _______, _______, | ||
| 41 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 42 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 43 | ), | ||
| 44 | |||
| 45 | [FUNC] = KEYMAP_JP( | ||
| 46 | KC_PWR, 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_INS, KC_DEL, | ||
| 47 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, | ||
| 48 | _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, | ||
| 49 | _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, | ||
| 50 | _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______ | ||
| 51 | ) | ||
| 52 | }; | ||
| 53 | |||
| 54 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) { | ||
| 55 | return MACRO_NONE; | ||
| 56 | } | ||
| 57 | |||
| 58 | const uint16_t PROGMEM fn_actions[] = { | ||
| 59 | |||
| 60 | }; | ||
diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index fbe64a5b0..fc5ab7761 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h | |||
| @@ -43,9 +43,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 43 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | 43 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) |
| 44 | * | 44 | * |
| 45 | */ | 45 | */ |
| 46 | #define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } | 46 | //Pro micro pinout |
| 47 | #define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } | 47 | #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } |
| 48 | #define UNUSED_PINS | 48 | #define MATRIX_COL_PINS { F4, C6, D7, F5, B4, B5 } |
| 49 | #define UNUSED_PINS | ||
| 50 | //Teensy 2 pinout | ||
| 51 | //#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } | ||
| 52 | //#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } | ||
| 53 | //#define UNUSED_PINS | ||
| 54 | |||
| 49 | 55 | ||
| 50 | /* COL2ROW or ROW2COL */ | 56 | /* COL2ROW or ROW2COL */ |
| 51 | #define DIODE_DIRECTION COL2ROW | 57 | #define DIODE_DIRECTION COL2ROW |
diff --git a/keyboards/maxipad/readme.md b/keyboards/maxipad/readme.md index ab7b122fe..de2265d11 100644 --- a/keyboards/maxipad/readme.md +++ b/keyboards/maxipad/readme.md | |||
| @@ -5,6 +5,8 @@ For the full Quantum feature list, see [the parent readme](/). | |||
| 5 | 5 | ||
| 6 | ## Building | 6 | ## Building |
| 7 | 7 | ||
| 8 | Change the config.h pinout to match your mcu!! | ||
| 9 | |||
| 8 | Download or clone the whole firmware and navigate to the keyboards/maxipad 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. | 10 | Download or clone the whole firmware and navigate to the keyboards/maxipad 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. |
| 9 | 11 | ||
| 10 | Depending on which keymap you would like to use, you will have to compile slightly differently. | 12 | Depending on which keymap you would like to use, you will have to compile slightly differently. |
diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk index 55898147d..56b2042ef 100644 --- a/keyboards/maxipad/rules.mk +++ b/keyboards/maxipad/rules.mk | |||
| @@ -64,4 +64,4 @@ BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by | |||
| 64 | MIDI_ENABLE ?= no # MIDI controls | 64 | MIDI_ENABLE ?= no # MIDI controls |
| 65 | UNICODE_ENABLE ?= no # Unicode | 65 | UNICODE_ENABLE ?= no # Unicode |
| 66 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | 66 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 67 | AUDIO_ENABLE ?= no # Audio output on port C6 | 67 | AUDIO_ENABLE ?= no # Audio output on port C6 \ No newline at end of file |
diff --git a/quantum/quantum.c b/quantum/quantum.c index 8b2fefef6..f9f1ef22d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | #include "quantum.h" | 1 | #include "quantum.h" |
| 2 | 2 | ||
| 3 | #ifndef TAPPING_TERM | ||
| 4 | #define TAPPING_TERM 200 | ||
| 5 | #endif | ||
| 6 | |||
| 3 | static void do_code16 (uint16_t code, void (*f) (uint8_t)) { | 7 | static void do_code16 (uint16_t code, void (*f) (uint8_t)) { |
| 4 | switch (code) { | 8 | switch (code) { |
| 5 | case QK_MODS ... QK_MODS_MAX: | 9 | case QK_MODS ... QK_MODS_MAX: |
| @@ -75,6 +79,7 @@ void reset_keyboard(void) { | |||
| 75 | #endif | 79 | #endif |
| 76 | 80 | ||
| 77 | static bool shift_interrupted[2] = {0, 0}; | 81 | static bool shift_interrupted[2] = {0, 0}; |
| 82 | static uint16_t scs_timer = 0; | ||
| 78 | 83 | ||
| 79 | bool process_record_quantum(keyrecord_t *record) { | 84 | bool process_record_quantum(keyrecord_t *record) { |
| 80 | 85 | ||
| @@ -286,6 +291,7 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 286 | case KC_LSPO: { | 291 | case KC_LSPO: { |
| 287 | if (record->event.pressed) { | 292 | if (record->event.pressed) { |
| 288 | shift_interrupted[0] = false; | 293 | shift_interrupted[0] = false; |
| 294 | scs_timer = timer_read (); | ||
| 289 | register_mods(MOD_BIT(KC_LSFT)); | 295 | register_mods(MOD_BIT(KC_LSFT)); |
| 290 | } | 296 | } |
| 291 | else { | 297 | else { |
| @@ -295,7 +301,7 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 295 | shift_interrupted[1] = true; | 301 | shift_interrupted[1] = true; |
| 296 | } | 302 | } |
| 297 | #endif | 303 | #endif |
| 298 | if (!shift_interrupted[0]) { | 304 | if (!shift_interrupted[0] && timer_elapsed(scs_timer) < TAPPING_TERM) { |
| 299 | register_code(LSPO_KEY); | 305 | register_code(LSPO_KEY); |
| 300 | unregister_code(LSPO_KEY); | 306 | unregister_code(LSPO_KEY); |
| 301 | } | 307 | } |
| @@ -308,6 +314,7 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 308 | case KC_RSPC: { | 314 | case KC_RSPC: { |
| 309 | if (record->event.pressed) { | 315 | if (record->event.pressed) { |
| 310 | shift_interrupted[1] = false; | 316 | shift_interrupted[1] = false; |
| 317 | scs_timer = timer_read (); | ||
| 311 | register_mods(MOD_BIT(KC_RSFT)); | 318 | register_mods(MOD_BIT(KC_RSFT)); |
| 312 | } | 319 | } |
| 313 | else { | 320 | else { |
| @@ -317,7 +324,7 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 317 | shift_interrupted[1] = true; | 324 | shift_interrupted[1] = true; |
| 318 | } | 325 | } |
| 319 | #endif | 326 | #endif |
| 320 | if (!shift_interrupted[1]) { | 327 | if (!shift_interrupted[1] && timer_elapsed(scs_timer) < TAPPING_TERM) { |
| 321 | register_code(RSPC_KEY); | 328 | register_code(RSPC_KEY); |
| 322 | unregister_code(RSPC_KEY); | 329 | unregister_code(RSPC_KEY); |
| 323 | } | 330 | } |
