diff options
| -rw-r--r-- | keyboards/handwired/promethium/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/config.h | 162 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/Makefile | 28 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/config.h | 17 | ||||
| -rwxr-xr-x | keyboards/handwired/promethium/keymaps/priyadi/flash.sh | 3 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 725 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/readme.md | 0 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/keymaps/readme.md | 22 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/promethium.c | 6 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/promethium.h | 101 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/readme.md | 13 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/rgbsps.c | 24 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/rgbsps.h | 4 | ||||
| -rw-r--r-- | keyboards/handwired/promethium/rules.mk | 74 |
14 files changed, 1182 insertions, 0 deletions
diff --git a/keyboards/handwired/promethium/Makefile b/keyboards/handwired/promethium/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/promethium/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h new file mode 100644 index 000000000..473af67d3 --- /dev/null +++ b/keyboards/handwired/promethium/config.h | |||
| @@ -0,0 +1,162 @@ | |||
| 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 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x6660 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER Priyadi | ||
| 28 | #define PRODUCT Promethium Keyboard | ||
| 29 | #define DESCRIPTION Promethium Keyboard | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 8 | ||
| 33 | #define MATRIX_COLS 6 | ||
| 34 | |||
| 35 | /* default pin-out */ | ||
| 36 | #define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 } | ||
| 37 | #define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } | ||
| 38 | #define UNUSED_PINS | ||
| 39 | |||
| 40 | /* COL2ROW or ROW2COL */ | ||
| 41 | #define DIODE_DIRECTION COL2ROW | ||
| 42 | |||
| 43 | /* define if matrix has ghost */ | ||
| 44 | //#define MATRIX_HAS_GHOST | ||
| 45 | |||
| 46 | /* number of backlight levels */ | ||
| 47 | #define BACKLIGHT_LEVELS 3 | ||
| 48 | |||
| 49 | /* Set 0 if debouncing isn't needed */ | ||
| 50 | #define DEBOUNCING_DELAY 5 | ||
| 51 | |||
| 52 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 53 | #define LOCKING_SUPPORT_ENABLE | ||
| 54 | /* Locking resynchronize hack */ | ||
| 55 | #define LOCKING_RESYNC_ENABLE | ||
| 56 | |||
| 57 | /* key combination for command */ | ||
| 58 | #define IS_COMMAND() ( \ | ||
| 59 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ | ||
| 60 | ) | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Feature disable options | ||
| 64 | * These options are also useful to firmware size reduction. | ||
| 65 | */ | ||
| 66 | |||
| 67 | /* disable debug print */ | ||
| 68 | //#define NO_DEBUG | ||
| 69 | |||
| 70 | /* disable print */ | ||
| 71 | //#define NO_PRINT | ||
| 72 | |||
| 73 | /* disable action features */ | ||
| 74 | //#define NO_ACTION_LAYER | ||
| 75 | //#define NO_ACTION_TAPPING | ||
| 76 | //#define NO_ACTION_ONESHOT | ||
| 77 | //#define NO_ACTION_MACRO | ||
| 78 | //#define NO_ACTION_FUNCTION | ||
| 79 | |||
| 80 | /* PS/2 mouse */ | ||
| 81 | #ifdef PS2_USE_BUSYWAIT | ||
| 82 | # define PS2_CLOCK_PORT PORTD | ||
| 83 | # define PS2_CLOCK_PIN PIND | ||
| 84 | # define PS2_CLOCK_DDR DDRD | ||
| 85 | # define PS2_CLOCK_BIT 1 | ||
| 86 | # define PS2_DATA_PORT PORTD | ||
| 87 | # define PS2_DATA_PIN PIND | ||
| 88 | # define PS2_DATA_DDR DDRD | ||
| 89 | # define PS2_DATA_BIT 2 | ||
| 90 | #endif | ||
| 91 | |||
| 92 | /* PS/2 mouse interrupt version */ | ||
| 93 | #ifdef PS2_USE_INT | ||
| 94 | /* uses INT1 for clock line(ATMega32U4) */ | ||
| 95 | #define PS2_CLOCK_PORT PORTD | ||
| 96 | #define PS2_CLOCK_PIN PIND | ||
| 97 | #define PS2_CLOCK_DDR DDRD | ||
| 98 | #define PS2_CLOCK_BIT 3 | ||
| 99 | #define PS2_DATA_PORT PORTD | ||
| 100 | #define PS2_DATA_PIN PIND | ||
| 101 | #define PS2_DATA_DDR DDRD | ||
| 102 | #define PS2_DATA_BIT 2 | ||
| 103 | |||
| 104 | #define PS2_INT_INIT() do { \ | ||
| 105 | EICRA |= ((1<<ISC31) | \ | ||
| 106 | (0<<ISC30)); \ | ||
| 107 | } while (0) | ||
| 108 | #define PS2_INT_ON() do { \ | ||
| 109 | EIMSK |= (1<<INT3); \ | ||
| 110 | } while (0) | ||
| 111 | #define PS2_INT_OFF() do { \ | ||
| 112 | EIMSK &= ~(1<<INT3); \ | ||
| 113 | } while (0) | ||
| 114 | #define PS2_INT_VECT INT3_vect | ||
| 115 | #endif | ||
| 116 | |||
| 117 | /* PS/2 mouse USART version */ | ||
| 118 | #ifdef PS2_USE_USART | ||
| 119 | /* XCK for clock line and RXD for data line */ | ||
| 120 | #define PS2_CLOCK_PORT PORTD | ||
| 121 | #define PS2_CLOCK_PIN PIND | ||
| 122 | #define PS2_CLOCK_DDR DDRD | ||
| 123 | #define PS2_CLOCK_BIT 5 | ||
| 124 | #define PS2_DATA_PORT PORTD | ||
| 125 | #define PS2_DATA_PIN PIND | ||
| 126 | #define PS2_DATA_DDR DDRD | ||
| 127 | #define PS2_DATA_BIT 2 | ||
| 128 | |||
| 129 | /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ | ||
| 130 | /* set DDR of CLOCK as input to be slave */ | ||
| 131 | #define PS2_USART_INIT() do { \ | ||
| 132 | PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \ | ||
| 133 | PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \ | ||
| 134 | UCSR1C = ((1 << UMSEL10) | \ | ||
| 135 | (3 << UPM10) | \ | ||
| 136 | (0 << USBS1) | \ | ||
| 137 | (3 << UCSZ10) | \ | ||
| 138 | (0 << UCPOL1)); \ | ||
| 139 | UCSR1A = 0; \ | ||
| 140 | UBRR1H = 0; \ | ||
| 141 | UBRR1L = 0; \ | ||
| 142 | } while (0) | ||
| 143 | #define PS2_USART_RX_INT_ON() do { \ | ||
| 144 | UCSR1B = ((1 << RXCIE1) | \ | ||
| 145 | (1 << RXEN1)); \ | ||
| 146 | } while (0) | ||
| 147 | #define PS2_USART_RX_POLL_ON() do { \ | ||
| 148 | UCSR1B = (1 << RXEN1); \ | ||
| 149 | } while (0) | ||
| 150 | #define PS2_USART_OFF() do { \ | ||
| 151 | UCSR1C = 0; \ | ||
| 152 | UCSR1B &= ~((1 << RXEN1) | \ | ||
| 153 | (1 << TXEN1)); \ | ||
| 154 | } while (0) | ||
| 155 | #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1)) | ||
| 156 | #define PS2_USART_RX_DATA UDR1 | ||
| 157 | #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1))) | ||
| 158 | #define PS2_USART_RX_VECT USART1_RX_vect | ||
| 159 | #endif | ||
| 160 | |||
| 161 | |||
| 162 | #endif | ||
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile new file mode 100644 index 000000000..2f6f27a73 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | |||
| 2 | |||
| 3 | # Build Options | ||
| 4 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 5 | # the appropriate keymap folder that will get included automatically | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 10 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 11 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 13 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 14 | MIDI_ENABLE = no # MIDI controls | ||
| 15 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 16 | UNICODE_ENABLE = no # Unicode | ||
| 17 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 18 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 19 | PS2_MOUSE_ENABLE = yes | ||
| 20 | PS2_USE_INT = yes | ||
| 21 | |||
| 22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 24 | |||
| 25 | ifndef QUANTUM_DIR | ||
| 26 | include ../../../../../Makefile | ||
| 27 | endif | ||
| 28 | |||
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h new file mode 100644 index 000000000..8b78c0dc4 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | /* bootmagic salt key */ | ||
| 7 | #define BOOTMAGIC_KEY_SALT KC_ESC | ||
| 8 | |||
| 9 | /* skip bootmagic and eeconfig */ | ||
| 10 | #define BOOTMAGIC_KEY_SKIP KC_SPACE | ||
| 11 | |||
| 12 | #define PREVENT_STUCK_MODIFIERS | ||
| 13 | |||
| 14 | #define RGB_DI_PIN B5 | ||
| 15 | #define RGBSPS_NUM 57 | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh new file mode 100755 index 000000000..fb81a54ee --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex | ||
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c new file mode 100644 index 000000000..b2da2f97b --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c | |||
| @@ -0,0 +1,725 @@ | |||
| 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | ||
| 2 | // this is the style you want to emulate. | ||
| 3 | |||
| 4 | #include "promethium.h" | ||
| 5 | #include "action_layer.h" | ||
| 6 | #ifdef AUDIO_ENABLE | ||
| 7 | #include "audio.h" | ||
| 8 | #include "musical_notes.h" | ||
| 9 | #endif | ||
| 10 | #include "eeconfig.h" | ||
| 11 | #include "process_unicode.h" | ||
| 12 | #include "quantum.h" | ||
| 13 | #include "rgbsps.h" | ||
| 14 | #define COUNT(x) (sizeof (x) / sizeof (*(x))) | ||
| 15 | |||
| 16 | // #define RGBLED_NUM 5 | ||
| 17 | // struct cRGB led[RGBLED_NUM]; | ||
| 18 | |||
| 19 | |||
| 20 | extern keymap_config_t keymap_config; | ||
| 21 | |||
| 22 | enum layers { | ||
| 23 | _QWERTY, | ||
| 24 | _COLEMAK, | ||
| 25 | _WORKMAN, | ||
| 26 | _PUNC, | ||
| 27 | _NUM, | ||
| 28 | _FUNC, | ||
| 29 | _EMOJI, | ||
| 30 | _GUI, | ||
| 31 | }; | ||
| 32 | |||
| 33 | enum planck_keycodes { | ||
| 34 | // layouts | ||
| 35 | QWERTY = SAFE_RANGE, | ||
| 36 | COLEMAK, | ||
| 37 | WORKMAN, | ||
| 38 | |||
| 39 | // layer switchers | ||
| 40 | PUNC, | ||
| 41 | NUM, | ||
| 42 | FUNC, | ||
| 43 | EMOJI, | ||
| 44 | GUI, | ||
| 45 | |||
| 46 | // os switchers | ||
| 47 | LINUX, | ||
| 48 | WIN, | ||
| 49 | OSX, | ||
| 50 | }; | ||
| 51 | |||
| 52 | // Fillers to make layering clearer | ||
| 53 | |||
| 54 | #define _______ KC_TRNS | ||
| 55 | #define XXXXXXX KC_NO | ||
| 56 | |||
| 57 | // unicode map | ||
| 58 | |||
| 59 | enum unicode_name { | ||
| 60 | GRIN, // grinning face 😊 | ||
| 61 | TJOY, // tears of joy 😂 | ||
| 62 | SMILE, // grining face with smiling eyes 😁 | ||
| 63 | HEART, // heart ❤ | ||
| 64 | EYERT, // smiling face with heart shaped eyes 😍 | ||
| 65 | CRY, // crying face 😭 | ||
| 66 | SMEYE, // smiling face with smiling eyes 😊 | ||
| 67 | UNAMU, // unamused 😒 | ||
| 68 | KISS, // kiss 😘 | ||
| 69 | HART2, // two hearts 💕 | ||
| 70 | WEARY, // weary 😩 | ||
| 71 | OKHND, // ok hand sign 👌 | ||
| 72 | PENSV, // pensive 😔 | ||
| 73 | SMIRK, // smirk 😏 | ||
| 74 | RECYC, // recycle ♻ | ||
| 75 | WINK, // wink 😉 | ||
| 76 | THMUP, // thumb up 👍 | ||
| 77 | THMDN, // thumb down 👎 | ||
| 78 | PRAY, // pray 🙏 | ||
| 79 | PHEW, // relieved 😌 | ||
| 80 | MUSIC, // musical notes | ||
| 81 | FLUSH, // flushed 😳 | ||
| 82 | CELEB, // celebration 🙌 | ||
| 83 | CRY2, // crying face 😢 | ||
| 84 | COOL, // smile with sunglasses 😎 | ||
| 85 | NOEVS, // see no evil | ||
| 86 | NOEVH, // hear no evil | ||
| 87 | NOEVK, // speak no evil | ||
| 88 | POO, // pile of poo | ||
| 89 | EYES, // eyes | ||
| 90 | VIC, // victory hand | ||
| 91 | BHART, // broken heart | ||
| 92 | SLEEP, // sleeping face | ||
| 93 | SMIL2, // smiling face with open mouth & sweat | ||
| 94 | HUNRD, // 100 | ||
| 95 | CONFU, // confused | ||
| 96 | TONGU, // face with tongue & winking eye | ||
| 97 | DISAP, // disappointed | ||
| 98 | YUMMY, // face savoring delicious food | ||
| 99 | CLAP, // hand clapping | ||
| 100 | FEAR, // face screaming in fear | ||
| 101 | HORNS, // smiling face with horns | ||
| 102 | HALO, // smiling face with halo | ||
| 103 | BYE, // waving hand | ||
| 104 | SUN, // sun | ||
| 105 | MOON, // moon | ||
| 106 | SKULL, // skull | ||
| 107 | }; | ||
| 108 | |||
| 109 | const uint32_t PROGMEM unicode_map[] = { | ||
| 110 | [GRIN] = 0x1F600, | ||
| 111 | [TJOY] = 0x1F602, | ||
| 112 | [SMILE] = 0x1F601, | ||
| 113 | [HEART] = 0x2764, | ||
| 114 | [EYERT] = 0x1f60d, | ||
| 115 | [CRY] = 0x1f62d, | ||
| 116 | [SMEYE] = 0x1F60A, | ||
| 117 | [UNAMU] = 0x1F612, | ||
| 118 | [KISS] = 0x1F618, | ||
| 119 | [HART2] = 0x1F495, | ||
| 120 | [WEARY] = 0x1F629, | ||
| 121 | [OKHND] = 0x1F44C, | ||
| 122 | [PENSV] = 0x1F614, | ||
| 123 | [SMIRK] = 0x1F60F, | ||
| 124 | [RECYC] = 0x267B, | ||
| 125 | [WINK] = 0x1F609, | ||
| 126 | [THMUP] = 0x1F44D, | ||
| 127 | [THMDN] = 0x1F44E, | ||
| 128 | [PRAY] = 0x1F64F, | ||
| 129 | [PHEW] = 0x1F60C, | ||
| 130 | [MUSIC] = 0x1F3B6, | ||
| 131 | [FLUSH] = 0x1F633, | ||
| 132 | [CELEB] = 0x1F64C, | ||
| 133 | [CRY2] = 0x1F622, | ||
| 134 | [COOL] = 0x1F60E, | ||
| 135 | [NOEVS] = 0x1F648, | ||
| 136 | [NOEVH] = 0x1F649, | ||
| 137 | [NOEVK] = 0x1F64A, | ||
| 138 | [POO] = 0x1F4A9, | ||
| 139 | [EYES] = 0x1F440, | ||
| 140 | [VIC] = 0x270C, | ||
| 141 | [BHART] = 0x1F494, | ||
| 142 | [SLEEP] = 0x1F634, | ||
| 143 | [SMIL2] = 0x1F605, | ||
| 144 | [HUNRD] = 0x1F4AF, | ||
| 145 | [CONFU] = 0x1F615, | ||
| 146 | [TONGU] = 0x1F61C, | ||
| 147 | [DISAP] = 0x1F61E, | ||
| 148 | [YUMMY] = 0x1F60B, | ||
| 149 | [CLAP] = 0x1F44F, | ||
| 150 | [FEAR] = 0x1F631, | ||
| 151 | [HORNS] = 0x1F608, | ||
| 152 | [HALO] = 0x1F607, | ||
| 153 | [BYE] = 0x1F44B, | ||
| 154 | [SUN] = 0x2600, | ||
| 155 | [MOON] = 0x1F314, | ||
| 156 | [SKULL] = 0x1F480, | ||
| 157 | }; | ||
| 158 | |||
| 159 | |||
| 160 | // hybrid shift - = | ||
| 161 | // #undef KC_LSFT | ||
| 162 | // #define KC_LSFT MT(MOD_LSFT, KC_MINS) | ||
| 163 | // #undef KC_RSFT | ||
| 164 | // #define KC_RSFT MT(MOD_LSFT, KC_EQL) | ||
| 165 | |||
| 166 | |||
| 167 | // hybrid right-gui & scroll lock (mapped to Compose in OS) | ||
| 168 | #undef KC_RCTL | ||
| 169 | #define KC_RCTL MT(MOD_LCTL, KC_SLCK) | ||
| 170 | |||
| 171 | // RGBSPS | ||
| 172 | |||
| 173 | const uint8_t PROGMEM LED_ALNUM[] = { | ||
| 174 | LED_Z, | ||
| 175 | LED_A, | ||
| 176 | LED_Q, | ||
| 177 | LED_W, | ||
| 178 | LED_S, | ||
| 179 | LED_X, | ||
| 180 | LED_C, | ||
| 181 | LED_D, | ||
| 182 | LED_E, | ||
| 183 | LED_R, | ||
| 184 | LED_F, | ||
| 185 | LED_V, | ||
| 186 | LED_B, | ||
| 187 | LED_G, | ||
| 188 | LED_T, | ||
| 189 | LED_N, | ||
| 190 | LED_HH, | ||
| 191 | LED_Y, | ||
| 192 | LED_U, | ||
| 193 | LED_J, | ||
| 194 | LED_M, | ||
| 195 | LED_COMM, | ||
| 196 | LED_K, | ||
| 197 | LED_I, | ||
| 198 | LED_O, | ||
| 199 | LED_L, | ||
| 200 | LED_DOT, | ||
| 201 | LED_SLSH, | ||
| 202 | LED_SCLN, | ||
| 203 | LED_P, | ||
| 204 | LED_LSPC, | ||
| 205 | LED_RSPC | ||
| 206 | }; | ||
| 207 | |||
| 208 | const uint8_t PROGMEM LED_MODS[] = { | ||
| 209 | LED_TAB, | ||
| 210 | LED_ESC, | ||
| 211 | LED_LSFT, | ||
| 212 | LED_LCTL, | ||
| 213 | LED_LGUI, | ||
| 214 | LED_LALT, | ||
| 215 | LED_RALT, | ||
| 216 | LED_RGUI, | ||
| 217 | LED_BKSP, | ||
| 218 | LED_ENT, | ||
| 219 | LED_RSFT, | ||
| 220 | LED_RCTL | ||
| 221 | }; | ||
| 222 | |||
| 223 | const uint8_t PROGMEM LED_FN[] = { | ||
| 224 | LED_PUNC, | ||
| 225 | LED_NUM, | ||
| 226 | LED_FUNC, | ||
| 227 | LED_EMOJI | ||
| 228 | }; | ||
| 229 | |||
| 230 | const uint8_t PROGMEM LED_INDICATORS[] = { | ||
| 231 | LED_IND_EMOJI, | ||
| 232 | LED_IND_NUM, | ||
| 233 | LED_IND_FUNC, | ||
| 234 | LED_IND_BATTERY, | ||
| 235 | LED_IND_USB, | ||
| 236 | LED_IND_BLUETOOTH, | ||
| 237 | }; | ||
| 238 | |||
| 239 | const uint8_t PROGMEM LED_TRACKPOINT[] = { | ||
| 240 | LED_TRACKPOINT1, | ||
| 241 | LED_TRACKPOINT2, | ||
| 242 | LED_TRACKPOINT3, | ||
| 243 | }; | ||
| 244 | |||
| 245 | void led_reset(void) { | ||
| 246 | for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { | ||
| 247 | rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 6, 0); | ||
| 248 | } | ||
| 249 | |||
| 250 | for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { | ||
| 251 | rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 0, 0); | ||
| 252 | } | ||
| 253 | |||
| 254 | for(uint8_t i = 0; i < COUNT(LED_FN); i++) { | ||
| 255 | rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 15); | ||
| 256 | } | ||
| 257 | } | ||
| 258 | |||
| 259 | void led_layer_normal(void) { | ||
| 260 | rgbsps_set(LED_IND_FUNC, 0, 0, 0); | ||
| 261 | rgbsps_set(LED_IND_NUM, 0, 0, 0); | ||
| 262 | rgbsps_set(LED_IND_EMOJI, 0, 0, 0); | ||
| 263 | |||
| 264 | led_reset(); | ||
| 265 | |||
| 266 | rgbsps_send(); | ||
| 267 | } | ||
| 268 | |||
| 269 | void led_layer_func(void) { | ||
| 270 | rgbsps_set(LED_IND_FUNC, 0, 15, 0); | ||
| 271 | rgbsps_set(LED_IND_NUM, 0, 0, 0); | ||
| 272 | rgbsps_set(LED_IND_EMOJI, 0, 0, 0); | ||
| 273 | |||
| 274 | led_reset(); | ||
| 275 | |||
| 276 | for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { | ||
| 277 | rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); | ||
| 278 | } | ||
| 279 | |||
| 280 | rgbsps_set(LED_I, 15, 0, 15); | ||
| 281 | rgbsps_set(LED_J, 15, 0, 15); | ||
| 282 | rgbsps_set(LED_K, 15, 0, 15); | ||
| 283 | rgbsps_set(LED_L, 15, 0, 15); | ||
| 284 | |||
| 285 | rgbsps_set(LED_U, 15, 0, 10); | ||
| 286 | rgbsps_set(LED_O, 15, 0, 10); | ||
| 287 | rgbsps_set(LED_COMM, 15, 0, 10); | ||
| 288 | rgbsps_set(LED_DOT, 15, 0, 10); | ||
| 289 | rgbsps_set(LED_SCLN, 15, 0, 10); | ||
| 290 | rgbsps_set(LED_P, 15, 0, 10); | ||
| 291 | |||
| 292 | rgbsps_set(LED_Q, 10, 0, 15); | ||
| 293 | rgbsps_set(LED_W, 10, 0, 15); | ||
| 294 | rgbsps_set(LED_E, 10, 0, 15); | ||
| 295 | rgbsps_set(LED_R, 10, 0, 15); | ||
| 296 | rgbsps_set(LED_A, 10, 0, 15); | ||
| 297 | rgbsps_set(LED_S, 10, 0, 15); | ||
| 298 | rgbsps_set(LED_D, 10, 0, 15); | ||
| 299 | rgbsps_set(LED_F, 10, 0, 15); | ||
| 300 | rgbsps_set(LED_Z, 10, 0, 15); | ||
| 301 | rgbsps_set(LED_X, 10, 0, 15); | ||
| 302 | rgbsps_set(LED_C, 10, 0, 15); | ||
| 303 | rgbsps_set(LED_V, 10, 0, 15); | ||
| 304 | |||
| 305 | rgbsps_send(); | ||
| 306 | } | ||
| 307 | |||
| 308 | void led_layer_punc(void) { | ||
| 309 | rgbsps_set(LED_IND_FUNC, 0, 15, 0); | ||
| 310 | rgbsps_set(LED_IND_NUM, 0, 0, 15); | ||
| 311 | rgbsps_set(LED_IND_EMOJI, 0, 0, 0); | ||
| 312 | |||
| 313 | led_reset(); | ||
| 314 | |||
| 315 | rgbsps_send(); | ||
| 316 | } | ||
| 317 | |||
| 318 | void led_layer_num(void) { | ||
| 319 | rgbsps_set(LED_IND_FUNC, 0, 0, 0); | ||
| 320 | rgbsps_set(LED_IND_NUM, 0, 0, 15); | ||
| 321 | rgbsps_set(LED_IND_EMOJI, 0, 0, 0); | ||
| 322 | |||
| 323 | led_reset(); | ||
| 324 | |||
| 325 | for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { | ||
| 326 | rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); | ||
| 327 | } | ||
| 328 | |||
| 329 | rgbsps_set(LED_U, 0, 5, 15); | ||
| 330 | rgbsps_set(LED_I, 0, 5, 15); | ||
| 331 | rgbsps_set(LED_O, 0, 5, 15); | ||
| 332 | rgbsps_set(LED_J, 0, 5, 15); | ||
| 333 | rgbsps_set(LED_K, 0, 5, 15); | ||
| 334 | rgbsps_set(LED_L, 0, 5, 15); | ||
| 335 | rgbsps_set(LED_M, 0, 5, 15); | ||
| 336 | rgbsps_set(LED_COMM, 0, 5, 15); | ||
| 337 | rgbsps_set(LED_DOT, 0, 5, 15); | ||
| 338 | rgbsps_set(LED_FUNC, 0, 5, 15); | ||
| 339 | |||
| 340 | rgbsps_set(LED_EMOJI, 0, 10, 15); | ||
| 341 | rgbsps_set(LED_RALT, 0, 10, 15); | ||
| 342 | |||
| 343 | rgbsps_set(LED_Q, 0, 10, 15); | ||
| 344 | rgbsps_set(LED_W, 0, 10, 15); | ||
| 345 | rgbsps_set(LED_E, 0, 10, 15); | ||
| 346 | rgbsps_set(LED_R, 0, 10, 15); | ||
| 347 | rgbsps_set(LED_T, 0, 10, 15); | ||
| 348 | rgbsps_set(LED_Y, 0, 10, 15); | ||
| 349 | rgbsps_set(LED_P, 0, 10, 15); | ||
| 350 | |||
| 351 | rgbsps_set(LED_A, 0, 15, 15); | ||
| 352 | rgbsps_set(LED_S, 0, 15, 15); | ||
| 353 | rgbsps_set(LED_D, 0, 15, 15); | ||
| 354 | rgbsps_set(LED_F, 0, 15, 15); | ||
| 355 | rgbsps_set(LED_Z, 0, 15, 15); | ||
| 356 | rgbsps_set(LED_X, 0, 15, 15); | ||
| 357 | rgbsps_set(LED_C, 0, 15, 15); | ||
| 358 | rgbsps_set(LED_V, 0, 15, 15); | ||
| 359 | |||
| 360 | rgbsps_send(); | ||
| 361 | } | ||
| 362 | |||
| 363 | void led_layer_emoji(void) { | ||
| 364 | rgbsps_setall(15, 15, 0); | ||
| 365 | |||
| 366 | rgbsps_set(LED_IND_FUNC, 0, 0, 0); | ||
| 367 | rgbsps_set(LED_IND_NUM, 0, 0, 0); | ||
| 368 | rgbsps_set(LED_IND_EMOJI, 15, 15, 0); | ||
| 369 | |||
| 370 | rgbsps_set(LED_PUNC, 15, 15, 15); | ||
| 371 | rgbsps_set(LED_EMOJI, 15, 15, 15); | ||
| 372 | |||
| 373 | rgbsps_send(); | ||
| 374 | } | ||
| 375 | |||
| 376 | void led_layer_gui(void) { | ||
| 377 | rgbsps_set(LED_IND_FUNC, 15, 10, 15); | ||
| 378 | rgbsps_set(LED_IND_NUM, 15, 10, 15); | ||
| 379 | rgbsps_set(LED_IND_EMOJI, 15, 10, 15); | ||
| 380 | rgbsps_send(); | ||
| 381 | } | ||
| 382 | |||
| 383 | void led_init(void) { | ||
| 384 | // turn off all | ||
| 385 | rgbsps_turnoff(); | ||
| 386 | |||
| 387 | // set trackpoint color | ||
| 388 | rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); | ||
| 389 | rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); | ||
| 390 | rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); | ||
| 391 | |||
| 392 | // // hardcode indicator for now | ||
| 393 | rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); | ||
| 394 | rgbsps_set(LED_IND_USB, 15, 15, 15); | ||
| 395 | rgbsps_set(LED_IND_BATTERY, 0, 15, 0); | ||
| 396 | |||
| 397 | led_layer_normal(); | ||
| 398 | } | ||
| 399 | |||
| 400 | |||
| 401 | // keymaps | ||
| 402 | |||
| 403 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 404 | |||
| 405 | /* Qwerty | ||
| 406 | * ,-----------------------------------------------------------------------------------. | ||
| 407 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 408 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 409 | * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | | ||
| 410 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 411 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | | ||
| 412 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 413 | * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | | ||
| 414 | * `-----------------------------------------------------------------------------------' | ||
| 415 | */ | ||
| 416 | [_QWERTY] = KEYMAP( | ||
| 417 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 418 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT , | ||
| 419 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 420 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL | ||
| 421 | ), | ||
| 422 | |||
| 423 | /* Colemak | ||
| 424 | * ,-----------------------------------------------------------------------------------. | ||
| 425 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
| 426 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 427 | * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | | ||
| 428 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 429 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | | ||
| 430 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 431 | * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | | ||
| 432 | * `-----------------------------------------------------------------------------------' | ||
| 433 | */ | ||
| 434 | [_COLEMAK] = KEYMAP( | ||
| 435 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | ||
| 436 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT , | ||
| 437 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 438 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL | ||
| 439 | ), | ||
| 440 | |||
| 441 | /* Workman | ||
| 442 | * ,-----------------------------------------------------------------------------------. | ||
| 443 | * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | | ||
| 444 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 445 | * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | | ||
| 446 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 447 | * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | | ||
| 448 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 449 | * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | | ||
| 450 | * `-----------------------------------------------------------------------------------' | ||
| 451 | */ | ||
| 452 | [_WORKMAN] = KEYMAP( | ||
| 453 | KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, | ||
| 454 | KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT , | ||
| 455 | KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 456 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL | ||
| 457 | ), | ||
| 458 | |||
| 459 | /* Punc | ||
| 460 | * ,-----------------------------------------------------------------------------------. | ||
| 461 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | | ||
| 462 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 463 | * | | | \ | - | = | < | > | ( | ) | ' | | | | ||
| 464 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 465 | * | | | | | _ | + | { | } | [ | ] | " | | | | ||
| 466 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 467 | * | | | | | | | | | | | | | ||
| 468 | * `-----------------------------------------------------------------------------------' | ||
| 469 | */ | ||
| 470 | [_PUNC] = KEYMAP( | ||
| 471 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , | ||
| 472 | XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX, | ||
| 473 | XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX, | ||
| 474 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 475 | ), | ||
| 476 | |||
| 477 | /* Num | ||
| 478 | * ,-----------------------------------------------------------------------------------. | ||
| 479 | * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 480 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 481 | * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | | ||
| 482 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 483 | * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | | ||
| 484 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 485 | * | | | | x | | | 0 | , | . | + | - | | ||
| 486 | * `-----------------------------------------------------------------------------------' | ||
| 487 | */ | ||
| 488 | [_NUM] = KEYMAP( | ||
| 489 | KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
| 490 | KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT, | ||
| 491 | KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR, | ||
| 492 | _______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS | ||
| 493 | ), | ||
| 494 | |||
| 495 | /* Func | ||
| 496 | * ,-----------------------------------------------------------------------------------. | ||
| 497 | * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | | ||
| 498 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 499 | * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | | ||
| 500 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 501 | * | | F9 | F10 | F11 | F12 | | | | Home | End | | | | ||
| 502 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 503 | * | | | | | | | | | | | | | ||
| 504 | * `-----------------------------------------------------------------------------------' | ||
| 505 | */ | ||
| 506 | [_FUNC] = KEYMAP( | ||
| 507 | XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, | ||
| 508 | XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, | ||
| 509 | _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, | ||
| 510 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 511 | ), | ||
| 512 | |||
| 513 | /* Emoji | ||
| 514 | * ,-----------------------------------------------------------------------------------. | ||
| 515 | * | | | | | | | | | | | | | | ||
| 516 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 517 | * | | | | | | | | | | | | | | ||
| 518 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 519 | * | | | | | | | | | | | | | | ||
| 520 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 521 | * | | | | | | | | | | | | | | ||
| 522 | * `-----------------------------------------------------------------------------------' | ||
| 523 | */ | ||
| 524 | [_EMOJI] = KEYMAP( | ||
| 525 | X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), | ||
| 526 | X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), | ||
| 527 | X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), | ||
| 528 | X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK) | ||
| 529 | ), | ||
| 530 | |||
| 531 | /* GUI | ||
| 532 | * ,-----------------------------------------------------------------------------------. | ||
| 533 | * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | | ||
| 534 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 535 | * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| | ||
| 536 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 537 | * | Win | | Prev | Play | Next | | | | | | |Colmak| | ||
| 538 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 539 | * | OSX | | | | | BL- | BL+ | | | | |Workmn| | ||
| 540 | * `-----------------------------------------------------------------------------------' | ||
| 541 | */ | ||
| 542 | [_GUI] = KEYMAP( | ||
| 543 | _______, 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), _______, | ||
| 544 | LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY, | ||
| 545 | WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, | ||
| 546 | OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN | ||
| 547 | ), | ||
| 548 | |||
| 549 | }; | ||
| 550 | |||
| 551 | #ifdef AUDIO_ENABLE | ||
| 552 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
| 553 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 554 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 555 | float tone_workman[][2] = SONG(DVORAK_SOUND); | ||
| 556 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 557 | float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); | ||
| 558 | float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); | ||
| 559 | float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); | ||
| 560 | float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); | ||
| 561 | #endif | ||
| 562 | |||
| 563 | void persistant_default_layer_set(uint16_t default_layer) { | ||
| 564 | eeconfig_update_default_layer(default_layer); | ||
| 565 | default_layer_set(default_layer); | ||
| 566 | } | ||
| 567 | |||
| 568 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 569 | #ifdef AUDIO_ENABLE | ||
| 570 | // faux clicky | ||
| 571 | if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); | ||
| 572 | #endif | ||
| 573 | |||
| 574 | switch (keycode) { | ||
| 575 | case QWERTY: | ||
| 576 | if (record->event.pressed) { | ||
| 577 | #ifdef AUDIO_ENABLE | ||
| 578 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | ||
| 579 | #endif | ||
| 580 | persistant_default_layer_set(1UL<<_QWERTY); | ||
| 581 | } | ||
| 582 | return false; | ||
| 583 | break; | ||
| 584 | case COLEMAK: | ||
| 585 | if (record->event.pressed) { | ||
| 586 | #ifdef AUDIO_ENABLE | ||
| 587 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | ||
| 588 | #endif | ||
| 589 | persistant_default_layer_set(1UL<<_COLEMAK); | ||
| 590 | } | ||
| 591 | return false; | ||
| 592 | break; | ||
| 593 | case WORKMAN: | ||
| 594 | if (record->event.pressed) { | ||
| 595 | #ifdef AUDIO_ENABLE | ||
| 596 | PLAY_NOTE_ARRAY(tone_workman, false, 0); | ||
| 597 | #endif | ||
| 598 | persistant_default_layer_set(1UL<<_WORKMAN); | ||
| 599 | } | ||
| 600 | return false; | ||
| 601 | break; | ||
| 602 | |||
| 603 | |||
| 604 | |||
| 605 | case PUNC: | ||
| 606 | if (record->event.pressed) { | ||
| 607 | layer_on(_PUNC); | ||
| 608 | update_tri_layer(_PUNC, _EMOJI, _GUI); | ||
| 609 | if (IS_LAYER_ON(_GUI)) { | ||
| 610 | led_layer_gui(); | ||
| 611 | } else { | ||
| 612 | led_layer_punc();; | ||
| 613 | } | ||
| 614 | } else { | ||
| 615 | layer_off(_PUNC); | ||
| 616 | update_tri_layer(_PUNC, _EMOJI, _GUI); | ||
| 617 | if (IS_LAYER_ON(_EMOJI)) { | ||
| 618 | led_layer_emoji(); | ||
| 619 | } else { | ||
| 620 | led_layer_normal();; | ||
| 621 | } | ||
| 622 | } | ||
| 623 | return false; | ||
| 624 | break; | ||
| 625 | case EMOJI: | ||
| 626 | if (record->event.pressed) { | ||
| 627 | layer_on(_EMOJI); | ||
| 628 | update_tri_layer(_PUNC, _EMOJI, _GUI); | ||
| 629 | if (IS_LAYER_ON(_GUI)) { | ||
| 630 | led_layer_gui(); | ||
| 631 | } else { | ||
| 632 | led_layer_emoji();; | ||
| 633 | } | ||
| 634 | } else { | ||
| 635 | layer_off(_EMOJI); | ||
| 636 | update_tri_layer(_PUNC, _EMOJI, _GUI); | ||
| 637 | if (IS_LAYER_ON(_PUNC)) { | ||
| 638 | led_layer_punc(); | ||
| 639 | } else { | ||
| 640 | led_layer_normal();; | ||
| 641 | } | ||
| 642 | } | ||
| 643 | return false; | ||
| 644 | break; | ||
| 645 | case NUM: | ||
| 646 | if (record->event.pressed) { | ||
| 647 | layer_on(_NUM); | ||
| 648 | led_layer_num(); | ||
| 649 | } else { | ||
| 650 | layer_off(_NUM); | ||
| 651 | led_layer_normal(); | ||
| 652 | } | ||
| 653 | return false; | ||
| 654 | break; | ||
| 655 | case FUNC: | ||
| 656 | if (record->event.pressed) { | ||
| 657 | layer_on(_FUNC); | ||
| 658 | led_layer_func(); | ||
| 659 | } else { | ||
| 660 | layer_off(_FUNC); | ||
| 661 | led_layer_normal(); | ||
| 662 | } | ||
| 663 | return false; | ||
| 664 | break; | ||
| 665 | |||
| 666 | |||
| 667 | case LINUX: | ||
| 668 | set_unicode_input_mode(UC_LNX); | ||
| 669 | #ifdef AUDIO_ENABLE | ||
| 670 | PLAY_NOTE_ARRAY(tone_linux, false, 0); | ||
| 671 | #endif | ||
| 672 | return false; | ||
| 673 | break; | ||
| 674 | case WIN: | ||
| 675 | set_unicode_input_mode(UC_WINC); | ||
| 676 | #ifdef AUDIO_ENABLE | ||
| 677 | PLAY_NOTE_ARRAY(tone_windows, false, 0); | ||
| 678 | #endif | ||
| 679 | return false; | ||
| 680 | break; | ||
| 681 | case OSX: | ||
| 682 | set_unicode_input_mode(UC_OSX); | ||
| 683 | #ifdef AUDIO_ENABLE | ||
| 684 | PLAY_NOTE_ARRAY(tone_osx, false, 0); | ||
| 685 | #endif | ||
| 686 | return false; | ||
| 687 | break; | ||
| 688 | } | ||
| 689 | return true; | ||
| 690 | } | ||
| 691 | |||
| 692 | void matrix_init_user(void) { | ||
| 693 | #ifdef AUDIO_ENABLE | ||
| 694 | startup_user(); | ||
| 695 | #endif | ||
| 696 | set_unicode_input_mode(UC_LNX); | ||
| 697 | led_init(); | ||
| 698 | } | ||
| 699 | |||
| 700 | // void init_rgblight(void) { | ||
| 701 | // for (uint8_t i = 0; i < RGBLED_NUM; i++) { | ||
| 702 | // led[i].r = 255; | ||
| 703 | // led[i].g = 85; | ||
| 704 | // led[i].b = 0; | ||
| 705 | // } | ||
| 706 | // ws2812_setleds(led, RGBLED_NUM); | ||
| 707 | // } | ||
| 708 | |||
| 709 | |||
| 710 | #ifdef AUDIO_ENABLE | ||
| 711 | |||
| 712 | void startup_user() | ||
| 713 | { | ||
| 714 | _delay_ms(20); // gets rid of tick | ||
| 715 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | ||
| 716 | } | ||
| 717 | |||
| 718 | void shutdown_user() | ||
| 719 | { | ||
| 720 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | ||
| 721 | _delay_ms(150); | ||
| 722 | stop_all_notes(); | ||
| 723 | } | ||
| 724 | |||
| 725 | #endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/readme.md b/keyboards/handwired/promethium/keymaps/priyadi/readme.md new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/readme.md | |||
diff --git a/keyboards/handwired/promethium/keymaps/readme.md b/keyboards/handwired/promethium/keymaps/readme.md new file mode 100644 index 000000000..527691389 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/readme.md | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # How to add your own keymap | ||
| 2 | |||
| 3 | Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: | ||
| 4 | |||
| 5 | _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] | ||
| 6 | |||
| 7 | \* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements | ||
| 8 | |||
| 9 | and contain the following files: | ||
| 10 | |||
| 11 | * `keymap.c` | ||
| 12 | * `readme.md` *recommended* | ||
| 13 | * `config.h` *optional*, found automatically when compiling | ||
| 14 | * `Makefile` *optional*, found automatically when compling | ||
| 15 | |||
| 16 | When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: | ||
| 17 | |||
| 18 | * **folder_name** description | ||
| 19 | |||
| 20 | # List of Promethium keymaps | ||
| 21 | |||
| 22 | |||
diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c new file mode 100644 index 000000000..a0035cce1 --- /dev/null +++ b/keyboards/handwired/promethium/promethium.c | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #include "promethium.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | |||
| 5 | matrix_init_user(); | ||
| 6 | } \ No newline at end of file | ||
diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h new file mode 100644 index 000000000..8f2a8c3be --- /dev/null +++ b/keyboards/handwired/promethium/promethium.h | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | #ifndef PROMETHIUM_H | ||
| 2 | #define PROMETHIUM_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | #define PS2_INIT_DELAY 2000 | ||
| 7 | |||
| 8 | #define KEYMAP( \ | ||
| 9 | k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ | ||
| 10 | k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ | ||
| 11 | k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ | ||
| 12 | k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ | ||
| 13 | ) \ | ||
| 14 | { \ | ||
| 15 | {k11, k12, k13, k14, k15, k16}, \ | ||
| 16 | {k21, k22, k23, k24, k25, k26}, \ | ||
| 17 | {k31, k32, k33, k34, k35, k36}, \ | ||
| 18 | {k41, k42, k43, k44, k45, k46}, \ | ||
| 19 | {k17, k18, k19, k1a, k1b, k1c}, \ | ||
| 20 | {k27, k28, k29, k2a, k2b, k2c}, \ | ||
| 21 | {k37, k38, k39, k3a, k3b, k3c}, \ | ||
| 22 | {k47, k48, k49, k4a, k4b, k4c} \ | ||
| 23 | } | ||
| 24 | |||
| 25 | enum led_sequence { | ||
| 26 | LED_IND_EMOJI, | ||
| 27 | LED_IND_NUM, | ||
| 28 | LED_IND_FUNC, | ||
| 29 | |||
| 30 | LED_IND_BATTERY, | ||
| 31 | LED_IND_USB, | ||
| 32 | LED_IND_BLUETOOTH, | ||
| 33 | |||
| 34 | LED_TAB, | ||
| 35 | LED_ESC, | ||
| 36 | LED_LSFT, | ||
| 37 | LED_LCTL, | ||
| 38 | |||
| 39 | LED_LGUI, | ||
| 40 | LED_Z, | ||
| 41 | LED_A, | ||
| 42 | LED_Q, | ||
| 43 | |||
| 44 | LED_W, | ||
| 45 | LED_S, | ||
| 46 | LED_X, | ||
| 47 | LED_LALT, | ||
| 48 | |||
| 49 | LED_PUNC, | ||
| 50 | LED_C, | ||
| 51 | LED_D, | ||
| 52 | LED_E, | ||
| 53 | |||
| 54 | LED_R, | ||
| 55 | LED_F, | ||
| 56 | LED_V, | ||
| 57 | LED_NUM, | ||
| 58 | |||
| 59 | LED_LSPC, | ||
| 60 | LED_B, | ||
| 61 | LED_G, | ||
| 62 | LED_T, | ||
| 63 | |||
| 64 | LED_TRACKPOINT1, | ||
| 65 | LED_TRACKPOINT2, | ||
| 66 | LED_TRACKPOINT3, | ||
| 67 | |||
| 68 | LED_RSPC, | ||
| 69 | LED_N, | ||
| 70 | LED_HH, | ||
| 71 | LED_Y, | ||
| 72 | |||
| 73 | LED_U, | ||
| 74 | LED_J, | ||
| 75 | LED_M, | ||
| 76 | LED_FUNC, | ||
| 77 | |||
| 78 | LED_EMOJI, | ||
| 79 | LED_COMM, | ||
| 80 | LED_K, | ||
| 81 | LED_I, | ||
| 82 | |||
| 83 | LED_O, | ||
| 84 | LED_L, | ||
| 85 | LED_DOT, | ||
| 86 | LED_RALT, | ||
| 87 | |||
| 88 | LED_RGUI, | ||
| 89 | LED_SLSH, | ||
| 90 | LED_SCLN, | ||
| 91 | LED_P, | ||
| 92 | |||
| 93 | LED_BKSP, | ||
| 94 | LED_ENT, | ||
| 95 | LED_RSFT, | ||
| 96 | LED_RCTL | ||
| 97 | }; | ||
| 98 | |||
| 99 | #endif | ||
| 100 | |||
| 101 | |||
diff --git a/keyboards/handwired/promethium/readme.md b/keyboards/handwired/promethium/readme.md new file mode 100644 index 000000000..e63d2f1ad --- /dev/null +++ b/keyboards/handwired/promethium/readme.md | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | Promethium Keyboard Firmware | ||
| 2 | ============================ | ||
| 3 | A handwired Planck based keyboard using the Adafruit Feather 32u4 Bluefruit LE controller. | ||
| 4 | |||
| 5 | Features: | ||
| 6 | |||
| 7 | * Single piece split form factor | ||
| 8 | * Columnar stagger | ||
| 9 | * Trackpoint | ||
| 10 | * Bluetooth LE *TBD* | ||
| 11 | * Battery | ||
| 12 | * Per switch RGB LED | ||
| 13 | * Proximity sensor for energy conservation *TBD* \ No newline at end of file | ||
diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c new file mode 100644 index 000000000..ea922ec3f --- /dev/null +++ b/keyboards/handwired/promethium/rgbsps.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #include "light_ws2812.h" | ||
| 2 | #include "rgbsps.h" | ||
| 3 | |||
| 4 | struct cRGB led[RGBSPS_NUM]; | ||
| 5 | |||
| 6 | void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) { | ||
| 7 | led[index].r = r; | ||
| 8 | led[index].g = g; | ||
| 9 | led[index].b = b; | ||
| 10 | } | ||
| 11 | |||
| 12 | void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b) { | ||
| 13 | for (uint16_t i = 0; i < RGBSPS_NUM; i++) { | ||
| 14 | rgbsps_set(i, r, g, b); | ||
| 15 | } | ||
| 16 | } | ||
| 17 | |||
| 18 | void rgbsps_turnoff(void) { | ||
| 19 | rgbsps_setall(0, 0, 0); | ||
| 20 | } | ||
| 21 | |||
| 22 | void rgbsps_send(void) { | ||
| 23 | ws2812_setleds(led, RGBSPS_NUM); | ||
| 24 | } \ No newline at end of file | ||
diff --git a/keyboards/handwired/promethium/rgbsps.h b/keyboards/handwired/promethium/rgbsps.h new file mode 100644 index 000000000..6da197f75 --- /dev/null +++ b/keyboards/handwired/promethium/rgbsps.h | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b); | ||
| 2 | void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b); | ||
| 3 | void rgbsps_turnoff(void); | ||
| 4 | void rgbsps_send(void); \ No newline at end of file | ||
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk new file mode 100644 index 000000000..0842780cc --- /dev/null +++ b/keyboards/handwired/promethium/rules.mk | |||
| @@ -0,0 +1,74 @@ | |||
| 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 = 8000000 | ||
| 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 ?= no # Mouse keys(+4700) | ||
| 56 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 57 | CONSOLE_ENABLE ?= no # Console for debug(+400) | ||
| 58 | COMMAND_ENABLE ?= no # Commands for debug and configuration | ||
| 59 | NKRO_ENABLE ?= yes # 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 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
| 63 | UNICODE_ENABLE ?= no # Unicode | ||
| 64 | UNICODEMAP_ENABLE = yes | ||
| 65 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 66 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 67 | PS2_MOUSE_ENABLE ?= yes | ||
| 68 | PS2_USE_INT ?= yes | ||
| 69 | |||
| 70 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 71 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 72 | |||
| 73 | SRC += $(QUANTUM_DIR)/light_ws2812.c | ||
| 74 | SRC += rgbsps.c \ No newline at end of file | ||
