diff --git a/common_features.mk b/common_features.mk index 319834b5..a67cf230 100644 --- a/common_features.mk +++ b/common_features.mk @@ -34,7 +34,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_ENABLE MUSIC_ENABLE := 1 SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c - SRC += $(QUANTUM_DIR)/audio/audio.c + ifeq ($(PLATFORM),AVR) + SRC += $(QUANTUM_DIR)/audio/audio.c + else + SRC += $(QUANTUM_DIR)/audio/audio_arm.c + endif SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/luts.c endif diff --git a/docs/config_options.md b/docs/config_options.md index 1dd4cdba..055531b6 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -69,7 +69,7 @@ This is a C header file that is one of the first things included, and will persi * `#define BACKLIGHT_PIN B7` * pin of the backlight - B5, B6, B7 use PWM, others use softPWM * `#define BACKLIGHT_LEVELS 3` - * number of levels your backlight will have (not including off) + * number of levels your backlight will have (maximum 15 excluding off) * `#define BACKLIGHT_BREATHING` * enables backlight breathing (only works with backlight pins B5, B6 and B7) * `#define BREATHING_PERIOD 6` diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 97421c04..5336e852 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -10,18 +10,18 @@ These keycodes control the backlight. Most keyboards use this for single color i |---------|------------------------------------------| |`BL_TOGG`|Turn the backlight on or off | |`BL_STEP`|Cycle through backlight levels | -|`BL_ON` |Set backlight to max brightness | -|`BL_OFF` |Turn backlight off | -|`BL_INC` |Increase backlight level | -|`BL_DEC` |Decrease backlight level | -|`BL_BRTG`|Toggle backlight breathing | +|`BL_ON` |Set the backlight to max brightness | +|`BL_OFF` |Turn the backlight off | +|`BL_INC` |Increase the backlight level | +|`BL_DEC` |Decrease the backlight level | +|`BL_BRTG`|Toggle backlight breathing | Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h. ## Configuration Options in `config.h` * `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this. -* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (excluding OFF). +* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (maximum 15 excluding off). * `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7. * `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds. diff --git a/docs/keycodes.md b/docs/keycodes.md index 1dc0e62c..fa02512d 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -256,11 +256,11 @@ This is a reference only. Each group of keys links to the page documenting their |---------|------------------------------------------| |`BL_TOGG`|Turn the backlight on or off | |`BL_STEP`|Cycle through backlight levels | -|`BL_x` |Set a specific backlight level between 0-9| -|`BL_ON` |An alias for `BL_9` | -|`BL_OFF` |An alias for `BL_0` | -|`BL_INC` |Increase backlight level | -|`BL_DEC` |Decrease backlight level | +|`BL_ON` |Set the backlight to max brightness | +|`BL_OFF` |Turn the backlight off | +|`BL_INC` |Increase the backlight level | +|`BL_DEC` |Decrease the backlight level | +|`BL_BRTG`|Toggle backlight breathing | ## [RGB Lighting](feature_rgblight.md) diff --git a/keyboards/acr60/config.h b/keyboards/acr60/config.h index 3d34dc97..c44ba737 100644 --- a/keyboards/acr60/config.h +++ b/keyboards/acr60/config.h @@ -5,11 +5,11 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x2260 +#define PRODUCT_ID 0xCA60 #define DEVICE_VER 0x0001 -#define MANUFACTURER MechKeysCa +#define MANUFACTURER MECHKEYS #define PRODUCT ACR60 -#define DESCRIPTION ACR60 Keyboard +#define DESCRIPTION 60% customizable keyboard /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/acr60/readme.md b/keyboards/acr60/readme.md index 86e063ed..a0ba2ecd 100644 --- a/keyboards/acr60/readme.md +++ b/keyboards/acr60/readme.md @@ -1,12 +1,15 @@ -# ACR60 +ACR60 +===== ![acr60](https://cdn.shopify.com/s/files/1/1697/5323/products/20170522001035_1024x1024.jpg?v=1504725199) -A customizable 60% keyboard based on the DZ60. +A customizable 60% keyboard made and sold by mechkeys.ca [More info on MECHKEYS](https://mechkeys.ca) + +Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) -Keyboard Maintainer: QMK Community Hardware Supported: ACR60 -Hardware Availability: [mechkeysca](https://mechkeys.ca/products/acr60) + +Hardware Availability: [MECHKEYS](https://mechkeys.ca/products/acr60) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/alu84/config.h b/keyboards/alu84/config.h index ab71f92b..9e013dbc 100755 --- a/keyboards/alu84/config.h +++ b/keyboards/alu84/config.h @@ -21,11 +21,11 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define PRODUCT_ID 0xCA75 #define DEVICE_VER 0x0001 -#define MANUFACTURER mechkeys.ca +#define MANUFACTURER MECHKEYS #define PRODUCT ALU84 -#define DESCRIPTION A 75% keyboard +#define DESCRIPTION 75% keyboard /* key matrix size */ #define MATRIX_ROWS 6 @@ -73,4 +73,4 @@ #endif -#endif \ No newline at end of file +#endif diff --git a/keyboards/alu84/keymaps/TurboMech/config.h b/keyboards/alu84/keymaps/turbomech/config.h similarity index 100% rename from keyboards/alu84/keymaps/TurboMech/config.h rename to keyboards/alu84/keymaps/turbomech/config.h diff --git a/keyboards/alu84/keymaps/TurboMech/keymap.c b/keyboards/alu84/keymaps/turbomech/keymap.c similarity index 99% rename from keyboards/alu84/keymaps/TurboMech/keymap.c rename to keyboards/alu84/keymaps/turbomech/keymap.c index 00397e3f..97b192a7 100644 --- a/keyboards/alu84/keymaps/TurboMech/keymap.c +++ b/keyboards/alu84/keymaps/turbomech/keymap.c @@ -102,12 +102,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; - switch (id) { - - } - return MACRO_NONE; -} - void matrix_scan_user(void) { diff --git a/keyboards/alu84/keymaps/TurboMech/readme.md b/keyboards/alu84/keymaps/turbomech/readme.md similarity index 100% rename from keyboards/alu84/keymaps/TurboMech/readme.md rename to keyboards/alu84/keymaps/turbomech/readme.md diff --git a/keyboards/alu84/keymaps/TurboMech/rules.mk b/keyboards/alu84/keymaps/turbomech/rules.mk similarity index 100% rename from keyboards/alu84/keymaps/TurboMech/rules.mk rename to keyboards/alu84/keymaps/turbomech/rules.mk diff --git a/keyboards/alu84/readme.md b/keyboards/alu84/readme.md index 979a49d0..9d23bff0 100644 --- a/keyboards/alu84/readme.md +++ b/keyboards/alu84/readme.md @@ -1,11 +1,15 @@ ALU84 === -A 75% keyboard kit made and sold by mechkeys.ca [More info on mechkeys.ca](https://mechkeys.ca) +![alu84](https://i.imgur.com/wBfazDc.jpg) + +A 75% keyboard made and sold by MECHKEYS [More info on MECHKEYS](https://mechkeys.ca). Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) + Hardware Supported: ALU84 -Hardware Availability: [mechkeys.ca](https://mechkeys.ca) + +Hardware Availability: [MECHKEYS](https://mechkeys.ca) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/bananasplit/keymaps/kamon/config.h b/keyboards/bananasplit/keymaps/kamon/config.h new file mode 100644 index 00000000..af6cf8ef --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/config.h @@ -0,0 +1,25 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define GRAVE_ESC_CTRL_OVERRIDE + +#endif diff --git a/keyboards/bananasplit/keymaps/kamon/keymap.c b/keyboards/bananasplit/keymaps/kamon/keymap.c new file mode 100644 index 00000000..d9dcafe1 --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bananasplit.h" + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl | +------------------------------------------------------------------------------------------- +*/ +[0] = KEYMAP( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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_BSLS, \ + 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, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, M(0),\ + MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(1), KC_RCTL \ +), +/* +------------------------------------------------------------------------------------------- +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | +------------------------------------------------------------------------------------------- +| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc | +------------------------------------------------------------------------------------------- +| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter | +------------------------------------------------------------------------------------------- +| Shift | | | | | | | | | | | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl | +------------------------------------------------------------------------------------------- +*/ +[1] = KEYMAP( \ + KC_GRV, 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_DEL, \ + KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ + KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, \ + KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_RSFT, ______, \ + ______, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, ______, ______, ______, KC_RCTL \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case 0: + // Sends Alt+Shift on both key down and key up. + // Fesigned to switch between two keyboard layouts on Windows using a locking switch. + // Does nothing if right shift is pressed for easier resync. + if (!(get_mods() & MOD_BIT(KC_RSFT))) + return MACRO(D(LALT), T(LSFT), U(LALT), END); + else + return MACRO_NONE; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/bananasplit/keymaps/kamon/readme.md b/keyboards/bananasplit/keymaps/kamon/readme.md new file mode 100644 index 00000000..a08bea51 --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/readme.md @@ -0,0 +1,34 @@ +# Kamon's keymap for the Bananasplit +A simple layout to get you started with the BananaSplit60. + +Default layer: + +``` +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl | +------------------------------------------------------------------------------------------- +``` + +Fn1 layer: + +``` +------------------------------------------------------------------------------------------- +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | +------------------------------------------------------------------------------------------- +| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc | +------------------------------------------------------------------------------------------- +| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter | +------------------------------------------------------------------------------------------- +| Shift | | | | | | | | | | | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl | +------------------------------------------------------------------------------------------- +``` \ No newline at end of file diff --git a/keyboards/bananasplit/keymaps/kamon/rules.mk b/keyboards/bananasplit/keymaps/kamon/rules.mk new file mode 100644 index 00000000..7d09c322 --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/rules.mk @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +# AUDIO_ENABLE = no # Audio output on port C6 +# UNICODE_ENABLE = no # Unicode +# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/chimera_ortho/info.json b/keyboards/chimera_ortho/info.json new file mode 100644 index 00000000..846ad8e2 --- /dev/null +++ b/keyboards/chimera_ortho/info.json @@ -0,0 +1,247 @@ +{ + "keyboard_name": "", + "manufacturer": "", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "", + "bootloader": "", + "width": 15.5, + "height": 4.25, + "layouts": { + "KEYMAP": { + "layout": [ + { + "label": "Esc", + "x": 0, + "y": 0 + }, + { + "label": "Q", + "x": 1, + "y": 0 + }, + { + "label": "W", + "x": 2, + "y": 0 + }, + { + "label": "E", + "x": 3, + "y": 0 + }, + { + "label": "R", + "x": 4, + "y": 0 + }, + { + "label": "T", + "x": 5, + "y": 0 + }, + { + "label": "{", + "x": 6, + "y": 0 + }, + { + "label": "}", + "x": 8.5, + "y": 0 + }, + { + "label": "Y", + "x": 9.5, + "y": 0 + }, + { + "label": "U", + "x": 10.5, + "y": 0 + }, + { + "label": "I", + "x": 11.5, + "y": 0 + }, + { + "label": "O", + "x": 12.5, + "y": 0 + }, + { + "label": "P", + "x": 13.5, + "y": 0 + }, + { + "label": "\"", + "x": 14.5, + "y": 0 + }, + { + "label": "Tab", + "x": 0, + "y": 1 + }, + { + "label": "A", + "x": 1, + "y": 1 + }, + { + "label": "S", + "x": 2, + "y": 1 + }, + { + "label": "D", + "x": 3, + "y": 1 + }, + { + "label": "F", + "x": 4, + "y": 1 + }, + { + "label": "G", + "x": 5, + "y": 1 + }, + { + "label": "-", + "x": 6, + "y": 1 + }, + { + "label": "1", + "x": 8.5, + "y": 1 + }, + { + "label": "H", + "x": 9.5, + "y": 1 + }, + { + "label": "J", + "x": 10.5, + "y": 1 + }, + { + "label": "K", + "x": 11.5, + "y": 1 + }, + { + "label": "L", + "x": 12.5, + "y": 1 + }, + { + "label": ";", + "x": 13.5, + "y": 1 + }, + { + "label": "Enter", + "x": 14.5, + "y": 1 + }, + { + "label": "(", + "x": 0, + "y": 2 + }, + { + "label": "Z", + "x": 1, + "y": 2 + }, + { + "label": "X", + "x": 2, + "y": 2 + }, + { + "label": "C", + "x": 3, + "y": 2 + }, + { + "label": "V", + "x": 4, + "y": 2 + }, + { + "label": "B", + "x": 5, + "y": 2 + }, + { + "label": "=", + "x": 6, + "y": 2 + }, + { + "label": "8", + "x": 8.5, + "y": 2 + }, + { + "label": "N", + "x": 9.5, + "y": 2 + }, + { + "label": "M", + "x": 10.5, + "y": 2 + }, + { + "label": ",", + "x": 11.5, + "y": 2 + }, + { + "label": ".", + "x": 12.5, + "y": 2 + }, + { + "label": "/", + "x": 13.5, + "y": 2 + }, + { + "label": ")", + "x": 14.5, + "y": 2 + }, + { + "label": "Num Layer", + "x": 4, + "y": 3.25 + }, + { + "label": "Back Space", + "x": 5, + "y": 3.25 + }, + { + "label": "Space", + "x": 9.5, + "y": 3.25 + }, + { + "label": "Symbol Layer", + "x": 10.5, + "y": 3.25 + } + ] + } + } +} diff --git a/keyboards/chimera_ortho/keymaps/gordon/keymap.c b/keyboards/chimera_ortho/keymaps/gordon/keymap.c new file mode 100644 index 00000000..721f8207 --- /dev/null +++ b/keyboards/chimera_ortho/keymaps/gordon/keymap.c @@ -0,0 +1,389 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include "chimera_ortho.h" +#include "action_layer.h" +#include "version.h" +#include "process_keycode/process_tap_dance.h" +#include "gordon.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +#define KC_SNAPLEFT LGUI(KC_LEFT) +#define KC_SNAPRIGHT LGUI(KC_RIGHT) +#define KC_SNAPUP LGUI(KC_UP) +#define KC_SNAPDOWN LGUI(KC_DOWN) +#define KC_PREVTAB LCTL(LSFT(KC_TAB)) +#define KC_NEXTTAB LCTL(KC_TAB) +#define KC_WORKRIGHT LCTL(LGUI(KC_RIGHT)) +#define KC_WORKLEFT LCTL(LGUI(KC_LEFT)) + +#define KC_NMPD TG(_NUMPAD) +#define KC_SYMB TG(_SYMBOLS) + +#define KC_SCTL MT(MOD_LCTL, KC_LBRC) +#define KC_SCTR MT(MOD_LCTL, KC_RBRC) +#define KC_SPLT MT(MOD_LALT, KC_MINS) +#define KC_SPRT MT(MOD_LALT, KC_1) +#define KC_GBRC MT(MOD_RGUI, KC_8) +#define KC_GQOT MT(MOD_LGUI, KC_QUOT) +#define KC_CSHW MT(MOD_LCTL|MOD_LSFT,KC_W) + +#define KC_CDEL LCTL(KC_DEL) +#define KC_AUDUP KC_AUDIO_VOL_UP +#define KC_AUDOWN KC_AUDIO_VOL_DOWN + + +#define KC_MEHS MEH_T(KC_S) +#define KC_MEHL MEH_T(KC_L) +#define KC_GWIN GUI_T(KC_G) +#define KC_FCTL CTL_T(KC_F) +#define KC_JCTL CTL_T(KC_J) +#define KC_ZCTL CTL_T(KC_Z) +#define KC_ALTV ALT_T(KC_V) +#define KC_ALTN ALT_T(KC_N) +#define KC_MEHX ALL_T(KC_X) +#define KC_RESET RESET + +//LTs +#define KC_MESC LT(_MACROS, KC_ESC) +#define KC_DNUM LT(_NUMPAD, KC_D) +#define KC_SPFN LT(_NAV,KC_EQL) +#define KC_EMAUS LT(_MOUSE,KC_E) +#define KC_ENAV LT(_NAV,KC_E) +#define KC_INAV LT(_TEXTNAV,KC_I) +#define KC_BSPSYM LT(_SYMBOLS,KC_BSPACE) +#define KC_ENTSYM LT(_SYMBOLS,KC_ENTER) +#define KC_CLNMAUS LT(_MOUSE,KC_SCOLON) + +#define KC_FUNC TT(_FUNCTION) + +//TAP DANCE +#define KC_F6F7 TD(F6F7) +#define KC_ALF4 TD(ALTF4) +#define KC_TTT TD(TTT) +#define KC_ENHM TD(HOME_END) +#define KC_CLPS TD(CALC_PRINTSCREEN) + + +#define KC_INCL M(0) +#define KC_PULL M(1) +#define KC_PUSH M(2) +#define KC_SCAP M(3) +#define KC_SCOF M(4) +#define KC_CAD LALT(LCTL(KC_DEL)) + +#define LONGPRESS_DELAY 150 +//#define LAYER_TOGGLE_DELAY 300 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_ KC_TRNS + +/* TODO: + * + * DONE: RESET and CAD into macro layer. + * DONE: WINUP AND WINDOWN in NAV layer + * DONE: Get rid of caps layer. not sure what it is even for. + * DONE: LMEH + * DONE: plus, divide, multiply on left hand for num layer + * DONE: F1 - F12 on a layer toggle (not a temp toggle but a one shot or something) + * DONE: Volume, page up and down for mouse layer. + * DONE: Add full user files - without using anything. + * DONE: Insert, ctrl delete + * DONE: Home and End + * DONE: Printscreen + + * Easier way to open new terminal (instead of alt + F2) + * Intellij/text navigation layer (ctrl delete could be here). + * Macro for "System.exit(0)" probably macro layer and "c" + * Some sort of tap dance for comma, H, right pinky, and possibly other corners. + * Something more with the right hand. not sure what. + * Mouse: Left scroll, right scroll + * Passwords and any other macros. + * LED for control + * All modifiers reset + * Russain layer + * Hebrew layer + * Get rid of stupid git pull and push macros. + * +*/ + +//Tap dance enums +enum { + F12ETAPS = 0, + CALCCOMP, + ALTF4, + F6F7, + TTT, + HOME_END, + CALC_PRINTSCREEN +}; + +static xtap ttt_state = { + .is_press_action = true, + .state = 0 +}; + + +//Already exists in gordon.c, shouldn't need this anymore +/*// To activate SINGLE_HOLD, you will need to hold for 200ms first. +// This tap dance favors keys that are used frequently in typing like 'f' +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted) { + return SINGLE_TAP; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; + else if (state->count == 3) return TRIPLE_HOLD; + else return 8; //magic number. At some point this method will expand to work for more presses +}*/ + +/* "Super tap toggle" + * Basically, TT but for two or more layers for a single key. + * This particular dance: + * Single tap/hold - TT for Function layer + * Double tap/hold - TT for Numpad layer + * Triple tap/hold - TT for Mouse layer + * +*/ +void TTT_finished (qk_tap_dance_state_t *state, void *user_data) { + ttt_state.state = cur_dance(state); + switch (ttt_state.state) { + case SINGLE_TAP: layer_invert(_FUNCTION); break; + case SINGLE_HOLD: layer_on(_FUNCTION); break; + case DOUBLE_TAP: layer_invert(_NUMPAD); break; + case DOUBLE_HOLD: layer_on(_NUMPAD); break; + case DOUBLE_SINGLE_TAP: layer_invert(_NUMPAD); break; + case TRIPLE_TAP: layer_invert(_MOUSE); break; + case TRIPLE_HOLD: layer_on(_MOUSE); break; + } +} + +void TTT_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (ttt_state.state) { + case SINGLE_TAP: break; + case SINGLE_HOLD: layer_off(_FUNCTION); break; + case DOUBLE_TAP: break; + case DOUBLE_HOLD: layer_off(_NUMPAD); break; + case DOUBLE_SINGLE_TAP: break; + case TRIPLE_TAP: break; + case TRIPLE_HOLD: layer_off(_MOUSE); break; + } + ttt_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + // simple tap dance + [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), + [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), + [CALC_PRINTSCREEN] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_PSCR), + [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), + [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), + [HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_HOME), + [TTT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,TTT_finished, TTT_reset), +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + MESC, Q ,CSHW,ENAV, R , T ,SPC , CLPS, Y , U ,INAV, O , P ,TTT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , A , MEHS,DNUM,FCTL,GWIN,GRAVE, TILD, H ,JCTL, K ,MEHL,CLNMAUS,ENHM, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + MINUS,ZCTL,MEHX, C ,ALTV, B ,DELETE, INS ,ALTN, M ,COMM,DOT ,SLSH,UNDS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSHIFT,BSPSYM, SPC ,ENTSYM + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_NUMPAD] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,MINS,PLUS,/**/,EQUAL, , , , , 4 , 5 , 6 ,PLUS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , 0 + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_SYMBOLS] = KEYMAP( + //,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----. + ,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/, + //|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----| + ,EXLM,EXLM,LPRN,RPRN , , , , ,DQUO,EQUAL,QUOTE,RCBR, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,DOLLAR, PERC,LBRACKET,RBRACKET, , , ,PIPE,BSLASH,PLUS, , , , + //|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----| + UNDS,/**/, ,/**/ + // \-------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_FUNCTION] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_NAV] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,SNAPUP,PREVTAB, ,NEXTTAB,SNAPDOWN,, , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + CDEL ,DEL, , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_TEXTNAV] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , , , , , , , ,/**/, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_MOUSE] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , ,MS_UP, , , , , , , UP , , , ,/**/ + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,MS_LEFT,MS_DOWN,MS_RIGHT, , , , ,LEFT,DOWN,RGHT,/**/, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,MS_BTN1 ,MS_BTN2 , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + + [_MACROS] = KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + /**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + CAD ,SECRET_1, , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + SCAP, , , , , , , , , , , , ,SCAP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ) + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + /* include some kind of library or header */ + case 0: + if (record->event.pressed) { + SEND_STRING("#include <>"); + return MACRO( T(LEFT), END); + } + break; + case 1: + if (record->event.pressed) { + SEND_STRING("git pull"); + return MACRO( T(ENT), END ); + } + break; + case 2: + if (record->event.pressed){ + SEND_STRING("git push"); + return MACRO( T(ENT), END ); + } + break; + case 3: + if (record->event.pressed){ + // layer_on(_CAPS); + // register_code(KC_CAPSLOCK); + // unregister_code(KC_CAPSLOCK); + } + break; + case 4: + if (record->event.pressed){ + // layer_off(_CAPS); + // register_code(KC_CAPSLOCK); + // unregister_code(KC_CAPSLOCK); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _MOUSE: + set_led_yellow; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _NAV: + set_led_magenta; + break; + case _MACROS: + set_led_green; + _delay_ms(45); + set_led_red; + _delay_ms(45); + break; + case _FUNCTION: + set_led_green; + _delay_ms(45); + set_led_blue; + _delay_ms(45); + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/clueboard/60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c index 1b0c7126..8397c4bb 100644 --- a/keyboards/clueboard/60/keymaps/default/keymap.c +++ b/keyboards/clueboard/60/keymaps/default/keymap.c @@ -3,11 +3,35 @@ #define _______ KC_TRNS enum keyboard_layers { - _BL, - _FL, - _CL + _BL, + _FL, + _CL }; +enum custom_keycodes { + S_BSKTC = SAFE_RANGE, + S_ODEJY, + S_RCKBY, + S_DOEDR, + S_SCALE, + S_ONEUP, + S_COIN, + S_SONIC, + S_ZELDA +}; + +#ifdef AUDIO_ENABLE + float song_basketcase[][2] = SONG(BASKET_CASE); + float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); + float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); + float song_doe_a_deer[][2] = SONG(DOE_A_DEER); + float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float song_coin[][2] = SONG(COIN_SOUND); + float song_one_up[][2] = SONG(ONE_UP_SOUND); + float song_sonic_ring[][2] = SONG(SONIC_RING); + float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); +#endif + const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,-----------------------------------------------------------. @@ -33,11 +57,71 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FL), _______), + _______,_______,_______, _______, _______, _______, MO(_FL), _______), [_CL] = KEYMAP( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______, _______, _______, _______, _______, MO(_FL), _______) }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case S_BSKTC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_basketcase); + } + return false; + case S_ODEJY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_ode_to_joy); + } + return false; + case S_RCKBY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_rock_a_bye_baby); + } + return false; + case S_DOEDR: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_doe_a_deer); + } + return false; + case S_SCALE: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_scale); + } + return false; + case S_ONEUP: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_one_up); + } + return false; + case S_COIN: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_coin); + } + return false; + case S_SONIC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_sonic_ring); + } + return false; + case S_ZELDA: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_zelda_puzzle); + } + return false; + } + return true; +} diff --git a/keyboards/clueboard/60/led.c b/keyboards/clueboard/60/led.c index fdf244ad..35069673 100644 --- a/keyboards/clueboard/60/led.c +++ b/keyboards/clueboard/60/led.c @@ -23,7 +23,7 @@ void backlight_init_ports(void) { printf("backlight_init_ports()\n"); #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); palSetPad(GPIOB, 8); #endif } @@ -41,13 +41,8 @@ void backlight_set(uint8_t level) { #endif } -void led_init_ports() { - printf("led_init_ports()\n"); - palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); -} - void led_set_kb(uint8_t usb_led) { - printf("led_init_ports()\n"); + printf("led_set_kb(%d)\n", usb_led); if (usb_led & (1< DEBOUNCE) { for (int row = 0; row < MATRIX_ROWS; row++) { matrix[row] = 0; diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk index 01b7dad9..93e6019a 100644 --- a/keyboards/clueboard/60/rules.mk +++ b/keyboards/clueboard/60/rules.mk @@ -50,5 +50,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file -#AUDIO_ENABLE = yes +AUDIO_ENABLE = yes # SERIAL_LINK_ENABLE = yes diff --git a/keyboards/eagle_viper/info.json b/keyboards/eagle_viper/info.json new file mode 100644 index 00000000..45dba95b --- /dev/null +++ b/keyboards/eagle_viper/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Eagle/Viper", + "manufacturer": "Duck", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"iso", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":5}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, {"label":"|", "x":13.75, "y":5}] + } + } +} diff --git a/keyboards/eagle_viper/v2/config.h b/keyboards/eagle_viper/v2/config.h index 0538f962..f04b4a0f 100644 --- a/keyboards/eagle_viper/v2/config.h +++ b/keyboards/eagle_viper/v2/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . #define DEBOUNCING_DELAY 5 /* number of backlight levels */ -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 3 /* key combination for magic key command */ #define IS_COMMAND() ( \ diff --git a/keyboards/eagle_viper/v2/v2.c b/keyboards/eagle_viper/v2/v2.c index 2d7fe1a2..a60acb97 100644 --- a/keyboards/eagle_viper/v2/v2.c +++ b/keyboards/eagle_viper/v2/v2.c @@ -17,30 +17,29 @@ #include "indicator_leds.h" enum BACKLIGHT_AREAS { - BACKLIGHT_ALPHA = 0b0000001, - BACKLIGHT_EXTRA = 0b0000010, - BACKLIGHT_MODNUM = 0b0000100, - BACKLIGHT_FROW = 0b0001000, - BACKLIGHT_RGB = 0b0010000, - BACKLIGHT_SWITCH = 0b0001111 + BACKLIGHT_ALPHAS = 0b00000010, + BACKLIGHT_MODNUM = 0b00001000 }; -uint8_t backlight_rgb_r = 255; -uint8_t backlight_rgb_g = 0; -uint8_t backlight_rgb_b = 0; - void backlight_set(uint8_t level) { -/* - * DISABLE for now -> this causes issues with initial rgb setup - */ - -/* - level & BACKLIGHT_ALPHA ? (PORTB |= 0b00000010) : (PORTB &= ~0b00000010); - level & BACKLIGHT_EXTRA ? (PORTB |= 0b00000100) : (PORTB &= ~0b00000100); - level & BACKLIGHT_MODNUM ? (PORTB |= 0b00001000) : (PORTB &= ~0b00001000); - level & BACKLIGHT_FROW ? (PORTE |= 0b01000000) : (PORTE &= ~0b01000000); - level & BACKLIGHT_RGB ? backlight_toggle_rgb(true) : backlight_toggle_rgb(false); -*/ + switch(level) { + case 0: + PORTB |= BACKLIGHT_ALPHAS; + PORTB |= BACKLIGHT_MODNUM; + break; + case 1: + PORTB &= ~BACKLIGHT_ALPHAS; + PORTB |= BACKLIGHT_MODNUM; + break; + case 2: + PORTB |= BACKLIGHT_ALPHAS; + PORTB &= ~BACKLIGHT_MODNUM; + break; + case 3: + PORTB &= ~BACKLIGHT_ALPHAS; + PORTB &= ~BACKLIGHT_MODNUM; + break; + } } // Port from backlight_update_state diff --git a/keyboards/ergodone/ergodone.c b/keyboards/ergodone/ergodone.c index dd05a8de..e0579408 100644 --- a/keyboards/ergodone/ergodone.c +++ b/keyboards/ergodone/ergodone.c @@ -12,6 +12,8 @@ extern inline void ergodox_right_led_2_off(void); extern inline void ergodox_right_led_3_off(void); extern inline void ergodox_right_led_off(uint8_t led); +extern inline void ergodox_led_all_off(void); + void ergodox_led_init(void); void ergodox_blink_all_leds(void); diff --git a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c new file mode 100644 index 00000000..7e3e51cd --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c @@ -0,0 +1,315 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "process_keycode/process_tap_dance.h" +#include "gordon.h" + +#include "keymap_german.h" + +#include "keymap_nordic.h" + + +#define TLSLSH M(TIL_SLASH) +#define F1_F13 TD(F1F13) +#define F2_F14 TD(F2F14) +#define F5_F15 TD(F5F15) +#define F4_ALTF4 TD(ALTF4) +#define END_ESC TD(ENDESC) +#define SHF6_AF7 TD(F6F7) +#define F12_RUN TD(F12ETAPS) +#define COMMA_TD TD(COMMA) + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD, +}; + +//Tap dance enums +enum { + F12TAP = 0, + F12ETAPS, + CALCCOMP, + REFRESH, //send R, or Control+R if double tapped. + ENDESC, + XESC, //'quad function'. x, control, escape, alt + ALY2, //'quad function': a, Hyper, ctrl+a, layer 2 + PRLOCK, + F6F7, // Shift F6 or Alt F7 + TABCOMBO, + FCTRL, + F3D, + ALTF4, + COMMA, + AT, + HTAB, + F1F13, + F2F14, + F5F15 +}; + + + +// Custom tapping terms for each key. +// Requires changes to action_taping.c +/* uint16_t get_tapping_term(keyevent_t* event) { + uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key); + if (keycode == LT(3,KC_E) ) { + return TAPPING_TERM + 50; + } + return TAPPING_TERM; +} */ + + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // simple tap dance + [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), + [REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)), + [ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC), + [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), + [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), + [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), + [F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13), + [F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14), + [F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), + [TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset), + [F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset), + [COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset), + [HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +//**************************FIRST LAYER - LAYER ZERO ************************************** + [_QWERTY] = KEYMAP( + + SHF6_AF7, F1_F13, F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11, + ________, KC_Q, CTR_SH_W, NAV_E, CTR_AL_R, KC_T, PRINTSCR, + KC_TAB, KC_A, MEH_S, NUMPAD_D, CTRL_F, WIN_G, + ALT_SHFT, CTRL_Z, HYPER_X, MOUSE_C, ALT_V, KC_B, TT(_MOUSE), + KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, + + KC_INSERT, KC_DELETE, + ALT_HOME, + KC_LSHIFT, SYMB_BSP, END_ESC, + + F12_RUN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, TD(CALCCOMP), + ________, KC_Y, KC_U, KC_I, KC_O, KC_P, ________, + WIN_H, CTRL_J, KC_K, MEH_L, COL_MOUS, ________, + KC_LEAD, KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, TD(TABCOMBO), + KC_UP, KC_DOWN, KC_ESC, KC_TILD, KC_UNDS, + + KC_ESCAPE, KC_DELETE, + ALT_T(KC_PGUP), + RCTL_T(KC_PGDOWN), LT(_NAV,KC_ENTER), SPAC_SYM), + + + //**************************SYMBOLS LAYER************************** + [_SYMBOLS] = KEYMAP( + ________, ________, ________, ________, ________, ________, ________, + ________, TLSLSH, KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________, + ________, KC_EXLM, KC_PIPE, KC_LPRN, KC_RPRN, M(DEREF), + ________,KC_DOLLAR, KC_PERC, LSQUIGLY, RSQUIGLY, ________, ________, + ________, M(TICK3), ________, ________, ________, + + ________,________, + ________, + ________,________,________, + + + ________, ________, ________, ________, ________, ________, NUMLOCK, + ________, TLSLSH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK, + M(EQRIGHT), KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________, + ________, KC_PIPE, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________, + ________,________,________,M(TILD3),________, + ________,________, + ________, + ________,________,________), + + //**************************MOUSE MOVEMENT LAYER************************** + [_MOUSE] = KEYMAP(RESET,________,________,________,________,________,________, + RESET,________,________,KC_MS_UP,________,KC_MS_WH_UP,CALTDEL, + ________,________,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_MS_WH_DOWN, + KC_SECRET_1,________,HYPR(KC_F13),________,HYPR(KC_F14),KC_SECRET_2,________, + ________,________,HYPR(KC_F15),KC_MS_WH_LEFT,KC_MS_WH_RIGHT, + + ________,________, + ________, + KC_MS_BTN1,KC_MS_BTN2,________, + + + ________,________,________,________,________,________,________, + KC_MS_WH_UP,________,________,KC_UP,________,________,________, + ________,KC_LEFT,KC_DOWN,KC_RIGHT,________,________, + KC_MS_WH_DOWN,________,KC_PGUP,KC_PGDOWN,KC_MEDIA_NEXT_TRACK,________,________, + KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_MEDIA_PLAY_PAUSE,________, + ________,________, + ________, + ________,________,KC_WWW_BACK), + + + + + //**************************WINDOWS NAVIGATION LAYER************************** + + [_NAV] = KEYMAP(________,________,________,________,________,________,________, + ________,________,SNAPLEFT,________,SNAPRGHT,LALT(KC_LEFT),________, + ________,LCTL(KC_W),PREVTAB,LGUI(KC_D),NEXTTAB,________, + ________,________,WORKLEFT,________,WORKRIGHT,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,SNAPUP ,KC_UP ,SNAPDOWN,________,________, + ________,KC_LEFT ,KC_DOWN ,KC_RIGHT,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), + + //****************************NUMPAD LAYER**************************** + [_NUMPAD] = KEYMAP(________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + BL_TOGG ,BL_STEP ,________,________,________,________,________, + ________,________,KC_7 ,KC_8 ,KC_9 ,________,________, + ________,KC_4 ,KC_5 ,KC_6 ,________,________, + ________,________,KC_1 ,KC_2 ,KC_3 ,________,________, + KC_0 ,KC_0 , KC_DOT ,________,________, + + ________,________, + ________, + ________,________,KC_0), + //****************************TEXT/INTELLIJ NAVIGATION LAYER**************************** + [_TEXTNAV] = KEYMAP(________,________,________,________,________,________,________, + ________,MEH(KC_Q),LSFT(KC_ESCAPE),MEH(KC_D),MEH(KC_2),LALT(LSFT(KC_UP)),________, + ________,LALT(KC_F7),LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)), + ________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________,________,________,________,________,________,________,________,________,________,LCTL(KC_DELETE),________,LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)),________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)),LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________) +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(1) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case INFOQM: { + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + + case TIL_SLASH: { + if (record->event.pressed) { + SEND_STRING ("~/."); + } + break; + } + + case DEREF: { + if (record->event.pressed) { + SEND_STRING ("->"); + } + break; + } + + case EQRIGHT: { + if (record->event.pressed) { + SEND_STRING ("=>"); + } + break; + } + + case TICK3: { + if (record->event.pressed) { + SEND_STRING ("```"); + } + break; + } + + case TILD3: { + if (record->event.pressed) { + SEND_STRING ("~~~"); + } + break; + } + + case ALTTAB_START: { + register_code(KC_LALT); + layer_on(8); + } + + case ALTTAB_END: { + unregister_code(KC_LALT); + layer_off(8); + } + + + + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_on(); + ergodox_led_all_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case _SYMBOLS: + ergodox_right_led_1_on(); + break; + case _MOUSE: + ergodox_right_led_2_on(); + break; + case _NUMPAD: + ergodox_right_led_3_on(); + break; + case _NAV: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + +}; diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c b/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c new file mode 100644 index 00000000..0bf0a86a --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c @@ -0,0 +1,356 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define QWERTY 0 // qwerty layer +#define HALFQWERTY 1 // mirrored qwerty layer +#define DVORAK 2 // dvorak layer +#define HALFDVORAK 3 // mirrored dvorak layer +#define SYMB 5 // symbols +#define MDIA 6 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: qwerty + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Alt | LGui | | RGui |Alt | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * |mirror|ace | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[QWERTY] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, BL_ON, + KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, + KC_LALT, TG(DVORAK), + KC_HOME, + LT(HALFQWERTY, KC_SPACE),KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT, + KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + TG(DVORAK), KC_RALT, + KC_PGUP, + KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT) + ), +/* Keymap 1: mirrored qwerty + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | P | O | I | U | Y | L1 | | L1 | T | R | E | W | Q | TAB | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ENTER | ; | L | K | J | H |------| |------| G | F | D | S | A | BSPC | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift | / | . | , | M | N | | | | B | V | C | X | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Alt | LGui | | RGui |Alt | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * |mirror|ace | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_LEFT, + KC_TAB, KC_P, KC_O, KC_I, KC_U, KC_Y, TG(SYMB), + KC_BSPC, KC_SCLN, KC_L, KC_K, KC_J, KC_H, + KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_TRANSPARENT, + KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, + KC_LALT, KC_TRANSPARENT, + KC_HOME, + KC_TRANSPARENT,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC, + TG(SYMB), KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS, + KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT, + MEH_T(KC_NO),KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, + KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_TRANSPARENT, KC_RALT, + KC_PGUP, + KC_PGDN,KC_TAB, KC_TRANSPARENT + ), +/* Keymap 3: dvorak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | O | E | U | I |------| |------| D | H | T | S | - |ENTER | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Alt | LGui | | RGui |Alt | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * |mirror|ace | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[DVORAK] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, TG(SYMB), + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), + KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, + KC_LALT, KC_TRANSPARENT, + KC_HOME, + LT(HALFDVORAK, KC_SPACE),KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TG(SYMB), KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_D, KC_H, KC_T, KC_S, KC_MINUS, KC_ENT, + MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_TRANSPARENT, KC_RALT, + KC_PGUP, + KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT) + ), +/* Keymap 3: mirrored dvorak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | L | R | C | G | F | L1 | | L1 | Y | P | . | , | ' | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | - | S | T | H | D |------| |------| I | U | E | O | A |ENTER | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift | Z | V | W | M | B | | | | X | K | J | Q | ; | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Alt | LGui | | RGui |Alt | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * |mirror|ace | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, TG(SYMB), + KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D, + KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, ALL_T(KC_NO), + KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, + KC_LALT, KC_TRANSPARENT, + KC_HOME, + KC_TRANSPARENT,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, + TG(SYMB), KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB, + KC_I, KC_U, KC_E, KC_O, KC_A, KC_ENT, + MEH_T(KC_NO),KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT, + KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_TRANSPARENT, KC_RALT, + KC_PGUP, + KC_PGDN,KC_TAB, KC_TRANSPARENT + ), +/* Keymap 5: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RGB_MOD,KC_TRNS, + KC_TRNS, + RGB_VAD,RGB_VAI,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_TOG, RGB_SLD, + KC_TRNS, + KC_TRNS, RGB_HUD, RGB_HUI +), +/* Keymap 6: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox_infinity/matrix.c b/keyboards/ergodox_infinity/matrix.c index 3364f8c9..3baa07f5 100644 --- a/keyboards/ergodox_infinity/matrix.c +++ b/keyboards/ergodox_infinity/matrix.c @@ -62,8 +62,8 @@ void matrix_init(void) palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS); + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS * sizeof(matrix_row_t)); matrix_init_quantum(); } diff --git a/keyboards/gh60/info.json b/keyboards/gh60/info.json index 1ea3c2e0..aed31f75 100644 --- a/keyboards/gh60/info.json +++ b/keyboards/gh60/info.json @@ -1,9 +1,9 @@ { "keyboard_name": "GH60", "identifier": "FEED:6060:0001", - "layout": { + "layouts": { "LAYOUT_60_ansi": { - "layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":14, "y":0, "label":"Backspace", "w":2}, {"x":0.5, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":14, "y":1, "label":"|", "w":1.5}, {"x":0.75, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":14, "y":2, "label":"Enter", "w":2.25}, {"x":1.25, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":14, "y":3, "label":"Shift", "w":2.75}, {"x":0.25, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.5, "y":4, "label":"Win", "w":1.25}, {"x":2.75, "y":4, "label":"Alt", "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "label":"Alt", "w":1.25}, {"x":11.5, "y":4, "label":"Win", "w":1.25}, {"x":12.75, "y":4, "label":"Menu", "w":1.25}, {"x":14, "y":4, "label":"Ctrl", "w":1.25}] + "layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] } }, "maintainer": "qmk", @@ -14,4 +14,4 @@ "height": 5, "url": "http://qmk.fm/keyboards/gh60", "manufacturer": "geekhack" -} \ No newline at end of file +} diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c index b6ccf86c..bf86591c 100644 --- a/keyboards/infinity60/matrix.c +++ b/keyboards/infinity60/matrix.c @@ -60,8 +60,8 @@ void matrix_init(void) palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); #endif - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, MATRIX_ROWS); + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); matrix_init_quantum(); } diff --git a/keyboards/jm60/matrix.c b/keyboards/jm60/matrix.c index 8430a584..01bb4a80 100644 --- a/keyboards/jm60/matrix.c +++ b/keyboards/jm60/matrix.c @@ -49,8 +49,8 @@ void matrix_init(void) palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, MATRIX_ROWS); + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); } uint8_t matrix_scan(void) diff --git a/keyboards/k_type/matrix.c b/keyboards/k_type/matrix.c index 7f230beb..d919bb88 100644 --- a/keyboards/k_type/matrix.c +++ b/keyboards/k_type/matrix.c @@ -42,8 +42,8 @@ void matrix_init(void) palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL); - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, MATRIX_ROWS); + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); matrix_init_quantum(); } diff --git a/keyboards/kc60/info.json b/keyboards/kc60/info.json new file mode 100644 index 00000000..81d18ffd --- /dev/null +++ b/keyboards/kc60/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "KC60", + "manufacturer": "NKPC", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":14, "y":0, "w":2}, {"x":0.5, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":14, "y":1, "w":1.5}, {"x":0.75, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":14, "y":2, "w":2.25}, {"x":1.25, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":14, "y":3, "w":2.75}, {"x":0.25, "y":4, "w":1.25}, {"x":1.5, "y":4, "w":1.25}, {"x":2.75, "y":4, "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.25}, {"x":11.5, "y":4, "w":1.25}, {"x":12.75, "y":4, "w":1.25}, {"x":14, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index 47cda6fa..77def421 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -124,6 +124,12 @@ uint8_t matrix_cols(void) void matrix_init(void) { +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1<. // wiring of each half #define MATRIX_ROW_PINS { B1, B5, E6, B4 } #define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6} -// #define MATRIX_COL_PINS { B6, B2, B3, C6, F7, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B6, B2, B3, D7, F7, F4} //uncomment this line and comment line above if you need to reverse left-to-right key order /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -59,8 +59,8 @@ along with this program. If not, see . ) /* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_TIMER +#define RGB_DI_PIN D1 +#define RGBLIGHT_TIMER #define RGBLED_NUM 12 // Number of LEDs #define ws2812_PORTREG PORTD #define ws2812_DDRREG DDRD diff --git a/keyboards/lets_split/sockets/rules.mk b/keyboards/lets_split/sockets/rules.mk index a975e56f..e14d18d8 100644 --- a/keyboards/lets_split/sockets/rules.mk +++ b/keyboards/lets_split/sockets/rules.mk @@ -1,3 +1,3 @@ BACKLIGHT_ENABLE = no AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = yes #Don't enable this along with I2C diff --git a/keyboards/lets_split/sockets/sockets.h b/keyboards/lets_split/sockets/sockets.h index 16b93b3d..05cc78f9 100644 --- a/keyboards/lets_split/sockets/sockets.h +++ b/keyboards/lets_split/sockets/sockets.h @@ -1,5 +1,6 @@ -#ifndef REV2_H -#define REV2_H +#ifndef SOCKETS_H +#define SOCKETS_H +#define DISABLE_JTAG // The keyboard uses PF4 and PF7, which are used by JTAG. #include "lets_split.h" diff --git a/keyboards/mechmini/readme.md b/keyboards/mechmini/readme.md index 56dd81a2..427cbbd0 100644 --- a/keyboards/mechmini/readme.md +++ b/keyboards/mechmini/readme.md @@ -1,6 +1,8 @@ Mechmini ======== +![mechmini](https://cdn.shopify.com/s/files/1/1697/5323/products/20495451_468333093530388_1648547540_o_grande.jpg?v=1510792821) + A 40% compact ortholinear/staggered keyboard. Version 1 was originally bootmapper (ps2avrGB) and can be ported to QMK following the v1 readme (../mechmini/v1/readme.md). This version is no longer in production. @@ -8,8 +10,10 @@ Version 1 was originally bootmapper (ps2avrGB) and can be ported to QMK followin Version 2 (Mechmini 2.0) was shipped powered by QMK [More info on MECHKEYS](https://mechkeys.ca). Keyboard Maintainer: QMK Community (version 1) & [TurboMech](https://github.com/TurboMech) (version 2 - aka Mechmini 2.0) + Hardware Supported: Mechmini keyboard -Hardware Availability: https://mechkeys.ca/collections/keyboards/products/mechmini-2-0 + +Hardware Availability: [MECHKEYS](https://mechkeys.ca/collections/keyboards/products/mechmini-2-0) Make example for this keyboard (after setting up your build environment), this will make the Mechmini 2.0 default keymap (split space) - please see v1 readme for v1 make instructions: diff --git a/keyboards/mechmini/v2/README.md b/keyboards/mechmini/v2/README.md index e1efc990..a43afc67 100644 --- a/keyboards/mechmini/v2/README.md +++ b/keyboards/mechmini/v2/README.md @@ -6,8 +6,10 @@ A 40% compact ortholinear/staggered keyboard. Version 2 (Mechmini 2.0) was shipped powered by QMK [More info on MECHKEYS](https://mechkeys.ca). Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) + Hardware Supported: Mechmini 2.0 keyboard -Hardware Availability: https://mechkeys.ca/collections/keyboards/products/mechmini-2-0 + +Hardware Availability: [MECHKEYS Mechmini 2.0](https://mechkeys.ca/collections/keyboards/products/mechmini-2-0) Make example for this keyboard (after setting up your build environment), this will make the Mechmini 2.0 default keymap (split space): diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c index 20e90f6e..a0bfef73 100755 --- a/keyboards/niu_mini/keymaps/default/keymap.c +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -3,25 +3,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT}, - {KC_LCTL, KC_LGUI, KC_1, KC_2, KC_3, KC_SPC, MO(2), MO(1), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} - // NOTE MO(2) does not correspond to an actual key since the NIU only comes - // in MIT layout + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT}, + {KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} }, [1] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, - {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, BL_TOGG, BL_STEP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, + {KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, 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, KC_TRNS, KC_TRNS}, + {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} }, [2] = { - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 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}, - {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, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, + {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {KC_TRNS, BL_TOGG, BL_STEP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} } }; diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 7c7e9812..64ef5f30 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -56,12 +56,12 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/octagon/info.json b/keyboards/octagon/info.json new file mode 100644 index 00000000..7d3f4963 --- /dev/null +++ b/keyboards/octagon/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Octagon", + "manufacturer": "Duck", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":14, "y":1, "w":2}, {"x":15, "y":1}, {"x":0.5, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":14, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":0.75, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":14, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":1.25, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":13, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":0.25, "y":5, "w":1.25}, {"x":1.5, "y":5, "w":1.25}, {"x":2.75, "y":5, "w":1.25}, {"x":9, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}] + } + } +} diff --git a/keyboards/planck/keymaps/emilyh/config.h b/keyboards/planck/keymaps/emilyh/config.h new file mode 100644 index 00000000..b406e2fe --- /dev/null +++ b/keyboards/planck/keymaps/emilyh/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c new file mode 100644 index 00000000..cfc4beba --- /dev/null +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -0,0 +1,317 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Brite| GUI | Alt |Lower | Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT }, + {KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ | Home | Next | Vol+ | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | End | Prev | Vol- | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), KC_HOME, KC_MNXT, KC_VOLU, KC_MUTE}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_MPRV, KC_VOLD, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |Plover|Pg Up | Next | Vol+ | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Pg Dn | Prev | Vol- | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TO(_PLOVER), KC_PGUP, KC_MNXT, KC_VOLU, KC_MUTE}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY} +}, + +/* Numpad Layer + * ,-----------------------------------------------------------------------------------. + * | ESC | | | ( | ) | | | 7 | 8 | 9 | + | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | + | - | * | / | | | 4 | 5 | 6 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | Up | | | | | 1 | 2 | 3 | Up | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |ToQrty| Left | Down |Right | | Space | 0 | . | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_ESC , XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN,XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC}, + {KC_TAB , KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS,XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_UP, _______}, + {TO(_QWERTY),KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX, KC_SPC, KC_SPC, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/emilyh/readme.md b/keyboards/planck/keymaps/emilyh/readme.md new file mode 100644 index 00000000..5805480e --- /dev/null +++ b/keyboards/planck/keymaps/emilyh/readme.md @@ -0,0 +1,2 @@ +# A modified planck layout with arrow cluster + diff --git a/keyboards/preonic/info.json b/keyboards/preonic/info.json index a87e5953..67cc0863 100644 --- a/keyboards/preonic/info.json +++ b/keyboards/preonic/info.json @@ -10,7 +10,7 @@ "width": 12, "height": 5, "layouts": { - "LAYOUT_preonic_mit": { + "KEYMAP": { "key_count": 59, "layout": [ { "w": 1, "x": 0, "y": 0 }, @@ -138,4 +138,4 @@ { "w": 1, "x": 11, "y": 4 } ] } } -} \ No newline at end of file +} diff --git a/keyboards/prime_r/config.h b/keyboards/prime_r/config.h new file mode 100644 index 00000000..b53f1490 --- /dev/null +++ b/keyboards/prime_r/config.h @@ -0,0 +1,75 @@ +/* +Copyright 2018 Andrew Heaston + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PrimeKB +#define PRODUCT Prime_R +#define DESCRIPTION A compact layout with mini-numpad. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D0, B7, B3, B2 } +#define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/prime_r/keymaps/default/config.h b/keyboards/prime_r/keymaps/default/config.h new file mode 100644 index 00000000..e7ffd3aa --- /dev/null +++ b/keyboards/prime_r/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Andrew Heaston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/prime_r/keymaps/default/keymap.c b/keyboards/prime_r/keymaps/default/keymap.c new file mode 100644 index 00000000..ff00dc65 --- /dev/null +++ b/keyboards/prime_r/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2018 Andrew Heaston @rooski15 + * + * Developed by /u/holtenc at www.primekb.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +// Prime_R Rev 1.0 + +#include "prime_r.h" +#include "action_layer.h" +#include "backlight.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* (Base Layer) Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0|PUP|BSP|PSC|PUP|PDN| + * |---------------------------------------------------------------| + * |Grv| Q| W| E| R| T| Y| U| I| O| P|PDN|DEL| 7| 8| 9| + * |---------------------------------------------------------------| + * |Tab | A| S| D| F| G| H| J| K| L| '|Return| 4| 5| 6| + * |---------------------------------------------------------------| + * |Shift| Z| X| C| V| B| N| M| ,| .| ?|Shift| 1| 2| 3| + * |---------------------------------------------------------------| + * |Ctrl|Gui |App|Alt| Space| Space |Alt|App|GUI|Ctrl | 0| .|Ret| + * `---------------------------------------------------------------' + */ + // 0: Base Layer + KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP, KC_BSPC, KC_PSCR, KC_PGUP, KC_PGDN, \ + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PGDN, KC_DEL, KC_7, KC_8, KC_9, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_DQUO, KC_ENT, KC_4, KC_5, KC_6, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LABK, KC_RABK, KC_QUES, KC_LSFT, KC_1, KC_2, KC_3, \ + KC_LCTL, KC_LGUI, KC_APP, KC_LALT, MO(0), KC_SPC, KC_RALT, KC_APP, KC_RGUI, KC_RCTL, KC_0, KC_DOT, KC_ENT), \ + + // 1: Function Layer + KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/prime_r/keymaps/default/readme.md b/keyboards/prime_r/keymaps/default/readme.md new file mode 100644 index 00000000..be92dce9 --- /dev/null +++ b/keyboards/prime_r/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default Prime_R layout, with nothing committed to function layer. + +# Extracted from json at https://www.primekb.com/pages/programming \ No newline at end of file diff --git a/keyboards/prime_r/keymaps/rooski/config.h b/keyboards/prime_r/keymaps/rooski/config.h new file mode 100644 index 00000000..51728ccd --- /dev/null +++ b/keyboards/prime_r/keymaps/rooski/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Andrew Heaston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#define DISABLE_SPACE_CADET_ROLLOVER + + +#endif diff --git a/keyboards/prime_r/keymaps/rooski/keymap.c b/keyboards/prime_r/keymaps/rooski/keymap.c new file mode 100644 index 00000000..091dcce2 --- /dev/null +++ b/keyboards/prime_r/keymaps/rooski/keymap.c @@ -0,0 +1,199 @@ +/* Copyright 2018 Andrew Heaston @rooski15 + * + * Developed by /u/holtenc at www.primekb.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */// Prime_R Rev 1.0 + +#include "prime_r.h" +#include "action_layer.h" +#include "backlight.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +//Arrow Cluster Toggle +static bool arrow_toggle = false; + +//Arrow Keys +enum custom_keycodes{ + AR_TOG = SAFE_RANGE, //Toggle Arrow Keys + AR_LT, //Num0 or Left Arrow + AR_RT, //NumEnt or Right Arrow + AR_DN, //NumDot or Down Arrow + AR_UP, //Num2 or Up Arrow +}; + +// Tap/Hold Space Layer +#define SPC_LT LT(1, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* (Base Layer) Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -|BSP|DEL|HOM|END| + * |---------------------------------------------------------------| + * |Grv| Q| W| E| R| T| Y| U| I| O| P| [| ]| 7| 8| 9| + * |---------------------------------------------------------------| + * |Tab | A| S| D| F| G| H| J| K| L| '|Return| 4| 5| 6| + * |---------------------------------------------------------------| + * |Shift| Z| X| C| V| B| N| M| ,| .| ?|Shift| 1|ARU| 3| AR - U/D/L/R & Toggle + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt|TO1| 1/SP | 1/SP |ART|App|Alt|Ctrl |ARL|ARD|ARR| Arrow keys operate on AR Toggle to be numpad keys + * `---------------------------------------------------------------' + */ + // 0: Base Layer + KEYMAP( + 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_BSPC, KC_DEL, KC_HOME, KC_END, \ + KC_GRV, 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_P7, KC_P8, KC_P9, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_P1, AR_UP, KC_P3, \ + KC_LCTL, KC_LGUI, KC_LALT, TO(1), SPC_LT, SPC_LT, AR_TOG, KC_APP, KC_RALT, KC_RCTL, AR_LT, AR_DN, AR_RT), \ + + /* (Function Layer) + * ,---------------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F0| =|BSP|HOM|END|DEL| + * |---------------------------------------------------------------| + * |Grv| Q| W| E| R| T| Y| U| I| O| P| [| \| 7| 8| 9| + * |---------------------------------------------------------------| + * |BL | A| S| D| F| G| H| J| K| L| '|Return| 4| 5| 6| + * |---------------------------------------------------------------| + * |Shift| Z| X| C| V| B| N| M| ,| .| ?|Shift| 1|VUP| 3| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt|TO0| 1/SP | 1/SP |ART|TO2|Alt|Ctrl |MUT|VDN|STP| + * `---------------------------------------------------------------' + */ + // 1: Function Layer + KEYMAP( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL, _______, KC_PSLS, KC_PAST, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, + _______, _______, _______, TO(0), _______, _______, _______, TO(2), _______, _______, KC_MUTE, KC_VOLD, KC_MSTP), + + /* (Numpad Mods) + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -|BSP| /| *| +| Mirrors base layer, but with numpad mods + * |---------------------------------------------------------------| + * |Grv| Q| W| E| R| T| Y| U| I| O| P| [| ]| 7| 8| 9| + * |---------------------------------------------------------------| + * |Tab | A| S| D| F| G| H| J| K| L| ;|Return| 4| 5| 6| + * |---------------------------------------------------------------| + * |Shift| Z| X| C| V| B| N| M| ,| .| ?|Shift| 1|ARU| 3| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt|TO0| 1/SP | 1/SP |ART|App|Alt|Ctrl |ARL|ARD|ARR| + * `---------------------------------------------------------------' + */ + // 2: Numpad Mods + KEYMAP( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, _______, KC_PSLS, KC_PAST, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RBRC, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, AR_UP, _______, + _______, _______, _______, TO(0), _______, _______, _______, KC_APP, _______, _______, AR_LT, AR_DN, AR_RT ), + + // 3: Extra + KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; + +void matrix_init_user(void) { + if (get_backlight_level() != 0){ + backlight_toggle(); + } +}; + +void matrix_scan_user(void) { +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed){ + switch(keycode) { + case AR_TOG: + arrow_toggle = !arrow_toggle; + backlight_toggle(); + return false; break; + + case AR_UP: + if(arrow_toggle == 1){ + SEND_STRING(SS_DOWN(X_UP)); + } else { + SEND_STRING(SS_DOWN(X_KP_2)); + } + return false; break; + + case AR_DN: + if(arrow_toggle == 1){ + SEND_STRING(SS_DOWN(X_DOWN)); + } else { + SEND_STRING(SS_DOWN(X_KP_DOT)); + } + return false; break; + + case AR_LT: + if(arrow_toggle == 1){ + SEND_STRING(SS_DOWN(X_LEFT)); + } else { + SEND_STRING(SS_DOWN(X_KP_0)); + } + return false; break; + + case AR_RT: + if(arrow_toggle == 1){ + SEND_STRING(SS_DOWN(X_RIGHT)); + } else { + SEND_STRING(SS_DOWN(X_KP_ENTER)); + } + return false; break; + } + } + if(!record->event.pressed){ + switch(keycode) { + case AR_UP: + if(arrow_toggle == 1){ + SEND_STRING(SS_UP(X_UP)); + } else { + SEND_STRING(SS_UP(X_KP_2)); + } + return false; break; + case AR_DN: + if(arrow_toggle == 1){ + SEND_STRING(SS_UP(X_DOWN)); + } else { + SEND_STRING(SS_UP(X_KP_DOT)); + } + return false; break; + case AR_LT: + if(arrow_toggle == 1){ + SEND_STRING(SS_UP(X_LEFT)); + } else { + SEND_STRING(SS_UP(X_KP_0)); + } + return false; break; + case AR_RT: + if(arrow_toggle == 1){ + SEND_STRING(SS_UP(X_RIGHT)); + } else { + SEND_STRING(SS_UP(X_KP_ENTER)); + } + return false; break; + } + } + return true; +}; \ No newline at end of file diff --git a/keyboards/prime_r/keymaps/rooski/readme.md b/keyboards/prime_r/keymaps/rooski/readme.md new file mode 100644 index 00000000..c61314ee --- /dev/null +++ b/keyboards/prime_r/keymaps/rooski/readme.md @@ -0,0 +1,3 @@ +# /u/rooski15 layout + +Changes include numpad codes, layer additions, and a toggle-able arrow cluster that is non layer dependant. \ No newline at end of file diff --git a/keyboards/prime_r/keymaps/rooski/rules.mk b/keyboards/prime_r/keymaps/rooski/rules.mk new file mode 100644 index 00000000..f8165476 --- /dev/null +++ b/keyboards/prime_r/keymaps/rooski/rules.mk @@ -0,0 +1,2 @@ + +COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/prime_r/prime_r.c b/keyboards/prime_r/prime_r.c new file mode 100644 index 00000000..845769da --- /dev/null +++ b/keyboards/prime_r/prime_r.c @@ -0,0 +1,43 @@ +/* Copyright 2018 Andrew Heaston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "prime_r.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/prime_r/prime_r.h b/keyboards/prime_r/prime_r.h new file mode 100644 index 00000000..f98b5e87 --- /dev/null +++ b/keyboards/prime_r/prime_r.h @@ -0,0 +1,35 @@ +/* Copyright 2018 Andrew Heaston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef PRIMER_H +#define PRIMER_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K402, K403, K404, K405, K407, K409, K410, K411, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, KC_NO, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414, K415 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/prime_r/readme.md b/keyboards/prime_r/readme.md new file mode 100644 index 00000000..7a77b207 --- /dev/null +++ b/keyboards/prime_r/readme.md @@ -0,0 +1,18 @@ +# Prime_R + +![Prime_R](https://i.imgur.com/ldOVlLG.jpg) + +A compact layout with the footprint of your typical 65% board, featuring a right mini-numpad. Produced by /u/holtenc at www.primekb.com + +[Additional resources here](https://www.primekb.com/pages/programming) + +Keyboard Maintainer: [Andrew Heaston](https://github.com/rooski15) +Hardware Supported: prime_r pcb, ATmega32U4 +Hardware Availability: [Prime_KB](https://www.primekb.com/) + +Make example for this keyboard (after setting up your build environment): + + make prime_r:default + +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/prime_r/rules.mk b/keyboards/prime_r/rules.mk new file mode 100644 index 00000000..0e7a4072 --- /dev/null +++ b/keyboards/prime_r/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= no \ No newline at end of file diff --git a/keyboards/s60_x/keymaps/default_rgb/keymap.c b/keyboards/s60_x/keymaps/default_rgb/keymap.c new file mode 100644 index 00000000..1c81e8ec --- /dev/null +++ b/keyboards/s60_x/keymaps/default_rgb/keymap.c @@ -0,0 +1,50 @@ +#include "s60_x.h" + +/* 0: Main layer +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: ANSI qwerty */ + KEYMAP(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_NO, KC_BSPC, \ + 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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT , \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL), + +/* 1: Fn layer +UG = Underglow = RGB Backlighting +BL = Backlighting = In-Switch LED +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│ │BLDEC│BLTOG│BLINC│▒▒▒▒▒│ │▒▒▒▒▒│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ +*/ + KEYMAP( + KC_GRV, 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; diff --git a/keyboards/s60_x/keymaps/default_rgb/readme.md b/keyboards/s60_x/keymaps/default_rgb/readme.md new file mode 100644 index 00000000..69cede56 --- /dev/null +++ b/keyboards/s60_x/keymaps/default_rgb/readme.md @@ -0,0 +1,27 @@ +### 1 Standard - ANSI +This is a variation of the default keymap with added RGB underglow and in-switch LED controls. + +#### 1.0 Default layer + ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ +#### 1.1 Fn layer + ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│ │BLDEC│BLTOG│BLINC│▒▒▒▒▒│ │▒▒▒▒▒│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ + └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ \ No newline at end of file diff --git a/keyboards/s60_x/keymaps/iso_rgb/keymap.c b/keyboards/s60_x/keymaps/iso_rgb/keymap.c new file mode 100644 index 00000000..62f6231f --- /dev/null +++ b/keyboards/s60_x/keymaps/iso_rgb/keymap.c @@ -0,0 +1,50 @@ +#include "s60_x.h" + +/* 0: Main layer +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NUHS │ENTER│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: ANSI qwerty */ + KEYMAP(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_NO, KC_BSPC, \ + 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_NO, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL), + +/* 1: Fn layer +UG = Underglow = RGB Backlighting +BL = Backlighting = In-Switch LED +┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │Left │Down │Right│ │ │ │ │ │ │ │ │ │ │█████│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│ │BLDEC│BLTOG│BLINC│▒▒▒▒▒│ │▒▒▒▒▒│ +├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ +│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ +└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ +*/ + KEYMAP( + KC_GRV, 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; diff --git a/keyboards/s60_x/keymaps/iso_rgb/readme.md b/keyboards/s60_x/keymaps/iso_rgb/readme.md new file mode 100644 index 00000000..d02498e6 --- /dev/null +++ b/keyboards/s60_x/keymaps/iso_rgb/readme.md @@ -0,0 +1,27 @@ +### 2 Standard - ISO +This is a variation of the default ISO keymap with added RGB Underglow and in-switch LED controls. + +#### 2.0 Default layer + ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NUHS │ENTER│█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ +#### 2.1 Fn layer + ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │Left │Down │Right│ │ │ │ │ │ │ │ │ │ │█████│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│ │BLDEC│BLTOG│BLINC│▒▒▒▒▒│ │▒▒▒▒▒│ + ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ + └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ diff --git a/keyboards/tada68/keymaps/trashcat/keymap.c b/keyboards/tada68/keymaps/trashcat/keymap.c new file mode 100644 index 00000000..79a14753 --- /dev/null +++ b/keyboards/tada68/keymaps/trashcat/keymap.c @@ -0,0 +1,113 @@ +#include "tada68.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _GM 2 +#define _GF 3 + +#define _______ KC_TRNS + +// Tap dance declarations (These must go above the keymaps) +enum { + TD_F1 = 0, + TD_F2, + TD_F3, + TD_F4, + TD_F5, + TD_F6, + TD_F7, + TD_F8, + TD_F9, + TD_F10, + TD_F11, + TD_F12, + TD_AE_FITCOMP, + TD_AE_IN, + TD_AE_OUT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bksp |Del | + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |FN| Alt|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + KC_ESC, TD(TD_F1), TD(TD_F2), TD(TD_F3), TD(TD_F4), TD(TD_F5), TD(TD_F6), TD(TD_F7), TD(TD_F8), TD(TD_F9), TD(TD_F10), TD(TD_F11), TD(TD_F12), KC_BSLS,KC_GRV, \ + 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,KC_DEL, \ + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(_FL),KC_RALT,KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| _GM |Ins | + * |----------------------------------------------------------------| + * | | |Up | | | | | | | | | | | |Hme | + * |----------------------------------------------------------------| + * | Caps |<- |Dn | ->| | | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |Prev|P/P|Next| + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + _______, 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_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \ + KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ + _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, \ + _______,_______,_______, TG(_GM), _______,_______,_______,KC_MPRV,KC_MPLY, KC_MNXT), + + /* Keymap _GL: Gaming Layer. Basically makes Caps Lock behave normally. I know there is a better way to do this but copy and paste was my friend + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bksp |Del | + * |----------------------------------------------------------------| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |FN| Alt|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_GM] = KEYMAP_ANSI( + KC_ESC,TD(TD_F1), TD(TD_F2), TD(TD_F3), TD(TD_F4), TD(TD_F5), TD(TD_F6), TD(TD_F7), TD(TD_F8), TD(TD_F9), TD(TD_F10), TD(TD_F11), TD(TD_F12), _______, KC_GRV, \ + 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,KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \ + KC_LCTL, KC_LGUI,KC_LALT, _______, MO(_FL),KC_RALT,KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT), + +}; + +// Tapdance definitions. Tap Dance F Keys. +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_F1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_F1), + [TD_F2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_F2), + [TD_F3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_F3), + [TD_F4] = ACTION_TAP_DANCE_DOUBLE(KC_4, KC_F4), + [TD_F5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_F5), + [TD_F6] = ACTION_TAP_DANCE_DOUBLE(KC_6, KC_F6), + [TD_F7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_F7), + [TD_F8] = ACTION_TAP_DANCE_DOUBLE(KC_8, KC_F8), + [TD_F9] = ACTION_TAP_DANCE_DOUBLE(KC_9, KC_F9), + [TD_F10] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_F10), + [TD_F11] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_F11), + [TD_F12] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_F12), + [TD_AE_FITCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, LALT(KC_SLSH)), + [TD_AE_IN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, LALT(KC_LBRC)), +[TD_AE_OUT] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, LALT(KC_RBRC)) +}; diff --git a/keyboards/tada68/keymaps/trashcat/readme.md b/keyboards/tada68/keymaps/trashcat/readme.md new file mode 100644 index 00000000..d8e37fa2 --- /dev/null +++ b/keyboards/tada68/keymaps/trashcat/readme.md @@ -0,0 +1,7 @@ +# Trashcat's Tada68 + +Just my simple layout for the Tada68. +Caps Lock behaves as LCtrl until switched to the Gaming Layer. I have a stupid reason for why I need caps lock at all but I won't get into it. +LCtrl is also LCtrl because I had no idea what else to put there. + +Tap Dance for the F Row.. i.e double tap 1 and get F1 instead. diff --git a/keyboards/tada68/keymaps/trashcat/rules.mk b/keyboards/tada68/keymaps/trashcat/rules.mk new file mode 100644 index 00000000..644b6a81 --- /dev/null +++ b/keyboards/tada68/keymaps/trashcat/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Tappa Dance Bitch +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/v60_type_r/info.json b/keyboards/v60_type_r/info.json new file mode 100644 index 00000000..e73cb02f --- /dev/null +++ b/keyboards/v60_type_r/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "V60 Type R", + "manufacturer": "KBParadise", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":14, "y":0, "w":2}, {"x":0.5, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":14, "y":1, "w":1.5}, {"x":0.75, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":14, "y":2, "w":2.25}, {"x":1.25, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":14, "y":3, "w":2.75}, {"x":0.25, "y":4, "w":1.25}, {"x":1.5, "y":4, "w":1.25}, {"x":2.75, "y":4, "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.25}, {"x":11.5, "y":4, "w":1.25}, {"x":12.75, "y":4, "w":1.25}, {"x":14, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c index ff334c03..c6f2c8d6 100644 --- a/keyboards/whitefox/matrix.c +++ b/keyboards/whitefox/matrix.c @@ -47,8 +47,9 @@ void matrix_init(void) palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, MATRIX_ROWS); + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + matrix_init_quantum(); } diff --git a/keyboards/xd60/keymaps/rooski/instructions.txt b/keyboards/xd60/keymaps/rooski/instructions.txt new file mode 100644 index 00000000..1486647d --- /dev/null +++ b/keyboards/xd60/keymaps/rooski/instructions.txt @@ -0,0 +1,2 @@ +cd c:/QMK +make xd60 / / / / / / / / \ No newline at end of file diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xd60/keymaps/rooski/keymap.c new file mode 100644 index 00000000..4b7b03e6 --- /dev/null +++ b/keyboards/xd60/keymaps/rooski/keymap.c @@ -0,0 +1,82 @@ +// XD60 Rev 2.0 + +#include "xd60.h" +#include "action_layer.h" +//#include "action_tapping.h" +#include "backlight.h" + +// Define tapping term +#define TAPPING_TERM 150 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +// Layer definitions~ +#define _BL 0 +#define _FL 1 +#define _LK 2 + +// RShift TapHold +#define RSTT MT(MOD_RSFT, KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * | Caps | A| S| D| F| G| H| J| K| L| ;| '| Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .|Shift| Up |Del | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Ctrl|Fn| LT| DN | RT | + * `-----------------------------------------------------------' + */ + // 0: Base Layer + [_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ + 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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, XXXXXXX, RSTT, KC_UP, KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + [_FL] = KEYMAP( + KC_GRV, 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_DEL, KC_DEL, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_LK), _______, KC_HOME, _______, KC_END), + + // 2: Lighting Keys + [_LK] = KEYMAP( + TO(_BL), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \ + RESET , KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, RGB_SAD, RGB_SAI, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, RGB_VAI, BL_STEP, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_BL), XXXXXXX, RGB_TOG, RGB_VAD, RGB_MOD), + +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + backlight_step(); + } + else { unregister_code(KC_RSFT); } + break; + } + + return MACRO_NONE; +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; \ No newline at end of file diff --git a/keyboards/xd75/keymaps/emilyh/config.h b/keyboards/xd75/keymaps/emilyh/config.h new file mode 100644 index 00000000..f52a97bb --- /dev/null +++ b/keyboards/xd75/keymaps/emilyh/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/xd75/keymaps/emilyh/keymap.c b/keyboards/xd75/keymaps/emilyh/keymap.c new file mode 100644 index 00000000..034bb55a --- /dev/null +++ b/keyboards/xd75/keymaps/emilyh/keymap.c @@ -0,0 +1,187 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "xd75.h" +#include "backlight.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define ___T___ KC_TRNS +#define XXXXXXX KC_NO + +// Layer shorthand +#define _QW 0 +#define _CM 1 +#define _DV 2 +#define _LW 3 +#define _RS 4 +#define _FN 5 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = { /* QWERTY */ + { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_PSLS, KC_PAST, KC_PPLS }, + { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9 }, + { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6 }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, KC_P1, KC_P2, KC_P3 }, + { KC_LCTL, M(0), KC_LGUI, KC_LALT, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_SLSH, KC_LEFT, KC_DOWN, KC_RIGHT,KC_P0, KC_PDOT, KC_PENT }, + }, + +/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_CM] = { /* COLEMAK */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, + { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* DVORAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_DV] = { /* DVORAK */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, + { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* LOWERED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = { /* LOWERED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS }, + { RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = { /* RAISED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| + * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = { /* FUNCTION */ + { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, + { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, + { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D }, + { RESET , _______, DF(_QW), DF(_CM), DF(_DV), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, + }, +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/emilyh/readme.md b/keyboards/xd75/keymaps/emilyh/readme.md new file mode 100644 index 00000000..743aae5b --- /dev/null +++ b/keyboards/xd75/keymaps/emilyh/readme.md @@ -0,0 +1 @@ +# Modified keymap for xd75 with numpad on right diff --git a/keyboards/xd75/keymaps/emilyh/rules.mk b/keyboards/xd75/keymaps/emilyh/rules.mk new file mode 100644 index 00000000..d4e08cfb --- /dev/null +++ b/keyboards/xd75/keymaps/emilyh/rules.mk @@ -0,0 +1,18 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h new file mode 100644 index 00000000..f3f893e2 --- /dev/null +++ b/keyboards/xmmx/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER farmakon +#define PRODUCT "XMMX" +#define DESCRIPTION "XMMX" + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B3, B2, B1, E6, B7, C7, C6, D4, D6, D7, B4, D0, D1, F7, D2, D3, D5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/xmmx/keymaps/default/keymap.c b/keyboards/xmmx/keymaps/default/keymap.c new file mode 100644 index 00000000..6b0a1143 --- /dev/null +++ b/keyboards/xmmx/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, KC_NO, KC_NO, KC_NO, \ + KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_NO, KC_UP, KC_NO, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/toad/keymap.c b/keyboards/xmmx/keymaps/toad/keymap.c new file mode 100644 index 00000000..c13dc8f6 --- /dev/null +++ b/keyboards/xmmx/keymaps/toad/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + TOAD_KEYMAP( + KC_ESC, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ + 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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c b/keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c new file mode 100644 index 00000000..5e61dfff --- /dev/null +++ b/keyboards/xmmx/keymaps/toad_ansi_wk/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + TOAD_KEYMAP_ANSI_WK( + KC_ESC, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, \ + KC_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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c b/keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c new file mode 100644 index 00000000..7778b065 --- /dev/null +++ b/keyboards/xmmx/keymaps/toad_ansi_wkl/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + TOAD_KEYMAP_ANSI_WKL( + KC_ESC, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, \ + KC_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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/toad_iso_wk/keymap.c b/keyboards/xmmx/keymaps/toad_iso_wk/keymap.c new file mode 100644 index 00000000..c51ff862 --- /dev/null +++ b/keyboards/xmmx/keymaps/toad_iso_wk/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + TOAD_KEYMAP_ISO_WK( + KC_ESC, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, \ + KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c b/keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c new file mode 100644 index 00000000..efcebc71 --- /dev/null +++ b/keyboards/xmmx/keymaps/toad_iso_wkl/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + TOAD_KEYMAP_ISO_WKL( + KC_ESC, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, \ + KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c b/keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c new file mode 100644 index 00000000..20d55c1f --- /dev/null +++ b/keyboards/xmmx/keymaps/xmmx_ansi_wk/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP_ANSI_WK( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c b/keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c new file mode 100644 index 00000000..3c8ba436 --- /dev/null +++ b/keyboards/xmmx/keymaps/xmmx_ansi_wkl/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP_ANSI_WKL( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c b/keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c new file mode 100644 index 00000000..ee68253c --- /dev/null +++ b/keyboards/xmmx/keymaps/xmmx_iso_wk/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP_ISO_WK( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c b/keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c new file mode 100644 index 00000000..c27914e4 --- /dev/null +++ b/keyboards/xmmx/keymaps/xmmx_iso_wkl/keymap.c @@ -0,0 +1,30 @@ +#include "xmmx.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP_ISO_WKL( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_BSPC, KC_INS,KC_HOME, KC_PGUP, \ + 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) +}; + +void led_set_user(uint8_t usb_led) { + + //LED1 + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 6); PORTB &= ~(1 << 6); + } else { + DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); + } + + //LED2 + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } +} diff --git a/keyboards/xmmx/readme.md b/keyboards/xmmx/readme.md new file mode 100644 index 00000000..cf16231e --- /dev/null +++ b/keyboards/xmmx/readme.md @@ -0,0 +1,20 @@ +XMMX and Toad +======== + +XMMX: Tenkeyless Mechanical Keyboard PCB designed to fit Filco Majestouch TKL and Cooler Master Quickfire Rapid cases +Toad: 70% Mechanical Keyboard PCB. + +XMMX schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/XMMX-0447d28c1e4644b88fd04905d983684d) +Toad schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/70_Keyboard-d4f6baf4792d4ada9c0571fa3713e461) + +For more informations on the XMMX please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=93422.0) +For more informations on the Toad please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=91388.0) + +Make examples for these keyboards (after setting up your build environment): + + make xmmx:default + + make xmmx:toad + + +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/xmmx/rules.mk b/keyboards/xmmx/rules.mk new file mode 100644 index 00000000..ee87c6e8 --- /dev/null +++ b/keyboards/xmmx/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= no \ No newline at end of file diff --git a/keyboards/xmmx/xmmx.c b/keyboards/xmmx/xmmx.c new file mode 100644 index 00000000..399ae4eb --- /dev/null +++ b/keyboards/xmmx/xmmx.c @@ -0,0 +1 @@ +#include "xmmx.h" diff --git a/keyboards/xmmx/xmmx.h b/keyboards/xmmx/xmmx.h new file mode 100644 index 00000000..ad6ae301 --- /dev/null +++ b/keyboards/xmmx/xmmx.h @@ -0,0 +1,177 @@ +#ifndef XMMX +#define XMMX + +#include "quantum.h" + +// 80% keyboard: default - all keys +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, \ + K500, K501, K502, K507, K510, K511, K512, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416 }, \ + { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516 } \ +} + +// 80% keyboard: ANSI Winkey +#define KEYMAP_ANSI_WK( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K502, K507, K510, K511, K512, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313, KC_NO,KC_NO,KC_NO}, \ + { K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \ + { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516 } \ +} + +// 80% keyboard: ANSI Winkeyless +#define KEYMAP_ANSI_WKL( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K502, K507, K511, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313, KC_NO,KC_NO,KC_NO}, \ + { K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \ + { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513, K514, K515, K516 } \ +} + +// 80% keyboard: ISO Winkey +#define KEYMAP_ISO_WK( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K502, K507, K510, K511, K512, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO,K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO,KC_NO,KC_NO}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \ + { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513, K514, K515, K516 } \ +} + +// 80% keyboard: ISO Winkeyless +#define KEYMAP_ISO_WKL( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K502, K507, K511, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO,K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO,KC_NO,KC_NO}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO,KC_NO,K415, KC_NO}, \ + { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513, K514, K515, K516 } \ +} + + +// 70% keyboard: default - all keys +#define TOAD_KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K013, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K507, K510, K511, K512, K513 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413 }, \ + { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \ +} + +// 70% keyboard: ANSI Winkey +#define TOAD_KEYMAP_ANSI_WK( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ + K500, K501, K502, K507, K510, K511, K512, K513 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313 }, \ + { K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ + { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \ +} + +// 70% keyboard: ANSI Winkeyless +#define TOAD_KEYMAP_ANSI_WKL( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ + K500, K502, K507, K511, K513 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO,K313 }, \ + { K400, KC_NO,K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ + { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513 } \ +} + +// 70% keyboard: ISO Winkey +#define TOAD_KEYMAP_ISO_WK( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ + K500, K501, K502, K507, K510, K511, K512, K513 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ + { K500, K501, K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,K510, K511, K512, K513 } \ +} + +// 70% keyboard: ISO Winkeyless +#define TOAD_KEYMAP_ISO_WKL( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K013, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \ + K500, K502, K507, K511, K513 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO}, \ + { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513 } \ +} + +#endif diff --git a/message.mk b/message.mk index f5fb751e..1401698d 100644 --- a/message.mk +++ b/message.mk @@ -58,7 +58,7 @@ MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ Some git sub-modules are out of date or modified, please consider runnning:$(BOLD)\n\ make git-submodule\n\ You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\ - or if you have modified the ChibiOS libraries yourself. \n\n + or if you have modified the ChibiOS libraries yourself. \n\n$(NO_COLOR) MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) define GENERATE_MSG_MAKE_KB diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index 5ad0c86e..6f8b5e30 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -18,7 +18,6 @@ #include "ch.h" #include "hal.h" -#include #include #include "print.h" #include "keymap.h" @@ -78,23 +77,48 @@ bool glissando = true; #endif float startup_song[][2] = STARTUP_SONG; -static void gpt_cb6(GPTDriver *gptp); -static void gpt_cb7(GPTDriver *gptp); static void gpt_cb8(GPTDriver *gptp); +#define DAC_BUFFER_SIZE 360 + +#define START_CHANNEL_1() gptStart(&GPTD6, &gpt6cfg1); \ + gptStartContinuous(&GPTD6, 2U) +#define START_CHANNEL_2() gptStart(&GPTD7, &gpt7cfg1); \ + gptStartContinuous(&GPTD7, 2U) +#define STOP_CHANNEL_1() gptStopTimer(&GPTD6) +#define STOP_CHANNEL_2() gptStopTimer(&GPTD7) +#define RESTART_CHANNEL_1() STOP_CHANNEL_1(); \ + START_CHANNEL_1() +#define RESTART_CHANNEL_2() STOP_CHANNEL_1(); \ + START_CHANNEL_1() +#define UPDATE_CHANNEL_1_FREQ(freq) gpt6cfg1.frequency = freq * DAC_BUFFER_SIZE; \ + RESTART_CHANNEL_1() +#define UPDATE_CHANNEL_2_FREQ(freq) gpt7cfg1.frequency = freq * DAC_BUFFER_SIZE; \ + RESTART_CHANNEL_2() +#define GET_CHANNEL_1_FREQ gpt6cfg1.frequency +#define GET_CHANNEL_2_FREQ gpt7cfg1.frequency + + /* * GPT6 configuration. */ +// static const GPTConfig gpt6cfg1 = { +// .frequency = 1000000U, +// .callback = NULL, +// .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ +// .dier = 0U +// }; + GPTConfig gpt6cfg1 = { - .frequency = 440, - .callback = gpt_cb6, + .frequency = 440U*DAC_BUFFER_SIZE, + .callback = NULL, .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ .dier = 0U }; GPTConfig gpt7cfg1 = { - .frequency = 440, - .callback = gpt_cb7, + .frequency = 440U*DAC_BUFFER_SIZE, + .callback = NULL, .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ .dier = 0U }; @@ -106,15 +130,122 @@ GPTConfig gpt8cfg1 = { .dier = 0U }; -static void gpt_cb6(GPTDriver *gptp) { - palTogglePad(GPIOA, 4); + +/* + * DAC test buffer (sine wave). + */ +// static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = { +// 2047, 2082, 2118, 2154, 2189, 2225, 2260, 2296, 2331, 2367, 2402, 2437, +// 2472, 2507, 2542, 2576, 2611, 2645, 2679, 2713, 2747, 2780, 2813, 2846, +// 2879, 2912, 2944, 2976, 3008, 3039, 3070, 3101, 3131, 3161, 3191, 3221, +// 3250, 3278, 3307, 3335, 3362, 3389, 3416, 3443, 3468, 3494, 3519, 3544, +// 3568, 3591, 3615, 3637, 3660, 3681, 3703, 3723, 3744, 3763, 3782, 3801, +// 3819, 3837, 3854, 3870, 3886, 3902, 3917, 3931, 3944, 3958, 3970, 3982, +// 3993, 4004, 4014, 4024, 4033, 4041, 4049, 4056, 4062, 4068, 4074, 4078, +// 4082, 4086, 4089, 4091, 4092, 4093, 4094, 4093, 4092, 4091, 4089, 4086, +// 4082, 4078, 4074, 4068, 4062, 4056, 4049, 4041, 4033, 4024, 4014, 4004, +// 3993, 3982, 3970, 3958, 3944, 3931, 3917, 3902, 3886, 3870, 3854, 3837, +// 3819, 3801, 3782, 3763, 3744, 3723, 3703, 3681, 3660, 3637, 3615, 3591, +// 3568, 3544, 3519, 3494, 3468, 3443, 3416, 3389, 3362, 3335, 3307, 3278, +// 3250, 3221, 3191, 3161, 3131, 3101, 3070, 3039, 3008, 2976, 2944, 2912, +// 2879, 2846, 2813, 2780, 2747, 2713, 2679, 2645, 2611, 2576, 2542, 2507, +// 2472, 2437, 2402, 2367, 2331, 2296, 2260, 2225, 2189, 2154, 2118, 2082, +// 2047, 2012, 1976, 1940, 1905, 1869, 1834, 1798, 1763, 1727, 1692, 1657, +// 1622, 1587, 1552, 1518, 1483, 1449, 1415, 1381, 1347, 1314, 1281, 1248, +// 1215, 1182, 1150, 1118, 1086, 1055, 1024, 993, 963, 933, 903, 873, +// 844, 816, 787, 759, 732, 705, 678, 651, 626, 600, 575, 550, +// 526, 503, 479, 457, 434, 413, 391, 371, 350, 331, 312, 293, +// 275, 257, 240, 224, 208, 192, 177, 163, 150, 136, 124, 112, +// 101, 90, 80, 70, 61, 53, 45, 38, 32, 26, 20, 16, +// 12, 8, 5, 3, 2, 1, 0, 1, 2, 3, 5, 8, +// 12, 16, 20, 26, 32, 38, 45, 53, 61, 70, 80, 90, +// 101, 112, 124, 136, 150, 163, 177, 192, 208, 224, 240, 257, +// 275, 293, 312, 331, 350, 371, 391, 413, 434, 457, 479, 503, +// 526, 550, 575, 600, 626, 651, 678, 705, 732, 759, 787, 816, +// 844, 873, 903, 933, 963, 993, 1024, 1055, 1086, 1118, 1150, 1182, +// 1215, 1248, 1281, 1314, 1347, 1381, 1415, 1449, 1483, 1518, 1552, 1587, +// 1622, 1657, 1692, 1727, 1763, 1798, 1834, 1869, 1905, 1940, 1976, 2012 +// }; + +// squarewave +static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = { + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* + * DAC streaming callback. + */ +size_t nx = 0, ny = 0, nz = 0; +static void end_cb1(DACDriver *dacp, const dacsample_t *buffer, size_t n) { + + (void)dacp; + + nz++; + if (dac_buffer == buffer) { + nx += n; + } + else { + ny += n; + } + + if ((nz % 1000) == 0) { + // palTogglePad(GPIOD, GPIOD_LED3); + } } +/* + * DAC error callback. + */ +static void error_cb1(DACDriver *dacp, dacerror_t err) { -static void gpt_cb7(GPTDriver *gptp) { - palTogglePad(GPIOA, 5); + (void)dacp; + (void)err; + + chSysHalt("DAC failure"); } +static const DACConfig dac1cfg1 = { + .init = 2047U, + .datamode = DAC_DHRM_12BIT_RIGHT +}; + +static const DACConversionGroup dacgrpcfg1 = { + .num_channels = 1U, + .end_cb = end_cb1, + .error_cb = error_cb1, + .trigger = DAC_TRG(0) +}; + void audio_init() { @@ -129,8 +260,27 @@ void audio_init() // audio_config.raw = eeconfig_read_audio(); audio_config.enable = true; - palSetPadMode(GPIOA, 4, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); + /* + * Starting DAC1 driver, setting up the output pin as analog as suggested + * by the Reference Manual. + */ + palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG); + palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG); + dacStart(&DACD1, &dac1cfg1); + + /* + * Starting GPT6 driver, it is used for triggering the DAC. + */ + START_CHANNEL_1(); + START_CHANNEL_2(); + + /* + * Starting a continuous conversion. + */ + dacStartConversion(&DACD1, &dacgrpcfg1, + (dacsample_t *)dac_buffer, DAC_BUFFER_SIZE); + // gptStartContinuous(&GPTD6, 2U); + audio_initialized = true; @@ -194,8 +344,8 @@ void stop_note(float freq) voice_place = 0; } if (voices == 0) { - gptStopTimer(&GPTD6); - gptStopTimer(&GPTD7); + STOP_CHANNEL_1(); + STOP_CHANNEL_2(); gptStopTimer(&GPTD8); frequency = 0; frequency_alt = 0; @@ -225,20 +375,6 @@ float vibrato(float average_freq) { #endif -static void restart_gpt6(void) { - // gptStopTimer(&GPTD6); - - gptStart(&GPTD6, &gpt6cfg1); - gptStartContinuous(&GPTD6, 2U); -} - -static void restart_gpt7(void) { - // gptStopTimer(&GPTD7); - - gptStart(&GPTD7, &gpt7cfg1); - gptStartContinuous(&GPTD7, 2U); -} - static void gpt_cb8(GPTDriver *gptp) { float freq; @@ -281,13 +417,12 @@ static void gpt_cb8(GPTDriver *gptp) { freq_alt = 30.52; } - if (gpt6cfg1.frequency != (uint16_t)freq_alt) { - gpt6cfg1.frequency = freq_alt; - restart_gpt6(); + if (GET_CHANNEL_1_FREQ != (uint16_t)freq_alt) { + UPDATE_CHANNEL_1_FREQ(freq_alt); } //note_timbre; } else { - // gptStopTimer(&GPTD6); + STOP_CHANNEL_1(); } if (polyphony_rate > 0) { @@ -343,9 +478,8 @@ static void gpt_cb8(GPTDriver *gptp) { } - if (gpt7cfg1.frequency != (uint16_t)freq) { - gpt7cfg1.frequency = freq; - restart_gpt7(); + if (GET_CHANNEL_2_FREQ != (uint16_t)freq) { + UPDATE_CHANNEL_2_FREQ(freq); } //note_timbre; } else { @@ -371,11 +505,9 @@ static void gpt_cb8(GPTDriver *gptp) { freq = voice_envelope(freq); - if (gpt6cfg1.frequency != (uint16_t)freq) { - gpt6cfg1.frequency = freq; - restart_gpt6(); - gpt7cfg1.frequency = freq; - restart_gpt7(); + if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { + UPDATE_CHANNEL_1_FREQ(freq); + UPDATE_CHANNEL_2_FREQ(freq); } //note_timbre; } else { @@ -385,7 +517,7 @@ static void gpt_cb8(GPTDriver *gptp) { note_position++; bool end_of_note = false; - if (gpt6cfg1.frequency > 0) { + if (GET_CHANNEL_1_FREQ > 0) { if (!note_resting) end_of_note = (note_position >= (note_length*16 - 1)); else @@ -400,8 +532,8 @@ static void gpt_cb8(GPTDriver *gptp) { if (notes_repeat) { current_note = 0; } else { - gptStopTimer(&GPTD6); - gptStopTimer(&GPTD7); + STOP_CHANNEL_1(); + STOP_CHANNEL_2(); // gptStopTimer(&GPTD8); playing_notes = false; return; @@ -493,8 +625,8 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat) gptStart(&GPTD8, &gpt8cfg1); gptStartContinuous(&GPTD8, 2U); - restart_gpt6(); - restart_gpt7(); + RESTART_CHANNEL_1(); + RESTART_CHANNEL_2(); } } diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index 647b6956..065608cc 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -53,127 +53,127 @@ // Note Timbre // Changes how the notes sound -#define TIMBRE_12 0.125 -#define TIMBRE_25 0.250 -#define TIMBRE_50 0.500 -#define TIMBRE_75 0.750 +#define TIMBRE_12 0.125f +#define TIMBRE_25 0.250f +#define TIMBRE_50 0.500f +#define TIMBRE_75 0.750f #define TIMBRE_DEFAULT TIMBRE_50 // Notes - # = Octave -#define NOTE_REST 0.00 +#define NOTE_REST 0.00f /* These notes are currently bugged -#define NOTE_C0 16.35 -#define NOTE_CS0 17.32 -#define NOTE_D0 18.35 -#define NOTE_DS0 19.45 -#define NOTE_E0 20.60 -#define NOTE_F0 21.83 -#define NOTE_FS0 23.12 -#define NOTE_G0 24.50 -#define NOTE_GS0 25.96 -#define NOTE_A0 27.50 -#define NOTE_AS0 29.14 -#define NOTE_B0 30.87 -#define NOTE_C1 32.70 -#define NOTE_CS1 34.65 -#define NOTE_D1 36.71 -#define NOTE_DS1 38.89 -#define NOTE_E1 41.20 -#define NOTE_F1 43.65 -#define NOTE_FS1 46.25 -#define NOTE_G1 49.00 -#define NOTE_GS1 51.91 -#define NOTE_A1 55.00 -#define NOTE_AS1 58.27 +#define NOTE_C0 16.35f +#define NOTE_CS0 17.32f +#define NOTE_D0 18.35f +#define NOTE_DS0 19.45f +#define NOTE_E0 20.60f +#define NOTE_F0 21.83f +#define NOTE_FS0 23.12f +#define NOTE_G0 24.50f +#define NOTE_GS0 25.96f +#define NOTE_A0 27.50f +#define NOTE_AS0 29.14f +#define NOTE_B0 30.87f +#define NOTE_C1 32.70f +#define NOTE_CS1 34.65f +#define NOTE_D1 36.71f +#define NOTE_DS1 38.89f +#define NOTE_E1 41.20f +#define NOTE_F1 43.65f +#define NOTE_FS1 46.25f +#define NOTE_G1 49.00f +#define NOTE_GS1 51.91f +#define NOTE_A1 55.00f +#define NOTE_AS1 58.27f */ -#define NOTE_B1 61.74 -#define NOTE_C2 65.41 -#define NOTE_CS2 69.30 -#define NOTE_D2 73.42 -#define NOTE_DS2 77.78 -#define NOTE_E2 82.41 -#define NOTE_F2 87.31 -#define NOTE_FS2 92.50 -#define NOTE_G2 98.00 -#define NOTE_GS2 103.83 -#define NOTE_A2 110.00 -#define NOTE_AS2 116.54 -#define NOTE_B2 123.47 -#define NOTE_C3 130.81 -#define NOTE_CS3 138.59 -#define NOTE_D3 146.83 -#define NOTE_DS3 155.56 -#define NOTE_E3 164.81 -#define NOTE_F3 174.61 -#define NOTE_FS3 185.00 -#define NOTE_G3 196.00 -#define NOTE_GS3 207.65 -#define NOTE_A3 220.00 -#define NOTE_AS3 233.08 -#define NOTE_B3 246.94 -#define NOTE_C4 261.63 -#define NOTE_CS4 277.18 -#define NOTE_D4 293.66 -#define NOTE_DS4 311.13 -#define NOTE_E4 329.63 -#define NOTE_F4 349.23 -#define NOTE_FS4 369.99 -#define NOTE_G4 392.00 -#define NOTE_GS4 415.30 -#define NOTE_A4 440.00 -#define NOTE_AS4 466.16 -#define NOTE_B4 493.88 -#define NOTE_C5 523.25 -#define NOTE_CS5 554.37 -#define NOTE_D5 587.33 -#define NOTE_DS5 622.25 -#define NOTE_E5 659.26 -#define NOTE_F5 698.46 -#define NOTE_FS5 739.99 -#define NOTE_G5 783.99 -#define NOTE_GS5 830.61 -#define NOTE_A5 880.00 -#define NOTE_AS5 932.33 -#define NOTE_B5 987.77 -#define NOTE_C6 1046.50 -#define NOTE_CS6 1108.73 -#define NOTE_D6 1174.66 -#define NOTE_DS6 1244.51 -#define NOTE_E6 1318.51 -#define NOTE_F6 1396.91 -#define NOTE_FS6 1479.98 -#define NOTE_G6 1567.98 -#define NOTE_GS6 1661.22 -#define NOTE_A6 1760.00 -#define NOTE_AS6 1864.66 -#define NOTE_B6 1975.53 -#define NOTE_C7 2093.00 -#define NOTE_CS7 2217.46 -#define NOTE_D7 2349.32 -#define NOTE_DS7 2489.02 -#define NOTE_E7 2637.02 -#define NOTE_F7 2793.83 -#define NOTE_FS7 2959.96 -#define NOTE_G7 3135.96 -#define NOTE_GS7 3322.44 -#define NOTE_A7 3520.00 -#define NOTE_AS7 3729.31 -#define NOTE_B7 3951.07 -#define NOTE_C8 4186.01 -#define NOTE_CS8 4434.92 -#define NOTE_D8 4698.64 -#define NOTE_DS8 4978.03 -#define NOTE_E8 5274.04 -#define NOTE_F8 5587.65 -#define NOTE_FS8 5919.91 -#define NOTE_G8 6271.93 -#define NOTE_GS8 6644.88 -#define NOTE_A8 7040.00 -#define NOTE_AS8 7458.62 -#define NOTE_B8 7902.13 +#define NOTE_B1 61.74f +#define NOTE_C2 65.41f +#define NOTE_CS2 69.30f +#define NOTE_D2 73.42f +#define NOTE_DS2 77.78f +#define NOTE_E2 82.41f +#define NOTE_F2 87.31f +#define NOTE_FS2 92.50f +#define NOTE_G2 98.00f +#define NOTE_GS2 103.83f +#define NOTE_A2 110.00f +#define NOTE_AS2 116.54f +#define NOTE_B2 123.47f +#define NOTE_C3 130.81f +#define NOTE_CS3 138.59f +#define NOTE_D3 146.83f +#define NOTE_DS3 155.56f +#define NOTE_E3 164.81f +#define NOTE_F3 174.61f +#define NOTE_FS3 185.00f +#define NOTE_G3 196.00f +#define NOTE_GS3 207.65f +#define NOTE_A3 220.00f +#define NOTE_AS3 233.08f +#define NOTE_B3 246.94f +#define NOTE_C4 261.63f +#define NOTE_CS4 277.18f +#define NOTE_D4 293.66f +#define NOTE_DS4 311.13f +#define NOTE_E4 329.63f +#define NOTE_F4 349.23f +#define NOTE_FS4 369.99f +#define NOTE_G4 392.00f +#define NOTE_GS4 415.30f +#define NOTE_A4 440.00f +#define NOTE_AS4 466.16f +#define NOTE_B4 493.88f +#define NOTE_C5 523.25f +#define NOTE_CS5 554.37f +#define NOTE_D5 587.33f +#define NOTE_DS5 622.25f +#define NOTE_E5 659.26f +#define NOTE_F5 698.46f +#define NOTE_FS5 739.99f +#define NOTE_G5 783.99f +#define NOTE_GS5 830.61f +#define NOTE_A5 880.00f +#define NOTE_AS5 932.33f +#define NOTE_B5 987.77f +#define NOTE_C6 1046.50f +#define NOTE_CS6 1108.73f +#define NOTE_D6 1174.66f +#define NOTE_DS6 1244.51f +#define NOTE_E6 1318.51f +#define NOTE_F6 1396.91f +#define NOTE_FS6 1479.98f +#define NOTE_G6 1567.98f +#define NOTE_GS6 1661.22f +#define NOTE_A6 1760.00f +#define NOTE_AS6 1864.66f +#define NOTE_B6 1975.53f +#define NOTE_C7 2093.00f +#define NOTE_CS7 2217.46f +#define NOTE_D7 2349.32f +#define NOTE_DS7 2489.02f +#define NOTE_E7 2637.02f +#define NOTE_F7 2793.83f +#define NOTE_FS7 2959.96f +#define NOTE_G7 3135.96f +#define NOTE_GS7 3322.44f +#define NOTE_A7 3520.00f +#define NOTE_AS7 3729.31f +#define NOTE_B7 3951.07f +#define NOTE_C8 4186.01f +#define NOTE_CS8 4434.92f +#define NOTE_D8 4698.64f +#define NOTE_DS8 4978.03f +#define NOTE_E8 5274.04f +#define NOTE_F8 5587.65f +#define NOTE_FS8 5919.91f +#define NOTE_G8 6271.93f +#define NOTE_GS8 6644.88f +#define NOTE_A8 7040.00f +#define NOTE_AS8 7458.62f +#define NOTE_B8 7902.13f // Flat Aliases #define NOTE_DF0 NOTE_CS0 diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 091f59e7..4018f817 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -53,6 +53,24 @@ E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \ E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), +#define CLUEBOARD_SOUND \ + HD_NOTE(_C3), HD_NOTE(_D3), HD_NOTE(_E3), HD_NOTE(_F3), HD_NOTE(_G3), HD_NOTE(_A4), HD_NOTE(_B4), HD_NOTE(_C4) +/* + HD_NOTE(_G3), HD_NOTE(_E3), HD_NOTE(_C3), \ + Q__NOTE(_E3), Q__NOTE(_C3), Q__NOTE(_G3), \ + Q__NOTE(_E3) +*/ +/* + HD_NOTE(_C3), HD_NOTE(_G3), HD_NOTE(_E3), \ + Q__NOTE(_G3), Q__NOTE(_E3), Q__NOTE(_G3), \ + Q__NOTE(_F3) +*/ + +#define BASKET_CASE \ + QD_NOTE(_G3), E__NOTE(_F3), E__NOTE(_E3), Q__NOTE(_F3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \ + Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \ + Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), E__NOTE(_A4), E__NOTE(_C4), QD_NOTE(_B4), HD_NOTE(_B4) + #define STARTUP_SOUND \ E__NOTE(_E6), \ E__NOTE(_A6), \ diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index f1f28e01..f196a9cb 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -79,6 +79,7 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti return; action->state.finished = true; add_mods(action->state.oneshot_mods); + add_weak_mods(action->state.weak_mods); send_keyboard_report(); _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); } @@ -87,6 +88,7 @@ static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *act { _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); del_mods(action->state.oneshot_mods); + del_weak_mods(action->state.weak_mods); send_keyboard_report(); } @@ -110,6 +112,8 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { action->state.count++; action->state.timer = timer_read(); action->state.oneshot_mods = get_oneshot_mods(); + action->state.weak_mods = get_mods(); + action->state.weak_mods |= get_weak_mods(); process_tap_dance_action_on_each_tap (action); if (last_td && last_td != keycode) { diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 37a27c53..ab20ea04 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -25,6 +25,7 @@ typedef struct { uint8_t count; uint8_t oneshot_mods; + uint8_t weak_mods; uint16_t keycode; uint16_t timer; bool interrupted; diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index c083f6b7..30d4fe26 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -173,10 +173,10 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ else \ ls /dev/tty* > /tmp/1; \ - echo "Detecting USB port, reset your controller now.\c"; \ + echo -e "Detecting USB port, reset your controller now.\c"; \ while [ -z $$USB ]; do \ sleep 1; \ - echo ".\c"; \ + echo -e ".\c"; \ ls /dev/tty* > /tmp/2; \ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ done; \ diff --git a/users/gordon/gordon.c b/users/gordon/gordon.c new file mode 100644 index 00000000..056012a2 --- /dev/null +++ b/users/gordon/gordon.c @@ -0,0 +1,275 @@ +#include "gordon.h" +#include "quantum.h" +#include "action.h" +#include "process_keycode/process_tap_dance.h" + +#if (__has_include("secret.h")) +#include "secret.h" +#else +const char secret[][64] = { + "test1", + "test2", + "test3", + "test4", + "test5" +}; +#endif + + + + +void register_hyper (void) { //Helper function to invoke Hyper + register_code (KC_LSFT); + register_code (KC_LCTL); + register_code (KC_LALT); + register_code (KC_LGUI); +} +void unregister_hyper (void) { //Helper function to invoke Hyper + unregister_code (KC_LSFT); + unregister_code (KC_LCTL); + unregister_code (KC_LALT); + unregister_code (KC_LGUI); +} + +void register_ctrl_a (void) { + register_code(KC_LCTL); + register_code(KC_A); +} + +void unregister_ctrl_a (void) { + unregister_code(KC_LCTL); + unregister_code(KC_A); +} + +void register_alt_f7 (void) { + register_code (KC_LALT); + register_code (KC_F7); +} + +void unregister_alt_f7 (void) { + unregister_code (KC_LALT); + unregister_code (KC_F7); +} + +void register_shift_f6 (void) { + register_code (KC_LSFT); + register_code (KC_F6); +} + +void unregister_shift_f6 (void) { + unregister_code (KC_LSFT); + unregister_code (KC_F6); +} + +void register_ctrl_shift (void) { + register_code (KC_LSFT); + register_code (KC_LCTRL); +} + +void unregister_ctrl_shift (void) { + unregister_code (KC_LSFT); + unregister_code (KC_LCTRL); +} + +void register_alt_shift (void) { + register_code (KC_LSFT); + register_code (KC_LALT); +} + +void unregister_alt_shift (void) { + unregister_code (KC_LSFT); + unregister_code (KC_LALT); +} + +// To activate SINGLE_HOLD, you will need to hold for 200ms first. +// This tap dance favors keys that are used frequently in typing like 'f' +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP + if (state->interrupted) { + // if (!state->pressed) return SINGLE_TAP; + //need "permissive hold" here. + // else return SINsGLE_HOLD; + //If the interrupting key is released before the tap-dance key, then it is a single HOLD + //However, if the tap-dance key is released first, then it is a single TAP + //But how to get access to the state of the interrupting key???? + return SINGLE_TAP; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; + else if (state->count == 3) return TRIPLE_HOLD; + else return 8; //magic number. At some point this method will expand to work for more presses +} + +//This works well if you want this key to work as a "fast modifier". It favors being held over being tapped. +int hold_cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted) { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if (state->count == 3) { + if (!state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //magic number. At some point this method will expand to work for more presses +} + + +static xtap htap_state = { + .is_press_action = true, + .state = 0 +}; + +void h_finished (qk_tap_dance_state_t *state, void *user_data) { + htap_state.state = cur_dance(state); + switch (htap_state.state) { + case SINGLE_TAP: register_code(KC_H); break; + case SINGLE_HOLD: layer_on(8); register_code(KC_LALT); break; + case DOUBLE_TAP: layer_invert(8); register_code(KC_LALT); break; + // case DOUBLE_HOLD: register_code(KC_LALT); + case DOUBLE_SINGLE_TAP: register_code(KC_H);unregister_code(KC_H);register_code(KC_H); + } +} + +void h_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (htap_state.state) { + case SINGLE_TAP: unregister_code(KC_H); break; + case SINGLE_HOLD: layer_off(8); unregister_code(KC_LALT); break; + case DOUBLE_TAP: unregister_code(KC_LALT);break; + // case DOUBLE_HOLD: unregister_code(KC_LALT); + case DOUBLE_SINGLE_TAP: unregister_code(KC_H); + } + htap_state.state = 0; +} + + +/**************** QUAD FUNCTION FOR TAB ****************/ +// TAB, ALT + SHIFT, TAB TAB, CTRL + SHIFT +static xtap tab_state = { + .is_press_action = true, + .state = 0 +}; + +void tab_finished (qk_tap_dance_state_t *state, void *user_data) { + tab_state.state = cur_dance(state); + switch (tab_state.state) { + case SINGLE_TAP: register_code(KC_TAB); break; //send tab on single press + case SINGLE_HOLD: register_ctrl_shift(); break; + case DOUBLE_HOLD: register_alt_shift(); break; //alt shift on single hold + case DOUBLE_TAP: register_code(KC_TAB); unregister_code(KC_TAB); register_code(KC_TAB); break; //tab tab + case TRIPLE_TAP: register_code(KC_LSHIFT) ;register_code(KC_ESC); break; + case TRIPLE_HOLD: register_code(KC_LSHIFT); register_code(KC_LGUI); break; + } +} + +void tab_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (tab_state.state) { + case SINGLE_TAP: unregister_code(KC_TAB); break; //unregister tab + case DOUBLE_HOLD: unregister_alt_shift(); break; //let go of alt shift + case DOUBLE_TAP: unregister_code(KC_TAB); break; + case SINGLE_HOLD: unregister_ctrl_shift(); break; + case TRIPLE_TAP: unregister_code(KC_LSHIFT); unregister_code(KC_ESC); break; + case TRIPLE_HOLD: unregister_code(KC_LSHIFT); unregister_code(KC_LGUI); break; + } + tab_state.state = 0; +} +/**************** QUAD FUNCTION FOR TAB ****************/ + +//*************** SUPER COMMA *******************// +// Assumption: we don't care about trying to hit ,, quickly +//*************** SUPER COMMA *******************// +static xtap comma_state = { + .is_press_action = true, + .state = 0 +}; + +void comma_finished (qk_tap_dance_state_t *state, void *user_data) { + comma_state.state = hold_cur_dance(state); //Use the dance that favors being held + switch (comma_state.state) { + case SINGLE_TAP: register_code(KC_COMMA); break; + case SINGLE_HOLD: layer_on(1); break; //turn on symbols layer + case DOUBLE_TAP: layer_invert(4); break; //toggle numbers layer + case DOUBLE_HOLD: layer_on(2); break; + case TRIPLE_TAP: register_code(KC_CALCULATOR); break; + case TRIPLE_HOLD: layer_on(3); + } +} + +void comma_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (comma_state.state) { + case SINGLE_TAP: unregister_code(KC_COMMA); break; //unregister comma + case SINGLE_HOLD: layer_off(1); break; + case DOUBLE_TAP: ;break; + case DOUBLE_HOLD: layer_off(2); break; + case TRIPLE_TAP: unregister_code(KC_CALCULATOR); break; + case TRIPLE_HOLD: layer_off(3); + } + comma_state.state = 0; +} +//*************** SUPER COMMA *******************// +//*************** SUPER COMMA *******************// + + +//*************** F3 TAP DANCE *******************// +//Good example for accessing multiple layers from the same key. +static xtap S1_state = { + .is_press_action = true, + .state = 0 +}; + +void bt_finished (qk_tap_dance_state_t *state, void *user_data) { + S1_state.state = cur_dance(state); + switch (S1_state.state) { + case SINGLE_TAP: register_code(KC_F3); break; + case SINGLE_HOLD: layer_on(4); break; + case DOUBLE_TAP: layer_invert(4); break; + case DOUBLE_HOLD: layer_on(5); break; + case DOUBLE_SINGLE_TAP: layer_invert(4); break; + } +} + +void bt_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (S1_state.state) { + case SINGLE_TAP: unregister_code(KC_F3); break; + case SINGLE_HOLD: layer_off(4); break; + case DOUBLE_TAP: break; //already inverted. Don't do anything. + case DOUBLE_HOLD: layer_off(5); break; + case DOUBLE_SINGLE_TAP: break; + } + S1_state.state = 0; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_SECRET_1 ... KC_SECRET_5: + if (!record->event.pressed) { + send_string(secret[keycode - KC_SECRET_1]); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/users/gordon/gordon.h b/users/gordon/gordon.h new file mode 100644 index 00000000..548c6304 --- /dev/null +++ b/users/gordon/gordon.h @@ -0,0 +1,157 @@ +#ifndef GORDON +#define GORDON + +#include "quantum.h" +#include "process_keycode/process_tap_dance.h" + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define ________ KC_TRNS +#define _________ KC_TRNS +#define XXXXXXX KC_NO + +// KC codes that are too long +#define DOLLAR KC_DOLLAR +#define LSQUIGLY KC_LBRACKET +#define RSQUIGLY KC_RBRACKET +#define NUMLOCK KC_NUMLOCK +#define CAPLOCK KC_CAPSLOCK +#define BK_SLASH KC_BSLASH +#define ASTERSK KC_KP_ASTERISK + +// Navigation +#define SNAPLEFT LGUI(KC_LEFT) +#define SNAPRGHT LGUI(KC_RIGHT) +#define SNAPUP LGUI(KC_UP) +#define SNAPDOWN LGUI(KC_DOWN) +#define PREVTAB LCTL(LSFT(KC_TAB)) +#define NEXTTAB LCTL(KC_TAB) +#define WORKRIGHT LCTL(LGUI(KC_RIGHT)) +#define WORKLEFT LCTL(LGUI(KC_LEFT)) + +// KC/modifier hold +#define CTRL_F CTL_T(KC_F) +#define CTRL_J CTL_T(KC_J) +#define CTRL_Z CTL_T(KC_Z) +#define ALT_V ALT_T(KC_V) +#define ALT_M ALT_T(KC_M) +#define WIN_G GUI_T(KC_G) +#define WIN_H GUI_T(KC_H) +#define HYPER_X ALL_T(KC_X) +#define HYPE_DOT ALL_T(KC_DOT) +#define MEH_S MEH_T(KC_S) +#define MEH_L MEH_T(KC_L) +#define ALT_HOME ALT_T(KC_HOME) + + +// KC/Layer Hold +#define NAV_E LT(_NAV,KC_E) +#define NUMPAD_D LT(_NUMPAD,KC_D) +#define MOUSE_C LT(_MOUSE,KC_C) +#define SYMB_BSP LT(_SYMBOLS,KC_BSPACE) +#define COL_MOUS LT(_MOUSE,KC_SCOLON) +#define SPAC_SYM LT(_SYMBOLS,KC_SPACE) + +// Double Modifier ONLY hold +#define ALT_SHFT LSFT(KC_LALT) +#define CTR_SHFT LSFT(KC_LCTL) + +// KC/Double modifier Hold +#define CTR_SH_W MT(MOD_LCTL|MOD_LSFT,KC_W) +#define CTR_AL_R MT(MOD_LCTL|MOD_LALT,KC_R) + +//MISC +#define PRINTSCR KC_PSCREEN +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + + +typedef struct { + bool is_press_action; + int state; +} xtap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +enum gordon_layers +{ + _QWERTY = 0, + _SYMBOLS, + _MOUSE, + _NUMPAD, + _NAV, + _MACROS, + _FUNCTION, + _TEXTNAV +}; + + + +void register_hyper (void); +void unregister_hyper (void); + +void register_ctrl_a (void); +void unregister_ctrl_a (void); + +void register_alt_f7 (void); +void unregister_alt_f7 (void); + +void register_shift_f6 (void); +void unregister_shift_f6 (void); + +void register_ctrl_shift (void); +void unregister_ctrl_shift (void); + +void register_alt_shift (void); +void unregister_alt_shift (void); + +int cur_dance (qk_tap_dance_state_t *state); +int hold_cur_dance (qk_tap_dance_state_t *state); + +void x_finished (qk_tap_dance_state_t *state, void *user_data); +void x_reset (qk_tap_dance_state_t *state, void *user_data); + +void h_finished (qk_tap_dance_state_t *state, void *user_data); +void h_reset (qk_tap_dance_state_t *state, void *user_data); + +void tab_finished (qk_tap_dance_state_t *state, void *user_data); +void tab_reset (qk_tap_dance_state_t *state, void *user_data); + +void comma_finished (qk_tap_dance_state_t *state, void *user_data); +void comma_reset (qk_tap_dance_state_t *state, void *user_data); + +void bt_finished (qk_tap_dance_state_t *state, void *user_data); +void bt_reset (qk_tap_dance_state_t *state, void *user_data); + +// Macro Declarations +enum { + INFOQM, + TIL_SLASH, + DEREF, + EQRIGHT, + TILD3, + TICK3, + ALTTAB_START, + ALTTAB_END +}; + +enum secret_strings { + KC_SECRET_1 = SAFE_RANGE, + KC_SECRET_2, + KC_SECRET_3, + KC_SECRET_4, + KC_SECRET_5, +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); + +#endif \ No newline at end of file diff --git a/users/gordon/readme.md b/users/gordon/readme.md new file mode 100644 index 00000000..fdea33b6 --- /dev/null +++ b/users/gordon/readme.md @@ -0,0 +1,14 @@ +Copyright @ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk new file mode 100644 index 00000000..5dd62c20 --- /dev/null +++ b/users/gordon/rules.mk @@ -0,0 +1 @@ +SRC += gordon.c \ No newline at end of file diff --git a/util/msys2_install.sh b/util/msys2_install.sh index de03b89a..282053fe 100644 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -13,7 +13,7 @@ source "$dir/win_shared_install.sh" function install_avr { rm -f -r "$avrtools" - wget "http://www.atmel.com/images/avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe" + wget "http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe" 7z x avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe rm avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe } @@ -114,4 +114,4 @@ echo echo "******************************************************************************" echo "Installation completed!" echo "Please close this Window and restart MSYS2 MinGW" -echo "******************************************************************************" \ No newline at end of file +echo "******************************************************************************" diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh index 8d1949ae..27539c5b 100644 --- a/util/win_shared_install.sh +++ b/util/win_shared_install.sh @@ -18,9 +18,10 @@ function install_utils { wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' unzip teensy_loader_cli_windows.zip - echo "Installing Atmel Flip" - wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' - mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe + # This URL has changed and I can't find the new location. Commenting out until we figure out the new URL or determine this isn't needed. -skullY + #echo "Installing Atmel Flip" + #wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' + #mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe echo "Downloading the QMK driver installer" wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i -