diff options
| -rw-r--r-- | keyboards/hhkb/keymaps/krusli/config.h | 1 | ||||
| -rw-r--r-- | keyboards/hhkb/keymaps/krusli/keymap.c | 78 | ||||
| -rw-r--r-- | keyboards/lets_split/keymaps/default/keymap.c | 15 | ||||
| -rw-r--r-- | keyboards/niu_mini/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/staryu/backlight_staryu.c | 52 | ||||
| -rw-r--r-- | keyboards/staryu/backlight_staryu.h | 12 | ||||
| -rwxr-xr-x | keyboards/staryu/config.h | 74 | ||||
| -rw-r--r-- | keyboards/staryu/keymaps/default/README.md | 3 | ||||
| -rwxr-xr-x | keyboards/staryu/keymaps/default/keymap.c | 82 | ||||
| -rw-r--r-- | keyboards/staryu/keymaps/default/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/staryu/keymaps/krusli/README.md | 9 | ||||
| -rw-r--r-- | keyboards/staryu/keymaps/krusli/keymap.c | 97 | ||||
| -rw-r--r-- | keyboards/staryu/readme.md | 15 | ||||
| -rwxr-xr-x | keyboards/staryu/rules.mk | 60 | ||||
| -rwxr-xr-x | keyboards/staryu/staryu.c | 26 | ||||
| -rwxr-xr-x | keyboards/staryu/staryu.h | 28 |
16 files changed, 546 insertions, 9 deletions
diff --git a/keyboards/hhkb/keymaps/krusli/config.h b/keyboards/hhkb/keymaps/krusli/config.h new file mode 100644 index 000000000..af2fb9d8a --- /dev/null +++ b/keyboards/hhkb/keymaps/krusli/config.h | |||
| @@ -0,0 +1 @@ | |||
| #define USB_MAX_POWER_CONSUMPTION 100 | |||
diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/keymaps/krusli/keymap.c new file mode 100644 index 000000000..bd5dd8372 --- /dev/null +++ b/keyboards/hhkb/keymaps/krusli/keymap.c | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | /* -*- eval: (turn-on-orgtbl); -*- | ||
| 2 | * default HHKB Layout | ||
| 3 | */ | ||
| 4 | #include "hhkb.h" | ||
| 5 | |||
| 6 | #define BASE 0 | ||
| 7 | #define HHKB 1 | ||
| 8 | |||
| 9 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 10 | |||
| 11 | /* BASE Level: Default Layer | ||
| 12 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
| 13 | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | | ||
| 14 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
| 15 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | | ||
| 16 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
| 17 | | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | | ||
| 18 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
| 19 | | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | | ||
| 20 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
| 21 | |||
| 22 | |------+------+-----------------------+------+------| | ||
| 23 | | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | | ||
| 24 | |------+------+-----------------------+------+------| | ||
| 25 | */ | ||
| 26 | |||
| 27 | [BASE] = KEYMAP( // default layer | ||
| 28 | 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_BSLS, KC_GRV, \ | ||
| 29 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ | ||
| 30 | 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_ENT, \ | ||
| 31 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), \ | ||
| 32 | KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), | ||
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | /* Layer HHKB: HHKB mode (HHKB Fn) | ||
| 37 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
| 38 | | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | | ||
| 39 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
| 40 | | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | | ||
| 41 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
| 42 | | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | | ||
| 43 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
| 44 | | | | | | | | + | - | End | PgD | Dow | | | | | | ||
| 45 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
| 46 | |||
| 47 | |------+------+----------------------+------+------+ | ||
| 48 | | **** | **** | ******************** | **** | **** | | ||
| 49 | |------+------+----------------------+------+------+ | ||
| 50 | |||
| 51 | */ | ||
| 52 | |||
| 53 | [HHKB] = KEYMAP( | ||
| 54 | 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, \ | ||
| 55 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ | ||
| 56 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ | ||
| 57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ | ||
| 58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; | ||
| 59 | |||
| 60 | |||
| 61 | const uint16_t PROGMEM fn_actions[] = { | ||
| 62 | |||
| 63 | }; | ||
| 64 | |||
| 65 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 66 | { | ||
| 67 | // MACRODOWN only works in this function | ||
| 68 | switch(id) { | ||
| 69 | case 0: | ||
| 70 | if (record->event.pressed) { | ||
| 71 | register_code(KC_RSFT); | ||
| 72 | } else { | ||
| 73 | unregister_code(KC_RSFT); | ||
| 74 | } | ||
| 75 | break; | ||
| 76 | } | ||
| 77 | return MACRO_NONE; | ||
| 78 | }; | ||
diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index 7cc9e53c0..a2d9c27eb 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c | |||
| @@ -31,21 +31,20 @@ enum custom_keycodes { | |||
| 31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 32 | /* Qwerty | 32 | /* Qwerty |
| 33 | * ,-----------------------------------------------------------------------------------. | 33 | * ,-----------------------------------------------------------------------------------. |
| 34 | * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | 34 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |
| 35 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 35 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
| 36 | * | Tab | A | S | D | F | G | H | J | K | L | ; | " | | 36 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | |
| 37 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 37 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
| 38 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | 38 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |
| 39 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 39 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
| 40 | * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | 40 | * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | |
| 41 | * `-----------------------------------------------------------------------------------' | 41 | * `-----------------------------------------------------------------------------------' |
| 42 | */ | 42 | */ |
| 43 | 43 | [_QWERTY] = KEYMAP( | |
| 44 | [_QWERTY] = LAYOUT( \ | 44 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ |
| 45 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ | 45 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ |
| 46 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | 46 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ |
| 47 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ | 47 | ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ |
| 48 | KC_LCTRL,KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
| 49 | ), | 48 | ), |
| 50 | 49 | ||
| 51 | /* Colemak | 50 | /* Colemak |
diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md index 6955343b9..91f0cd4b6 100644 --- a/keyboards/niu_mini/readme.md +++ b/keyboards/niu_mini/readme.md | |||
| @@ -11,6 +11,6 @@ Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini | |||
| 11 | 11 | ||
| 12 | Make example for this keyboard (after setting up your build environment): | 12 | Make example for this keyboard (after setting up your build environment): |
| 13 | 13 | ||
| 14 | make niu_mini:default | 14 | make niu_mini:default:avrdude |
| 15 | 15 | ||
| 16 | See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. | 16 | See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. |
diff --git a/keyboards/staryu/backlight_staryu.c b/keyboards/staryu/backlight_staryu.c new file mode 100644 index 000000000..6fb9713f3 --- /dev/null +++ b/keyboards/staryu/backlight_staryu.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #include "backlight.h" | ||
| 2 | #include <avr/pgmspace.h> | ||
| 3 | |||
| 4 | /* backlighting */ | ||
| 5 | void init_backlight_led(void) | ||
| 6 | { | ||
| 7 | DDRC |= (1<<PC2 | 1<<PC7); | ||
| 8 | DDRD |= (1<<PD5 | 1<<PD6); | ||
| 9 | DDRB |= (1<<PB0); | ||
| 10 | } | ||
| 11 | |||
| 12 | void backlight_led_off(uint8_t index) | ||
| 13 | { | ||
| 14 | switch (index) { | ||
| 15 | case 0: | ||
| 16 | PORTC |= (1<<PC2); | ||
| 17 | break; | ||
| 18 | case 1: | ||
| 19 | PORTC |= (1<<PC7); | ||
| 20 | break; | ||
| 21 | case 2: | ||
| 22 | PORTD |= (1<<PD5); | ||
| 23 | break; | ||
| 24 | case 3: | ||
| 25 | PORTD |= (1<<PD6); | ||
| 26 | break; | ||
| 27 | case 4: | ||
| 28 | PORTB |= (1<<PB0); | ||
| 29 | break; | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | void backlight_led_on(uint8_t index) | ||
| 34 | { | ||
| 35 | switch (index) { | ||
| 36 | case 0: | ||
| 37 | PORTC &= ~(1<<PC2); | ||
| 38 | break; | ||
| 39 | case 1: | ||
| 40 | PORTC &= ~(1<<PC7); | ||
| 41 | break; | ||
| 42 | case 2: | ||
| 43 | PORTD &= ~(1<<PD5); | ||
| 44 | break; | ||
| 45 | case 3: | ||
| 46 | PORTD &= ~(1<<PD6); | ||
| 47 | break; | ||
| 48 | case 4: | ||
| 49 | PORTB &= ~(1<<PB0); | ||
| 50 | break; | ||
| 51 | } | ||
| 52 | } | ||
diff --git a/keyboards/staryu/backlight_staryu.h b/keyboards/staryu/backlight_staryu.h new file mode 100644 index 000000000..f718b970c --- /dev/null +++ b/keyboards/staryu/backlight_staryu.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef STARYU_BL | ||
| 2 | #define STARYU_BL | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | |||
| 6 | void init_backlight_led(void); | ||
| 7 | |||
| 8 | void backlight_led_on(uint8_t index); | ||
| 9 | |||
| 10 | void backlight_led_off(uint8_t index); | ||
| 11 | |||
| 12 | #endif | ||
diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h new file mode 100755 index 000000000..268fe991a --- /dev/null +++ b/keyboards/staryu/config.h | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2018 Cole Markham | ||
| 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 | #ifndef CONFIG_H | ||
| 18 | #define CONFIG_H | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x1209 | ||
| 24 | #define PRODUCT_ID 0x2328 | ||
| 25 | #define DEVICE_VER 0x0205 | ||
| 26 | #define MANUFACTURER K.T.E.C. | ||
| 27 | #define PRODUCT Staryu | ||
| 28 | #define DESCRIPTION 5-key macropad | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 1 | ||
| 32 | #define MATRIX_COLS 5 | ||
| 33 | |||
| 34 | /* key matrix pins */ | ||
| 35 | #define MATRIX_ROW_PINS { } | ||
| 36 | #define MATRIX_COL_PINS { D0, D1, D2, D3, D4 } | ||
| 37 | #define UNUSED_PINS | ||
| 38 | |||
| 39 | // from light_ws2812_config @ | ||
| 40 | // https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/staryu | ||
| 41 | #define RGB_DI_PIN C6 | ||
| 42 | #define RGBLIGHT_ANIMATIONS | ||
| 43 | #define RGBLED_NUM 1 // Number of LEDs | ||
| 44 | |||
| 45 | /* COL2ROW or ROW2COL */ | ||
| 46 | #define DIODE_DIRECTION COL2ROW | ||
| 47 | |||
| 48 | /* Set 0 if debouncing isn't needed */ | ||
| 49 | #define DEBOUNCING_DELAY 5 | ||
| 50 | |||
| 51 | // TODO backlighting | ||
| 52 | #define BACKLIGHT_LEVELS 10 | ||
| 53 | // #define BACKLIGHT_PIN B7 | ||
| 54 | /* | ||
| 55 | Backlight: C2, C7, D5, D6, B0 | ||
| 56 | switch (index) { | ||
| 57 | case 0: | ||
| 58 | PORTC &= ~(1<<PC2); | ||
| 59 | break; | ||
| 60 | case 1: | ||
| 61 | PORTC &= ~(1<<PC7); | ||
| 62 | break; | ||
| 63 | case 2: | ||
| 64 | PORTD &= ~(1<<PD5); | ||
| 65 | break; | ||
| 66 | case 3: | ||
| 67 | PORTD &= ~(1<<PD6); | ||
| 68 | break; | ||
| 69 | case 4: | ||
| 70 | PORTB &= ~(1<<PB0); | ||
| 71 | break; | ||
| 72 | */ | ||
| 73 | |||
| 74 | #endif | ||
diff --git a/keyboards/staryu/keymaps/default/README.md b/keyboards/staryu/keymaps/default/README.md new file mode 100644 index 000000000..836d3ab4d --- /dev/null +++ b/keyboards/staryu/keymaps/default/README.md | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | # Default keymap | ||
| 2 | |||
| 3 | Default keymap for the Staryu macropad, adapted from [kairyu's repo](https://github.com/kairyu/tmk_keyboard_custom/blob/master/keyboard/staryu/keymap_default.c). | ||
diff --git a/keyboards/staryu/keymaps/default/keymap.c b/keyboards/staryu/keymaps/default/keymap.c new file mode 100755 index 000000000..3dc480299 --- /dev/null +++ b/keyboards/staryu/keymaps/default/keymap.c | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2018 Kenneth Aloysius | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | #include "action_layer.h" | ||
| 19 | |||
| 20 | enum layers { | ||
| 21 | _LAYER0, | ||
| 22 | _LAYER1, | ||
| 23 | _LAYER2, | ||
| 24 | _LAYER3 | ||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { | ||
| 29 | /* Keymap 0 | ||
| 30 | * ,-----------. | ||
| 31 | * | |Up |Fn0| | ||
| 32 | * |---+---+---| | ||
| 33 | * |Lef|Dow|Rig| | ||
| 34 | * `-----------' | ||
| 35 | */ | ||
| 36 | LAYOUT( KC_UP, TO(_LAYER1), KC_LEFT,KC_DOWN,KC_RIGHT ), | ||
| 37 | /* Keymap 1 | ||
| 38 | * ,-----------. | ||
| 39 | * | |PgU|Fn1| | ||
| 40 | * |---+---+---| | ||
| 41 | * |Hom|PgD|End| | ||
| 42 | * `-----------' | ||
| 43 | */ | ||
| 44 | LAYOUT( KC_PGUP,TO(_LAYER2), KC_HOME,KC_PGDN,KC_END ), | ||
| 45 | /* Keymap 2 | ||
| 46 | * ,-----------. | ||
| 47 | * | |Sel|Fn2| | ||
| 48 | * |---+---+---| | ||
| 49 | * |Pre|Pla|Nex| | ||
| 50 | * `-----------' | ||
| 51 | */ | ||
| 52 | LAYOUT( KC_MSEL,TO(_LAYER3), KC_MPRV,KC_MPLY,KC_MNXT ), | ||
| 53 | /* Keymap 3 | ||
| 54 | * ,-----------. | ||
| 55 | * | |MsU|Fn3| | ||
| 56 | * |---+---+---| | ||
| 57 | * |MsL|MsD|MsR| | ||
| 58 | * `-----------' | ||
| 59 | */ | ||
| 60 | LAYOUT( KC_MS_U,TO(_LAYER0), KC_MS_L,KC_MS_D,KC_MS_R ), | ||
| 61 | // /* Keymap 4 | ||
| 62 | // * ,-----------. | ||
| 63 | // * | |Fn6|Fn4| | ||
| 64 | // * |---+---+---| | ||
| 65 | // * |Fn7|Fn5|Fn8| | ||
| 66 | // * `-----------' | ||
| 67 | // */ | ||
| 68 | // LAYOUT( FN6, FN4, FN7, FN5, FN8 ), | ||
| 69 | }; | ||
| 70 | |||
| 71 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 72 | return MACRO_NONE ; | ||
| 73 | } | ||
| 74 | |||
| 75 | void matrix_init_user(void) { | ||
| 76 | } | ||
| 77 | |||
| 78 | void matrix_scan_user(void) { | ||
| 79 | } | ||
| 80 | |||
| 81 | void led_set_user(uint8_t usb_led) { | ||
| 82 | } | ||
diff --git a/keyboards/staryu/keymaps/default/rules.mk b/keyboards/staryu/keymaps/default/rules.mk new file mode 100644 index 000000000..6c605daec --- /dev/null +++ b/keyboards/staryu/keymaps/default/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| MOUSEKEY_ENABLE = yes | |||
diff --git a/keyboards/staryu/keymaps/krusli/README.md b/keyboards/staryu/keymaps/krusli/README.md new file mode 100644 index 000000000..66a097907 --- /dev/null +++ b/keyboards/staryu/keymaps/krusli/README.md | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # krusli's RAMA M6-A Layout | ||
| 2 | |||
| 3 | Personal keymap for the RAMA M6-A. | ||
| 4 | |||
| 5 | Top-right button acts as a "toggle between layers" button. Layer 0 -> Layer 1 -> Layer 2 -> Layer 0 -> ... | ||
| 6 | |||
| 7 | - Layer 0: Osu! gamepad layer | ||
| 8 | - Layer 1: Git commands | ||
| 9 | - Layer 2 and 3: RGB controls | ||
diff --git a/keyboards/staryu/keymaps/krusli/keymap.c b/keyboards/staryu/keymaps/krusli/keymap.c new file mode 100644 index 000000000..2879b68e5 --- /dev/null +++ b/keyboards/staryu/keymaps/krusli/keymap.c | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2018 Kenneth Aloysius | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | #include "action_layer.h" | ||
| 19 | |||
| 20 | #include "../../backlight_staryu.h" | ||
| 21 | |||
| 22 | enum layers { | ||
| 23 | _LAYER0, | ||
| 24 | _LAYER1, | ||
| 25 | _LAYER2, | ||
| 26 | _LAYER3 | ||
| 27 | }; | ||
| 28 | |||
| 29 | enum custom_keycodes { | ||
| 30 | GIT_ADD = SAFE_RANGE, | ||
| 31 | GIT_COMMIT, | ||
| 32 | GIT_PUSH, | ||
| 33 | MUTE, | ||
| 34 | DEAFEN | ||
| 35 | }; | ||
| 36 | |||
| 37 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 38 | if (record->event.pressed) { | ||
| 39 | switch(keycode) { | ||
| 40 | case GIT_ADD: | ||
| 41 | SEND_STRING("git add ."SS_TAP(X_ENTER)); | ||
| 42 | break; | ||
| 43 | case GIT_COMMIT: | ||
| 44 | SEND_STRING("git commit -m "SS_DOWN(X_LSHIFT)SS_TAP(X_QUOTE)SS_UP(X_LSHIFT)); | ||
| 45 | break; | ||
| 46 | case GIT_PUSH: | ||
| 47 | SEND_STRING("git push"SS_TAP(X_ENTER)); | ||
| 48 | break; | ||
| 49 | case MUTE: | ||
| 50 | SEND_STRING(SS_LGUI(SS_LSFT("M"))); | ||
| 51 | break; | ||
| 52 | case DEAFEN: | ||
| 53 | SEND_STRING(SS_LGUI(SS_LSFT("D"))); | ||
| 54 | break; | ||
| 55 | return false; | ||
| 56 | } | ||
| 57 | } | ||
| 58 | return true; | ||
| 59 | }; | ||
| 60 | |||
| 61 | #define _______ KC_TRNS | ||
| 62 | #define XXXXXXX KC_NO | ||
| 63 | |||
| 64 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 65 | [_LAYER0] = LAYOUT( \ | ||
| 66 | KC_ESC, TO(_LAYER1), \ | ||
| 67 | KC_Z, KC_X, KC_SPACE \ | ||
| 68 | ), | ||
| 69 | [_LAYER1] = LAYOUT( \ | ||
| 70 | MUTE, TO(_LAYER2), \ | ||
| 71 | GIT_ADD, GIT_COMMIT, GIT_PUSH \ | ||
| 72 | ), | ||
| 73 | [_LAYER2] = LAYOUT( \ | ||
| 74 | RGB_MOD, TO(_LAYER3), \ | ||
| 75 | RGB_TOG, RGB_HUD, RGB_HUI \ | ||
| 76 | ), | ||
| 77 | [_LAYER3] = LAYOUT( \ | ||
| 78 | RGB_VAI, TO(_LAYER0), \ | ||
| 79 | RGB_SAD, RGB_VAD, RGB_SAI \ | ||
| 80 | ) | ||
| 81 | }; | ||
| 82 | |||
| 83 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 84 | return MACRO_NONE ; | ||
| 85 | } | ||
| 86 | |||
| 87 | void matrix_init_user(void) { | ||
| 88 | for (int i=0; i<5; i++) { | ||
| 89 | backlight_led_on(i); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | void matrix_scan_user(void) { | ||
| 94 | } | ||
| 95 | |||
| 96 | void led_set_user(uint8_t usb_led) { | ||
| 97 | } | ||
diff --git a/keyboards/staryu/readme.md b/keyboards/staryu/readme.md new file mode 100644 index 000000000..bca7482bc --- /dev/null +++ b/keyboards/staryu/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # Staryu | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 5 key macropad, designed by Kai and sold by KPRepublic. | ||
| 6 | |||
| 7 | Keyboard Maintainer: QMK Community | ||
| 8 | Hardware Supported: Staryu (only the non-lite version has been tested) | ||
| 9 | Hardware Availability: [AliExpress](https://www.aliexpress.com/item/Staryu-Mini-Macro-Pad-custom-keyboard-by-tkg-kai-Mini-macro-pad-mechanical-keyboard-5-keys/32817560746.html) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make staryu:default | ||
| 14 | |||
| 15 | See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. | ||
diff --git a/keyboards/staryu/rules.mk b/keyboards/staryu/rules.mk new file mode 100755 index 000000000..3e043bbcd --- /dev/null +++ b/keyboards/staryu/rules.mk | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u2 | ||
| 3 | |||
| 4 | BOOTLOADER = lufa-dfu | ||
| 5 | |||
| 6 | SRC = backlight_staryu.c | ||
| 7 | |||
| 8 | # Processor frequency. | ||
| 9 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 10 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 11 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 12 | # automatically to create a 32-bit value in your source code. | ||
| 13 | # | ||
| 14 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 15 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 16 | # does not *change* the processor frequency - it should merely be updated to | ||
| 17 | # reflect the processor speed set externally so that the code can use accurate | ||
| 18 | # software delays. | ||
| 19 | F_CPU = 16000000 | ||
| 20 | |||
| 21 | # | ||
| 22 | # LUFA specific | ||
| 23 | # | ||
| 24 | # Target architecture (see library "Board Types" documentation). | ||
| 25 | ARCH = AVR8 | ||
| 26 | |||
| 27 | # Input clock frequency. | ||
| 28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 34 | # source code. | ||
| 35 | # | ||
| 36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 38 | F_USB = $(F_CPU) | ||
| 39 | |||
| 40 | # Interrupt driven control endpoint task(+60) | ||
| 41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 42 | |||
| 43 | |||
| 44 | # Boot Section Size in *bytes* | ||
| 45 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 46 | |||
| 47 | |||
| 48 | # Build Options | ||
| 49 | # comment out to disable the options. | ||
| 50 | # | ||
| 51 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 52 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 53 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 54 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 55 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 56 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 57 | NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 58 | BACKLIGHT_ENABLE = yes # In-switch LEDs | ||
| 59 | AUDIO_ENABLE = no # There is no available timer or pin for audio on the NovelPad | ||
| 60 | RGBLIGHT_ENABLE = yes # RGB LEDs for underglow, installed and enabled by default for the NovelPad | ||
diff --git a/keyboards/staryu/staryu.c b/keyboards/staryu/staryu.c new file mode 100755 index 000000000..6dcaaea0e --- /dev/null +++ b/keyboards/staryu/staryu.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2018 Cole Markham | ||
| 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 | #include "staryu.h" | ||
| 18 | #include "backlight_staryu.h" | ||
| 19 | |||
| 20 | // for keyboard subdirectory level init functions | ||
| 21 | // @Override | ||
| 22 | void matrix_init_kb(void) { | ||
| 23 | // call user level keymaps, if any | ||
| 24 | init_backlight_led(); | ||
| 25 | matrix_init_user(); | ||
| 26 | } | ||
diff --git a/keyboards/staryu/staryu.h b/keyboards/staryu/staryu.h new file mode 100755 index 000000000..12b8be92e --- /dev/null +++ b/keyboards/staryu/staryu.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2018 Cole Markham | ||
| 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 | #ifndef KB_H | ||
| 18 | #define KB_H | ||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define LAYOUT( \ | ||
| 22 | K00, K01, \ | ||
| 23 | K10, K11, K12 \ | ||
| 24 | ) { \ | ||
| 25 | { K00, K01, K12, K11, K10 }, \ | ||
| 26 | } | ||
| 27 | |||
| 28 | #endif | ||
