Compare commits

...

6 Commits

Author SHA1 Message Date
Drashna Jaelre
e5540dd055 Update to drashna keymaps and userspace (#2876)
* Fix Unicode sample

* Add irony mark

* Remove unpretty keymaps

* Add QMK DFU and Conditional Music Mode

* Unicode fixes

* Unicode fixes

* Make layer indication more modular

* Finish removing Faux Click

* Cleanup of UserSpace and addition of 'update_tri_layer_state' function

* Add modifier status indicators to Orthodox

* Remove tri layer function

* Minor tweaks

* Remove the Orthodox's Indicator's reliance on layer_state_set

* Add custom EEPROM settings

* Make EEPROM config more efficient

* Viterbi Config

* Add Iris Keyboard layout and Userspace cleanup

* Iris keyboard tweaks

* Use Grave Escape on Iris

* Update Readmes
2018-05-02 11:39:46 -04:00
MechMerlin
9b8fc6f1c0 QMK Configurator Support for NIU Mini (#2874)
* QMK Configurator support for niu mini

* Fix naming

* looks like I messed up the include
2018-05-02 08:07:08 -07:00
krasmaralde
3d96359f71 Addkeymap/satan fakb (#2833)
* edited keymap and fitted for tada68

* edited rules to make mouse work

* filled config.h to make mouse cursor move smooth

* added descriptive readme

* added layout with split backspace and steamlined naming

* added layout with split shift, split backspace and split #

* changed keymap to fit the new layout

* removed duplicate layout KEYMAP_FAKB and pointed keymap.c to default on

* further cleanup from layout duplicate
2018-05-02 08:05:36 -07:00
noroadsleft
0495bf4491 QMK Configurator updates for Alpha 28-key, AMJ40 and AMJ Pad (#2873)
* QMK Configurator update for Alpha 28-key

* QMK Configurator update for AMJ40

* QMK Configurator update for AMJ Pad

* QMK Configurator update for Atom47

* QMK Configurator update for OLKB Atomic
2018-05-02 08:02:35 -07:00
zwnk
b51ad39047 iris impstyle keymap, mouse layer added (#2875)
* impstyle keymap added

* impstyle keymap updated

* mouse layer added to impstyle keymap

* keymap updated

* fixes

* impsytle layout: mouse layer added

* comments added

* comments added

* bugfix

* typo fixed
2018-05-02 07:56:00 -07:00
tdl-jturner
ec7223d9f0 Added new layout to XD75. See Readme for details (#2871)
* Clean commit of xd75 layout. See Readme for details

* Corrected header

* Switched to HSV and added init
2018-05-01 12:29:49 -07:00
40 changed files with 1422 additions and 355 deletions

13
keyboards/alpha/info.json Normal file
View File

@@ -0,0 +1,13 @@
{
"keyboard_name": "Alpha",
"url": "",
"maintainer": "qmk",
"bootloader": "",
"width": 10,
"height": 3,
"layouts": {
"LAYOUT": {
"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":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":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2, "w":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}]
}
}
}

13
keyboards/amj40/info.json Normal file
View File

@@ -0,0 +1,13 @@
{
"keyboard_name": "AMJ40",
"url": "",
"maintainer": "qmk",
"bootloader": "",
"width": 12,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1, "w":1.75}, {"x":0, "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, "w":1.25}, {"x":11, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"x":8.5, "y":3, "w":1.25}, {"x":9.75, "y":3}, {"x":10.75, "y":3, "w":1.25}]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"keyboard_name": "AMJ Pad",
"url": "",
"maintainer": "qmk",
"bootloader": "",
"width": 4,
"height": 6,
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"keyboard_name": "Atom47",
"url": "",
"maintainer": "qmk",
"bootloader": "",
"width": 13,
"height": 4,
"layouts": {
"LAYOUT_ansi": {
"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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "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, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}]
}
}
}

View File

@@ -3,7 +3,7 @@
![Atom47](https://i.imgur.com/Wwflqvt.png)
## Support
Keyboard Maintainer: [Maarten Dekkers(https://github.com/maartenwut)
Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut)
Hardware Supported: Atom47 rev3
Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221)

View File

@@ -0,0 +1,13 @@
{
"keyboard_name": "Atom47",
"url": "",
"maintainer": "qmk",
"bootloader": "",
"width": 13,
"height": 4,
"layouts": {
"LAYOUT_ansi": {
"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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "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, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}]
}
}
}

View File

@@ -3,7 +3,7 @@
This is the keymap for rev2 of the Atom47. Only 9 of those have been sold for testing purposes. It had a slightly misaligned usb port and the pcb was too thick (should've been 1.2mm instead of 1.6mm). The pcb only supports the default hardware layout, although /u/ChrisSwires has [modified his](https://www.reddit.com/r/MechanicalKeyboards/comments/7n2dua/not_your_average_core_with_honeywell/) and put a big spacebar in it.
## Support
Keyboard Maintainer: [Matthew Kerfoot(https://github.com/mkerfoot)
Keyboard Maintainer: [Matthew Kerfoot](https://github.com/mkerfoot)
Hardware Supported: Atom47 rev2
Hardware Availability: None

View File

@@ -0,0 +1,13 @@
{
"keyboard_name": "Atomic",
"url": "",
"maintainer": "qmk",
"bootloader": "",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT_semi_standard": {
"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, "w":2}, {"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":13, "y":1}, {"x":14, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2, "w":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3, "w":2}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
}
}
}

View File

@@ -0,0 +1,59 @@
/*
Copyright 2017 Danny Nguyen <danny@keeb.io>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "config_common.h"
/* Use I2C or Serial, not both */
#define USE_SERIAL
#undef USE_I2C
/* Select hand configuration */
// #define MASTER_LEFT
// #define MASTER_RIGHT
#define EE_HANDS
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
#define RGBLED_NUM 16 // Number of LEDs
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 12
#define RGBLIGHT_VAL_STEP 12
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
#endif // RGBLIGHT_ENABLE
#ifdef AUDIO_ENABLE
#define C6_AUDIO
#ifdef RGBLIGHT_ENABLE
#define NO_MUSIC_MODE
#endif //RGBLIGHT_ENABLE
#endif //AUDIO_ENABLE
#undef PRODUCT
#ifdef KEYBOARD_iris_rev2
#define PRODUCT Drashna Hacked Iris Rev.2
#endif
#endif

View File

@@ -0,0 +1,141 @@
#include QMK_KEYBOARD_H
#include "drashna.h"
#define KC_ALAP ALT_T(KC_APP)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_wrapper(
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS,
KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_LGUI, _________________QWERTY_R3_________________, KC_MRSF,
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
),
[_COLEMAK] = LAYOUT_wrapper(
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS,
KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_LGUI, _________________COLEMAK_R3________________, KC_MRSF,
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
),
[_DVORAK] = LAYOUT_wrapper(
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS,
KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT,
KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_LGUI, _________________DVORAK_R3_________________, KC_MRSF,
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
),
[_WORKMAN] = LAYOUT_wrapper(
KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS,
KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_LGUI, _________________WORKMAN_R3________________, KC_MRSF,
LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
),
[_MODS] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LPRN, KC_RPRN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
_______, _______, KC_DEL, _______, _______, _______
),
[_RAISE] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_UNDS, KC_EQL , KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_END, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_ADJUST] = LAYOUT(
KC_MAKE, KC_RST, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
KC_RGB_T,RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY,
_______, _______, _______, _______, _______, _______
)
};
#ifdef INDICATOR_LIGHT
uint32_t layer_state_set_keymap (uint32_t state) {
uint8_t modifiders = get_mods();
uint8_t led_usb_state = host_keyboard_leds();
uint8_t one_shot = get_oneshot_mods();
if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) {
rgblight_sethsv_at(0, 255, 255, 5);
rgblight_sethsv_at(0, 255, 255, 10);
}
if (modifiders & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) {
rgblight_sethsv_at(51, 255, 255, 6);
rgblight_sethsv_at(51, 255, 255, 9);
}
if (modifiders & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) {
rgblight_sethsv_at(120, 255, 255, 7);
rgblight_sethsv_at(120, 255, 255, 8);
}
return state;
}
void matrix_scan_keymap (void) {
static uint8_t current_mods;
static uint8_t current_host_leds;
static uint8_t current_oneshot_mods;
static bool has_status_changed = true;
if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) {
has_status_changed = true;
current_mods = get_mods();
current_host_leds = host_keyboard_leds();
current_oneshot_mods = get_oneshot_mods();
}
if (has_status_changed) {
has_status_changed = false;
if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<<USB_LED_CAPS_LOCK) || current_oneshot_mods & MODS_SHIFT_MASK) {
rgblight_sethsv_at(0, 255, 255, 5);
rgblight_sethsv_at(0, 255, 255, 10);
} else {
rgblight_sethsv_default_helper(5);
rgblight_sethsv_default_helper(10);
}
if (current_mods & MODS_CTRL_MASK || current_oneshot_mods & MODS_CTRL_MASK) {
rgblight_sethsv_at(51, 255, 255, 6);
rgblight_sethsv_at(51, 255, 255, 9);
} else {
rgblight_sethsv_default_helper(6);
rgblight_sethsv_default_helper(9);
}
if (current_mods & MODS_GUI_MASK || current_oneshot_mods & MODS_GUI_MASK) {
rgblight_sethsv_at(120, 255, 255, 7);
rgblight_sethsv_at(120, 255, 255, 8);
} else {
rgblight_sethsv_default_helper(7);
rgblight_sethsv_default_helper(8);
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
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
TAP_DANCE_ENABLE = no
RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = yes
NKRO_ENABLE = yes
BACKLIGHT_ENABLE = no

View File

@@ -0,0 +1,42 @@
/*
Copyright 2017 Danny Nguyen <danny@keeb.io>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "config_common.h"
/* Use I2C or Serial, not both */
//#define USE_SERIAL
#define USE_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define MOUSEKEY_DELAY 300
#define MOUSEKEY_INTERVAL 50
#define MOUSEKEY_MAX_SPEED 10
#define MOUSEKEY_TIME_TO_MAX 20
#define MOUSEKEY_WHEEL_MAX_SPEED 8
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
#include "../../config.h"
#endif

View File

@@ -1,3 +1,6 @@
// iris qwerty layout with mouse layer.
// double tab to toggle is not working atm
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -5,43 +8,80 @@ extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 16
#define _MOUSE 3
#define TAPPING_TOGGLE 2 // double tab
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
MOUSE,
};
#define KC_ KC_TRNS
#define _______ KC_TRNS
#define KC_LOWR LOWER
#define KC_RASE RAISE
#define KC_RST RESET
#define KC_BL_S BL_STEP
#define KC_TGLW TG(_LOWER)
#define KC_TGRS TG(_RAISE)
#define KC_LOWR MO(_LOWER) // Lower layer
#define KC_RASE MO(_RAISE) // Raise layer
#define KC_TGLW TG(_LOWER) // toggle lower
#define KC_TGRS TG(_RAISE) // toggle raise
#define KC_MOUS TT(_MOUSE) // double tab toggle mouse layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// QUERTY LAYER
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
// ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
// TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
// LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
// LCTL, Z , X , C , V , B ,PLUS , MOUS , N , M ,COMM,DOT ,SLSH,BSLASH,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
// LGUI,RASE,SPC , ENT ,LOWR,LALT
// `----+----+----' `----+----+----'
[_QWERTY] = LAYOUT(
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,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_MINS ,
KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_TGRS, KC_TGLW , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH,
KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PLUS, KC_MOUS , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH,
KC_LGUI,KC_RASE,KC_SPC , KC_ENT ,KC_LOWR,KC_LALT
),
// LOWER Layer
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
// TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
// , ,PGUP, , ,LBRC, RBRC, P7 , P8 , P9 ,PLUS, ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
// ,HOME,PGDN,END, ,LPRN, RPRN, P4 , P5 , P6 ,MINS,PIPE,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
// , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
// , ,DEL , BSPC , , P0
// `----+----+----' `----+----+----'
[_LOWER] = LAYOUT(
KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,
_______,_______,KC_PGUP,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,KC_PLUS,_______,
_______ ,KC_HOME,KC_PGDN,KC_END,_______,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE,
_______,_______,_______,_______,_______,_______,_______, _______ ,_______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS ,
_______ ,_______,KC_DEL , KC_BSPC ,_______, KC_P0
_______ ,_______,KC_PSCR , KC_DEL ,_______, KC_P0
),
// RAISE LAYER
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
// F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
// , , UP , , ,LBRC, RBRC, ,NLCK,INS ,SLCK,MUTE,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
// ,LEFT,DOWN,RGHT, ,LPRN, RPRN,MPRV,MPLY,MNXT, ,VOLU,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
// , , , , , , , PLUS , , , , , ,VOLD,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
// , , , EQL, ,
// `----+----+----' `----+----+----'
[_RAISE] = LAYOUT(
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
_______ ,_______, KC_UP ,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE,
@@ -50,70 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______ ,_______,_______, KC_EQL,_______,_______
),
[_ADJUST] = LAYOUT(
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
_______, _______, _______, _______, _______, _______
// `--------+--------+--------' `--------+--------+--------'
)
[_MOUSE] = LAYOUT(
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
_______ ,_______, KC_MS_UP ,_______,_______,_______, KC_MS_WH_UP,_______,_______,_______ ,_______,_______,
_______ ,KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,_______,_______, KC_MS_WH_DOWN,KC_MS_BTN1,KC_MS_BTN2,KC_MS_BTN3,_______,_______,
_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,
_______ ,_______,_______, _______,_______,_______
),
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
#endif
void persistent_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_SONG(tone_qwerty);
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
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 ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}
};

View File

@@ -0,0 +1,8 @@
RGBLIGHT_ENABLE = no
BACKLIGHT_ENABLE = no
TAP_DANCE_ENABLE = no
MOUSEKEY_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -0,0 +1,16 @@
{
"keyboard_name": "NIU Mini",
"url": "",
"maintainer": "qmk",
"width": 12,
"height": 4,
"layouts": {
"LAYOUT_ortho_4x12": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
},
"LAYOUT_mit": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
}
}
}

View File

@@ -1,4 +1,4 @@
#include "niu_mini.h"
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

View File

@@ -1,4 +1,4 @@
#include "niu_mini.h"
#include QMK_KEYBOARD_H
enum layers {
_QWERTY,

View File

@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "niu_mini.h"
#include QMK_KEYBOARD_H
#include "action_layer.h"
extern keymap_config_t keymap_config;

View File

@@ -10,10 +10,10 @@
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
}
#define LAYOUT_grid( \

View File

@@ -21,6 +21,4 @@ All layers have RGB specific indicators, so you can see what layer you're on by
Orthodox Specific Code
----------------------
Left side is designed to have RGB underglow and Faux Clicking enabled, while the right has Audio enabled.
The make commend ensures that the correct settings are retained.
Shift, Control and Alt all light up a specific RGB LED for a certain color, based on it's status, adding a visual indicator of OSMs or regular mods are held down.

View File

@@ -59,8 +59,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef AUDIO_ENABLE
#define C6_AUDIO
#ifdef RGBLIGHT_ENABLE
#define NO_MUSIC_MODE
#endif
#endif //RGBLIGHT_ENABLE
#endif //AUDIO_ENABLE
#undef PRODUCT
#ifdef KEYBOARD_orthodox_rev1
@@ -69,4 +71,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT Drashna Hacked Orthodox Rev.3
#endif
#define QMK_ESC_OUTPUT D7 // usually COL
#define QMK_ESC_INPUT D4 // usually ROW
#define QMK_LED B0
#define QMK_SPEAKER C6
#endif

View File

@@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define MG_NKRO MAGIC_TOGGLE_NKRO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -67,21 +66,85 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT(\
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
),
[_RAISE] = LAYOUT(\
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_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC,
_______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
),
[_ADJUST] = LAYOUT(\
KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_SMOD,RGB_HUI, CK_TOGG, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY
)
};
#ifdef RGBLIGHT_ENABLE
uint32_t layer_state_set_keymap (uint32_t state) {
uint8_t modifiders = get_mods();
uint8_t led_usb_state = host_keyboard_leds();
uint8_t one_shot = get_oneshot_mods();
if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) {
rgblight_sethsv_at(0, 255, 255, 5);
rgblight_sethsv_at(0, 255, 255, 10);
}
if (modifiders & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) {
rgblight_sethsv_at(51, 255, 255, 6);
rgblight_sethsv_at(51, 255, 255, 9);
}
if (modifiders & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) {
rgblight_sethsv_at(120, 255, 255, 7);
rgblight_sethsv_at(120, 255, 255, 8);
}
return state;
}
void matrix_scan_keymap (void) {
static uint8_t current_mods;
static uint8_t current_host_leds;
static uint8_t current_oneshot_mods;
static bool has_status_changed = true;
if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) {
has_status_changed = true;
current_mods = get_mods();
current_host_leds = host_keyboard_leds();
current_oneshot_mods = get_oneshot_mods();
}
if (has_status_changed) {
has_status_changed = false;
if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<<USB_LED_CAPS_LOCK) || current_oneshot_mods & MODS_SHIFT_MASK) {
rgblight_sethsv_at(0, 255, 255, 5);
rgblight_sethsv_at(0, 255, 255, 10);
} else {
rgblight_sethsv_default_helper(5);
rgblight_sethsv_default_helper(10);
}
if (current_mods & MODS_CTRL_MASK || current_oneshot_mods & MODS_CTRL_MASK) {
rgblight_sethsv_at(51, 255, 255, 6);
rgblight_sethsv_at(51, 255, 255, 9);
} else {
rgblight_sethsv_default_helper(6);
rgblight_sethsv_default_helper(9);
}
if (current_mods & MODS_GUI_MASK || current_oneshot_mods & MODS_GUI_MASK) {
rgblight_sethsv_at(120, 255, 255, 7);
rgblight_sethsv_at(120, 255, 255, 8);
} else {
rgblight_sethsv_default_helper(7);
rgblight_sethsv_default_helper(8);
}
}
}
#endif

View File

@@ -0,0 +1,92 @@
#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 0x0003
#define MANUFACTURER SATAN
#define PRODUCT GH60
#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14
// ROWS: Top to bottom, COLS: Left to right
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
#define UNUSED_PINS
#define BACKLIGHT_PIN B6
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* 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)) \
)
*/
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 8
/* Underlight configuration
*/
#define RGB_DI_PIN E2
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 8 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
#define NO_ACTION_ONESHOT
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#endif
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_INTERVAL 1
#define MOUSEKEY_MAX_SPEED 4
#define MOUSEKEY_TIME_TO_MAX 77
#define MOUSEKEY_WHEEL_MAX_SPEED 1
#define MOUSEKEY_WHEEL_TIME_TO_MAX 255
// only change
#undef RGB_DI_PIN
#define RGB_DI_PIN B2
#endif

View File

@@ -0,0 +1,35 @@
#include "satan.h"
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define LCTL_MA LCTL_T(KC_UP)
#define LSFT_MA LSFT_T(KC_DOWN)
#define RSFT_MA SFT_T(KC_DOWN)
#define TABS_MA LT(1,KC_TAB)
#define SPCE_MA LT(2,KC_SPC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[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_BSLS,KC_NUBS,\
TABS_MA,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,\
LCTL_MA,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 ,\
LSFT_MA,KC_NUBS,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,RSFT_MA,MO(1) ,\
XXXXXXX,KC_LALT,KC_LGUI, SPCE_MA, KC_RGUI,KC_RALT,XXXXXXX,XXXXXXX),
[1] = KEYMAP(
KC_PSCR,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_PGUP,KC_PGDN,KC_HOME,KC_END ,KC_PGDN,KC_PGUP,_______,_______,_______,_______,KC_DEL ,\
KC_CAPS,KC_NUBS,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,_______,_______,_______,_______,\
_______,_______,BL_TOGG,BL_INC ,BL_DEC ,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______,_______,_______,\
_______,_______,_______, _______, _______,_______,_______,_______),
[2] = KEYMAP(
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET ,\
KC_BTN5,KC_BTN4,KC_BTN3,KC_BTN2,KC_BTN1,KC_HOME,KC_END ,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,KC_WH_L,KC_WH_U,KC_WH_D,KC_WH_R,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______,_______,_______,\
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______, _______, _______,_______,_______,_______),
};

View File

@@ -0,0 +1,58 @@
# FabulousAnomalyKeyBoard
This layout features an efficient layout for people without
a mouse.
## layers
Layer Base: complete basic keyboard
Layer Fn-Tab: F1-F12, Arrow Keys, Home, End, Backlight, Media
Layer Fn-Space: mouse keys in a vim like manner
For detailed info check out keymap.c
## the CTRL key
It is where you would suspect CAPSLOCK to be.
WHO NEEDS CAPSLOCK ANYWAYS?
For those rare cases you need to shout at somebody in a comment
section you can still do a capslock by using TABCTRL
## the SUPER key
There are two super keys. They are next to the space bar.
The intention is easing the use of tiling window mangers
## emergency mouse
Without a mouse you will find yourself in a situation where all
your tiling goodness will just not be able to click onto that
"close ads" button.
This keymap integrates a basic mouse pointer directly into the keyboard.
Mouse is accessible via holding SPACE and tapping keys:
```
SPACE
h Move cursor left
j Move cursor down
k Move cursor up
l Move cursor right
w Middle Mouse Click
r Right click
e Left click
s Scroll wheel left
d Scroll wheel down
f Scroll wheel up
g Scroll wheel right
```
## shell focused
Working in a shell the up and down arrow keys are often needed to
look at old commands or reuse some.
When held, the left ctrl and left shift will act as expected,
but when tapped they will become UP and DOWN arrow-keys.
## krautfriend
The keys <|> are accessible even without a 102nd key

View File

@@ -0,0 +1,16 @@
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 = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_MEDIA] = LAYOUT_ortho_5x7(
KC_MAKE, KC_RESET,MU_TOG, AUD_ON, AUD_OFF, CK_TOGG, RGB_SAD,
KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
MEDIA, EPRM, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD,
KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI,

View File

@@ -8,5 +8,12 @@ RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = yes
NKRO_ENABLE = yes
CUSTOM_MATRIX = no
CUSTOM_LAYOUT = no
LAYOUTS = ortho_5x7
# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC))
# SRC := $(filter-out serial.c,$(SRC))
# SRC := $(filter-out matrix.c,$(SRC))
# SRC := $(filter-out i2c.c,$(SRC))
# SRC := $(filter-out split_util.c,$(SRC))
# SRC += quantum/matrix.c

View File

@@ -0,0 +1,38 @@
/* Copyright 2018 Josh Turner (/u/tdl-jturner)
*
* 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 <http://www.gnu.org/licenses/>.
*/
// additional config optoinsa vailable at https://docs.qmk.fm/reference/config-options#the-config.h-file
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
// place overrides here
//#define TAPPING_TERM 200
#define TAPPING_TOGGLE 2
//#define PERMISSIVE_HOLD
//#define QMK_KEYS_PER_SCAN 4
#define PREVENT_STUCK_MODIFIERS
#define FORCE_NKRO
#define MOUSEKEY_INTERVAL 16
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
#endif

View File

@@ -0,0 +1,312 @@
/* Copyright 2018 Josh Turner (/u/tdl-jturner)
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
enum xd75_layers {
_QWERTY,
_COLEMAK,
_LYMD,
_LYFK,
_LYMED,
_LYNUM,
_LYNAV,
_LYMOS,
_LYSYS,
_LYLT
};
enum xd75_keycodes {
HELP = SAFE_RANGE,
KC_BSDEL,
KC_FBSLH,
KC_DOTQ,
KC_CPIPE,
COLEMAK,
QWERTY,
KC_LYDEF
};
//Tap Dance Declarations
enum {
TD_LOCK_SLEEP,
TD_ABK,
TD_BRC,
TD_CBR,
};
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice for Caps Lock
[TD_LOCK_SLEEP] = ACTION_TAP_DANCE_DOUBLE(LGUI(KC_L), KC_SLEP),
[TD_ABK] = ACTION_TAP_DANCE_DOUBLE(KC_LABK,KC_RABK),
[TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC,KC_RBRC),
[TD_CBR] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR,KC_RCBR)
// Other declarations would go here, separated by commas, if you have them
};
//remaps for pretty layouts
#define ________ KC_TRNS
#define ___XX___ KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//QWERY - Base Layer
[_QWERTY] = {
{KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS},
{KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,________ ,________,________, KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSDEL}, //Custom shift Codes. Backspace ^ Delete
{LT(_LYMD,KC_ESC), KC_A , KC_S , KC_D , KC_F , KC_G ,________ ,________,________, KC_H , KC_J , KC_K , KC_L ,KC_SCLN ,KC_QUOT },
{KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_N , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC }, // Custom Shift Codes. ,^| .^? /^|
{ KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP)}
},
//_COLEMAK - Colemak Layout - Identical to qwerty layer except for the layout changes
[_COLEMAK] = {
{KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS},
{KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G ,________ ,________,________, KC_J , KC_L , KC_U , KC_Y ,KC_SCLN ,KC_BSDEL}, //Custom shift Codes. Backspace ^ Delete
{LT(_LYMD,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_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_K , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC }, // Custom Shift Codes. ,^| .^? /^|
{ KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP)}
},
// Decision Layer
[_LYMD] =
{
{________,________ ,________ ,________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{________,MO(_LYFK) ,MO(_LYMED),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________},
{________,MO(_LYNUM),MO(_LYNAV),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{________,MO(_LYMOS),MO(_LYSYS),MO(_LYLT) ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{________,________ ,________ ,________ ,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___}
},
//F Keys
[_LYFK] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,________},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,___XX___},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,___XX___},
{________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___}
},
//Media Keys
[_LYMED] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLU ,___XX___,___XX___,________},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPRV ,KC_MUTE ,KC_MNXT ,___XX___,___XX___},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLD ,___XX___,KC_MSTP ,___XX___},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPLY ,___XX___,___XX___,___XX___,___XX___}
},
//Num Keys
[_LYNUM] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_PEQL ,KC_PSLS ,KC_PAST ,KC_PMNS ,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_7 ,KC_8 ,KC_9 ,KC_MINUS,________},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_4 ,KC_5 ,KC_6 ,KC_PPLS ,KC_PSLS },
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_1 ,KC_2 ,KC_3 ,KC_PENT ,KC_PAST },
{________,________,________,________,________,________,________,________,________,________,KC_0 ,KC_0 ,KC_PDOT ,KC_PEQL ,___XX___}
},
//Navigation Keys
[_LYNAV] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_HOME ,KC_UP ,KC_PGUP ,KC_PSCR ,________},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_LEFT ,KC_F5 ,KC_RIGHT,KC_SLCK ,___XX___},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_END ,KC_DOWN ,KC_PGDN ,KC_PAUS ,___XX___},
{________,________,________,________,________,________,________,________,________,________,________,KC_INS ,KC_DEL ,___XX___,___XX___}
},
//Mouse Keys
[_LYMOS] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_U ,KC_WH_U ,KC_ACL2 ,________},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MS_L ,KC_ACL0 ,KC_MS_R ,KC_ACL1 ,___XX___},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_D ,KC_WH_D ,KC_BTN2 ,___XX___},
{________,________,________,________,________,________,________,________,________,________,KC_BTN1 ,KC_BTN3 ,KC_BTN4 ,___XX___,___XX___}
},
//Systen Keys
[_LYSYS] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,QWERTY ,COLEMAK ,___XX___,RESET },
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___}
},
// Light Control
[_LYLT] =
{
{________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___},
{KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_HUD ,RGB_HUI ,RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI },
{________,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_TOG ,RGB_RMOD,RGB_MOD ,___XX___,___XX___,___XX___},
{________,________,________,________,________,________,___XX___,___XX___,___XX___,BL_TOGG ,BL_DEC ,BL_INC ,BL_BRTG ,___XX___,___XX___},
{________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___}
}
};
//Define layer colors
#define rgblight_setrgb_user_base() rgblight_sethsv(325,255,255)
#define rgblight_setrgb_user_LYFK() rgblight_sethsv_red()
#define rgblight_setrgb_user_LYMED() rgblight_sethsv_blue()
#define rgblight_setrgb_user_LYNUM() rgblight_sethsv_purple()
#define rgblight_setrgb_user_LYNAV() rgblight_sethsv_cyan()
#define rgblight_setrgb_user_LYMOS() rgblight_sethsv_orange()
#define rgblight_setrgb_user_LYSYS() rgblight_sethsv_green()
#define rgblight_setrgb_user_LYLT() rgblight_sethsv_yellow()
#define rgblight_setrgb_user_LYMD() rgblight_sethsv_white()
//initialize rgb
void matrix_init_user(void) {
rgblight_enable();
rgblight_mode(1);
rgblight_setrgb_user_base();
}
//Set a color based on the layer
uint32_t layer_state_set_user(uint32_t state) {
switch(biton32(state)) {
case _LYFK:
rgblight_setrgb_user_LYFK();
break;
case _LYMED:
rgblight_setrgb_user_LYMED();
break;
case _LYNUM:
rgblight_setrgb_user_LYNUM();
break;
case _LYNAV:
rgblight_setrgb_user_LYNAV();
break;
case _LYMOS:
rgblight_setrgb_user_LYMOS();
break;
case _LYSYS:
rgblight_setrgb_user_LYSYS();
break;
case _LYLT:
rgblight_setrgb_user_LYLT();
break;
case _LYMD:
rgblight_setrgb_user_LYMD();
break;
default:
rgblight_setrgb_user_base();
break;
}
return state;
}
//Const for shift
const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT);
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case KC_LYDEF:
layer_clear();
return false;
break;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case KC_BSDEL:
if (record->event.pressed) {
if (keyboard_report->mods & shift) {
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
unregister_code(KC_LSHIFT);
}
else {
unregister_code(KC_RSHIFT);
}
register_code(KC_DEL);
}
else {
register_code(KC_BSPC);
}
}
else {
unregister_code(KC_DEL);
unregister_code (KC_BSPC);
}
return false;
break;
case KC_FBSLH:
if (record->event.pressed) {
if (keyboard_report->mods & shift) {
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
unregister_code(KC_LSHIFT);
}
else {
unregister_code(KC_RSHIFT);
}
register_code(KC_BSLASH);
}
else {
register_code(KC_SLSH);
}
}
else {
unregister_code(KC_BSLASH);
unregister_code (KC_SLSH);
}
return false;
break;
case KC_DOTQ:
if (record->event.pressed) {
if (keyboard_report->mods & shift) {
register_code(KC_SLSH); // shifted slash = ?
}
else {
register_code(KC_DOT);
}
}
else {
unregister_code(KC_SLSH); // shifted slash = ?
unregister_code (KC_DOT);
}
return false;
break;
case KC_CPIPE:
if (record->event.pressed) {
if (keyboard_report->mods & shift) {
register_code(KC_BSLS);
}
else {
register_code(KC_COMM);
}
}
else {
unregister_code(KC_BSLS);
unregister_code (KC_COMM);
}
return false;
break;
}
return true;
};

View File

@@ -0,0 +1,12 @@
/u/tdl-jturner - XD75 Layout
===
Keyboard Layout Editor: [Link](http://www.keyboard-layout-editor.com/#/gists/b2b23097ef70fd9170e266e4cbc06c02)
Make Command: make xd75:tdl-jturner
Notes:
* Based on Qwerty
* Tweaks for DBA & Programming including tap dance braces on lower right, custom shift codes, and F5 access on Nav layer
* Layers are all based on layer control on the left and the right is a 10 key pattern
* Layers include Functions, Media, Numpad, Navigation, Mouse, System, and Lighting

View File

@@ -0,0 +1,23 @@
# Copyright 2018 Josh Turner (/u/tdl-jturner)
#
# 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 <http://www.gnu.org/licenses/>.
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
TAP_DANCE_ENABLE = yes
MOUSEKEY_ENABLE = yes
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes

View File

@@ -17,18 +17,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
#include "drashna.h"
#ifdef UNICODEMAP_ENABLE
#include "drashna_unicode.h"
#endif // UNICODEMAP_ENABLE
//enum more_custom_keycodes {
// KC_P00 = NEW_SAFE_RANGE
//};
//define layer change stuff for underglow indicator
bool skip_leds = false;
#ifdef KEYBOARD_ergodox_ez
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: QWERTY Layer
*
@@ -54,9 +57,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
// left hand // right hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_EQL, ________________NUMBER_LEFT________________, OSL(_MOUS), OSL(_MOUS), ________________NUMBER_RIGHT_______________, KC_MINS,
KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
SH_TT, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF,
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
__________________ERGODOX_THUMB_CLUSTER_____________________
@@ -88,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// left hand // right hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
SH_TT, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF,
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
__________________ERGODOX_THUMB_CLUSTER_____________________
@@ -120,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// left hand // right hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
SH_TT, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS,
KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS,
KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF,
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
__________________ERGODOX_THUMB_CLUSTER_____________________
@@ -152,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
SH_TT, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF,
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
__________________ERGODOX_THUMB_CLUSTER_____________________
@@ -299,19 +302,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
#else // KEYBOARD_ergodox_ez
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_ergodox_wrapper(KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), KC_BSPC, _________________QWERTY_L2_________________, KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), LT(_SYMB, KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPACE, KC_BSPC, KC_END, OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, _________________QWERTY_R2_________________, GUI_T(KC_QUOT), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), KC_RGUI, CTL_T(KC_ESCAPE), KC_PGUP, KC_PGDOWN, KC_DELETE, KC_ENTER),
[_COLEMAK] = LAYOUT_ergodox_wrapper(KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), KC_BSPC, _________________COLEMAK_L2________________, KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), LT(_SYMB, KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPACE, KC_BSPC, KC_END, OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, _________________COLEMAK_R2________________, GUI_T(KC_QUOT), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), KC_RGUI, CTL_T(KC_ESCAPE), KC_PGUP, KC_PGDOWN, KC_DELETE, KC_ENTER),
[_DVORAK] = LAYOUT_ergodox_wrapper(KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), KC_BSPC, _________________DVORAK_L2_________________, KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), LT(_SYMB, KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPACE, KC_BSPC, KC_END, OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, _________________DVORAK_R2_________________, GUI_T(KC_MINS), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), KC_RGUI, CTL_T(KC_ESCAPE), KC_PGUP, KC_PGDOWN, KC_DELETE, KC_ENTER),
[_WORKMAN] = LAYOUT_ergodox_wrapper(KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), KC_BSPC, _________________WORKMAN_L2________________, KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), LT(_SYMB, KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPACE, KC_BSPC, KC_END, OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, _________________WORKMAN_R2________________, GUI_T(KC_QUOT), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), KC_RGUI, CTL_T(KC_ESCAPE), KC_PGUP, KC_PGDOWN, KC_DELETE, KC_ENTER),
[_MODS] = LAYOUT_ergodox(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_LSFT, 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_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_RSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_SYMB] = LAYOUT_ergodox(EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, TG(_MODS), KC_RESET, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN, KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, VRSN, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, KC_TILD, KC_COLEMAK, KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON, RGB_SMOD, KC_RGB_T, RGB_HUI, RGB_M_R, RGB_M_SW, RGB_HUD, KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12, KC_KP_MINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN, KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE, KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_DOT, KC_KP_0, KC_KP_ENTER),
[_GAMEPAD] = LAYOUT_ergodox(KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_O, KC_P, KC_HYPR, MAGIC_TOGGLE_NKRO, KC_LGUI, KC_NO, KC_V, KC_SPC, KC_H, KC_PGDN, KC_DEL, KC_ENTER),
[_DIABLO] = LAYOUT_ergodox(KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_L, KC_J, KC_NO, KC_NO, KC_F, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT),
[_MOUS] = LAYOUT_ergodox(KC_NO, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_NO, KC_BTN1, KC_BTN2, KC_WH_D, KC_BTN3, KC_BTN4, KC_BTN5),
};
#endif // KEYBOARD_ergodox_ez
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {

View File

@@ -7,3 +7,5 @@ endif
CONSOLE_ENABLE = no
BOOTMAGIC_ENABLE = yes
UNICODE_ENABLE = no
UNICDOEMAP_ENABLE = yes

View File

@@ -62,7 +62,6 @@ bool process_clicky(uint16_t keycode, keyrecord_t *record) {
if ( clicky_enable ) {
if (record->event.pressed) {
stop_all_notes();
clicky_play();;
}
}

View File

@@ -58,10 +58,16 @@
// Disable action_get_macro and fn_actions, since we don't use these
// and it saves on space in the firmware.
#ifndef NO_DEBUG
#define NO_DEBUG
#endif // !NO_DEBUG
#ifndef NO_PRINT
#define NO_PRINT
#endif // !NO_PRINT
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#define DISABLE_LEADER
#endif // !USERSPACE_CONFIG_H

View File

@@ -33,35 +33,52 @@ PROGMEM const char secret[][64] = {
#endif
#ifdef FAUXCLICKY_ENABLE
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
#else // FAUXCLICKY_ENABLE
float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to your tastes
float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes
#endif // FAUXCLICKY_ENABLE
float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
bool faux_click_enabled = false;
bool is_overwatch = false;
static uint16_t copy_paste_timer;
#ifdef RGBLIGHT_ENABLE
bool rgb_layer_change = true;
#endif
userspace_config_t userspace_config;
// Helper Functions
void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
#ifdef RGBLIGHT_ENABLE
void rgblight_sethsv_default_helper(uint8_t index) {
uint8_t default_layer = eeconfig_read_default_layer();
if (default_layer & (1UL << _COLEMAK)) {
rgblight_sethsv_at(300, 255, 255, index);
rgblight_sethsv_at(300, 255, 255, index);
}
else if (default_layer & (1UL << _DVORAK)) {
rgblight_sethsv_at(120, 255, 255, index);
rgblight_sethsv_at(120, 255, 255, index);
}
else if (default_layer & (1UL << _WORKMAN)) {
rgblight_sethsv_at(43, 255, 255, index);
rgblight_sethsv_at(43, 255, 255, index);
}
else {
rgblight_sethsv_at(180, 255, 255, index);
rgblight_sethsv_at(180, 255, 255, index);
}
}
#endif // RGBLIGHT_ENABLE
// ========================================= TAP DANCE =========================================
#ifdef TAP_DANCE_ENABLE
//define diablo macro timer variables
static uint16_t diablo_timer[4];
static uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 };
static uint8_t diablo_key_time[4];
bool check_dtimer(uint8_t dtimer) {
// has the correct number of seconds elapsed (as defined by diablo_times)
return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true;
};
// has the correct number of seconds elapsed (as defined by diablo_times)
bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; };
// Cycle through the times for the macro, starting at 0, for disabled.
// Max of six values, so don't exceed
@@ -69,25 +86,16 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_
if (state->count >= 7) {
diablo_key_time[diablo_key] = diablo_times[0];
reset_tap_dance(state);
}
else {
} else {
diablo_key_time[diablo_key] = diablo_times[state->count - 1];
}
}
// Would rather have one function for all of this, but no idea how to do that...
void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 0);
}
void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 1);
}
void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 2);
}
void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) {
diablo_tapdance_master(state, user_data, 3);
}
void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); }
void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); }
void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); }
void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); }
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
@@ -96,7 +104,6 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
[TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
[TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
};
// Sends the key press to system, but only if on the Diablo layer
@@ -104,17 +111,13 @@ void send_diablo_keystroke(uint8_t diablo_key) {
if (biton32(layer_state) == _DIABLO) {
switch (diablo_key) {
case 0:
SEND_STRING("1");
break;
tap(KC_1); break;
case 1:
SEND_STRING("2");
break;
tap(KC_2); break;
case 2:
SEND_STRING("3");
break;
tap(KC_3); break;
case 3:
SEND_STRING("4");
break;
tap(KC_4); break;
}
}
}
@@ -123,7 +126,6 @@ void send_diablo_keystroke(uint8_t diablo_key) {
// Runs the "send string" command if enough time has passed, and resets the timer.
void run_diablo_macro_check(void) {
uint8_t dtime;
for (dtime = 0; dtime < 4; dtime++) {
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
diablo_timer[dtime] = timer_read();
@@ -131,7 +133,6 @@ void run_diablo_macro_check(void) {
}
}
}
#endif // TAP_DANCE_ENABLE
@@ -162,32 +163,33 @@ void led_set_keymap(uint8_t usb_led) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
uint8_t default_layer = eeconfig_read_default_layer();
#ifdef RGBLIGHT_ENABLE
rgblight_enable();
if (true) {
if (default_layer & (1UL << _COLEMAK)) {
rgblight_sethsv_magenta();
}
else if (default_layer & (1UL << _DVORAK)) {
rgblight_sethsv_green();
}
else if (default_layer & (1UL << _WORKMAN)) {
rgblight_sethsv_goldenrod();
}
else {
rgblight_sethsv_teal();
}
}
else
{
rgblight_setrgb_red();
rgblight_mode(5);
}
#endif // RGBLIGHT_ENABLE
if (default_layer & (1UL << _COLEMAK)) {
#ifdef RGBLIGHT_ENABLE
rgblight_sethsv_magenta();
#endif // RGBLIGHT_ENABLE
} else if (default_layer & (1UL << _DVORAK)) {
#ifdef RGBLIGHT_ENABLE
rgblight_sethsv_green();
#endif // RGBLIGHT_ENABLE
} else if (default_layer & (1UL << _WORKMAN)) {
#ifdef RGBLIGHT_ENABLE
rgblight_sethsv_goldenrod();
#endif // RGBLIGHT_ENABLE
} else {
#ifdef RGBLIGHT_ENABLE
rgblight_sethsv_teal();
#endif // RGBLIGHT_ENABLE
}
userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);
clicky_enable = userspace_config.clicky_enable;
#if ( defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) )
set_unicode_input_mode(UC_WINC);
#endif //UNICODE_ENABLE
@@ -197,23 +199,21 @@ void matrix_init_user(void) {
// No global matrix scan code, so just run keymap's matrix
// scan function
void matrix_scan_user(void) {
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
#endif // TAP_DANCE_ENABLE
matrix_scan_keymap();
}
void tap(uint16_t keycode){
register_code(keycode);
unregister_code(keycode);
};
// This block is for all of the gaming macros, as they were all doing
// the same thing, but with differring text sent.
bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
if (!record->event.pressed || override) {
clear_keyboard();
tap(is_overwatch ? KC_BSPC : KC_ENTER);
tap(userspace_config.is_overwatch ? KC_BSPC : KC_ENTER);
wait_ms(50);
send_string(str);
wait_ms(50);
@@ -261,39 +261,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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 ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
}
else {
layer_off(_ADJUST);
}
return false;
break;
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
@@ -349,11 +316,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// These are a serious of gaming macros.
// Only enables for the viterbi, basically,
// to save on firmware space, since it's limited.
#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez))
#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_iris_rev2))
case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
if (record->event.pressed) { is_overwatch = !is_overwatch; }
if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); }
#ifdef RGBLIGHT_ENABLE
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
userspace_config.is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
#endif //RGBLIGHT_ENABLE
return false; break;
case KC_SALT:
@@ -435,7 +402,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
case CLICKY_TOGGLE:
userspace_config.clicky_enable = clicky_enable;
eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);
break;
#ifdef UNICODE_ENABLE
case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻
if (record->event.pressed) {
@@ -466,81 +436,135 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
// Runs state check and changes underglow color and animation
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
uint32_t layer_state_set_user(uint32_t state) {
#ifdef RGBLIGHT_ENABLE
uint8_t default_layer = eeconfig_read_default_layer();
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
if (rgb_layer_change) {
switch (biton32(state)) {
case _NAV:
switch (biton32(state)) {
case _NAV:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_blue();
rgblight_mode(1);
break;
case _SYMB:
}
#endif // RGBLIGHT_ENABLE
break;
case _SYMB:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_blue();
rgblight_mode(2);
break;
case _MOUS:
}
#endif // RGBLIGHT_ENABLE
break;
case _MOUS:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_yellow();
rgblight_mode(1);
break;
case _MACROS:
}
#endif // RGBLIGHT_ENABLE
break;
case _MACROS:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_orange();
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
break;
case _MEDIA:
userspace_config.is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
}
#endif // RGBLIGHT_ENABLE
break;
case _MEDIA:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_chartreuse();
rgblight_mode(22);
break;
case _GAMEPAD:
}
#endif // RGBLIGHT_ENABLE
break;
case _GAMEPAD:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_orange();
rgblight_mode(17);
break;
case _DIABLO:
}
#endif // RGBLIGHT_ENABLE
break;
case _DIABLO:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_red();
rgblight_mode(5);
break;
case _RAISE:
}
#endif // RGBLIGHT_ENABLE
break;
case _RAISE:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_yellow();
rgblight_mode(5);
break;
case _LOWER:
}
#endif // RGBLIGHT_ENABLE
break;
case _LOWER:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_orange();
rgblight_mode(5);
break;
case _ADJUST:
}
#endif // RGBLIGHT_ENABLE
break;
case _ADJUST:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_red();
rgblight_mode(23);
break;
case _COVECUBE:
}
#endif // RGBLIGHT_ENABLE
break;
case _COVECUBE:
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) {
rgblight_sethsv_green();
rgblight_mode(2);
break;
default: // for any other layers, or the default layer
if (default_layer & (1UL << _COLEMAK)) {
rgblight_sethsv_magenta();
}
else if (default_layer & (1UL << _DVORAK)) {
rgblight_sethsv_green();
}
else if (default_layer & (1UL << _WORKMAN)) {
rgblight_sethsv_goldenrod();
}
else {
rgblight_sethsv_teal();
}
if (biton32(state) == _MODS) { // If the non-OSM layer is enabled, then breathe
rgblight_mode(2);
} else { // otherwise, stay solid
rgblight_mode(1);
}
break;
}
}
#endif // RGBLIGHT_ENABLE
break;
default: // for any other layers, or the default layer
if (default_layer & (1UL << _COLEMAK)) {
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) { rgblight_sethsv_magenta(); }
#endif // RGBLIGHT_ENABLE
}
else if (default_layer & (1UL << _DVORAK)) {
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) { rgblight_sethsv_green(); }
#endif // RGBLIGHT_ENABLE
}
else if (default_layer & (1UL << _WORKMAN)) {
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) { rgblight_sethsv_goldenrod(); }
#endif // RGBLIGHT_ENABLE
}
else {
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) { rgblight_sethsv_teal(); }
#endif // RGBLIGHT_ENABLE
}
if (biton32(state) == _MODS) { // If the non-OSM layer is enabled, then breathe
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) { rgblight_mode(2); }
#endif // RGBLIGHT_ENABLE
} else { // otherwise, stay solid
#ifdef RGBLIGHT_ENABLE
if (rgb_layer_change) { rgblight_mode(1); }
#endif // RGBLIGHT_ENABLE
}
break;
}
return layer_state_set_keymap (state);
}

View File

@@ -49,8 +49,22 @@ enum userspace_layers {
// RGB color codes are no longer located here anymore. Instead, you will want to
// head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h
extern bool is_overwatch;
extern bool rgb_layer_change;
extern bool clicky_enable;
#ifdef RGBLIGHT_ENABLE
void rgblight_sethsv_default_helper(uint8_t index);
#endif // RGBLIGHT_ENABLE
#define EECONFIG_USERSPACE (uint8_t *)20
typedef union {
uint32_t raw;
struct {
bool clicky_enable :1;
bool is_overwatch :1;
};
} userspace_config_t;
enum userspace_custom_keycodes {
EPRM = SAFE_RANGE, // can always be here
@@ -59,9 +73,6 @@ enum userspace_custom_keycodes {
KC_COLEMAK,
KC_DVORAK,
KC_WORKMAN,
LOWER,
RAISE,
ADJUST,
KC_DIABLO_CLEAR,
KC_OVERWATCH,
KC_SALT,
@@ -90,6 +101,11 @@ enum userspace_custom_keycodes {
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST)
#define KC_SEC1 KC_SECRET_1
#define KC_SEC2 KC_SECRET_2
#define KC_SEC3 KC_SECRET_3
@@ -102,6 +118,20 @@ enum userspace_custom_keycodes {
#define WORKMAN KC_WORKMAN
#define KC_RST KC_RESET
#ifdef SWAP_HANDS_ENABLE
#define KC_C1R3 SH_TT
#else // SWAP_HANDS_ENABLE
#define KC_C1R3 KC_BSPC
#endif // SWAP_HANDS_ENABLE
// OSM keycodes, to keep things clean and easy to change
#define KC_MLSF OSM(MOD_LSFT)
#define KC_MRSF OSM(MOD_RSFT)
#define MG_NKRO MAGIC_TOGGLE_NKRO
#ifdef TAP_DANCE_ENABLE
enum {
TD_D3_1 = 0,
@@ -111,72 +141,6 @@ enum {
};
#endif // TAP_DANCE_ENABLE
#ifdef UNICODEMAP_ENABLE
/* use X(n) to call the */
enum unicode_name {
THINK, // thinking face 🤔
GRIN, // grinning face 😊
SMRK, // smirk 😏
WEARY, // good shit 😩
UNAMU, // unamused 😒
SNEK, // snke 🐍
PENGUIN, // 🐧
DRAGON, // 🐉
MONKEY, // 🐒
CHICK, // 🐥
OKOK, // 👌
EFFU, // 🖕
INUP, // 👆
THUP, // 👍
THDN, // 👎
BBB, // dat B 🅱
POO, // poop 💩
HUNDR, // 100 💯
EGGPL, // EGGPLANT 🍆
WATER, // wet 💦
TUMBLER, // 🥃
LIT, // fire 🔥
IRONY, // ‽
DEGREE, // °
};
const uint32_t PROGMEM unicode_map[] = {
[THINK] = 0x1F914,
[GRIN] = 0x1F600,
[BBB] = 0x1F171,
[POO] = 0x1F4A9,
[HUNDR] = 0x1F4AF,
[SMRK] = 0x1F60F,
[WEARY] = 0x1F629,
[EGGPL] = 0x1F346,
[WATER] = 0x1F4A6,
[LIT] = 0x1F525,
[UNAMU] = 0x1F612,
[SNEK] = 0x1F40D,
[PENGUIN] = 0x1F427,
[BOAR] = 0x1F417,
[MONKEY] = 0x1F412,
[CHICK] = 0x1F425,
[DRAGON] = 0x1F409,
[OKOK] = 0x1F44C,
[EFFU] = 0x1F595,
[INUP] = 0x1F446,
[THDN] = 0x1F44E,
[THUP] = 0x1F44D,
[TUMBLER] = 0x1F943,
[IRONY] = 0x0203D,
[DEGREE] = 0x000B0,
};
#endif //UNICODEMAP_ENABLE
// Custom Keycodes for Diablo 3 layer
// But since TD() doesn't work when tap dance is disabled
@@ -193,22 +157,6 @@ const uint32_t PROGMEM unicode_map[] = {
#define KC_D3_4 KC_4
#endif // TAP_DANCE_ENABLE
// OSM keycodes, to keep things clean and easy to change
#define KC_MLSF OSM(MOD_LSFT)
#define KC_MRSF OSM(MOD_RSFT)
// If we're still using the official Faux Clicky feature, substitute codes
// so that we don't have any unused/blank keys.
#ifdef FAUXCLICKY_ENABLE
#define AUD_ON FC_ON
#define AUD_OFF FC_OFF
#else // FAUXCLICKY_ENABLE
#define AUD_ON AU_ON
#define AUD_OFF AU_OFF
#endif // FAUXCLICKY_ENABLE
// Since our quirky block definitions are basically a list of comma separated
@@ -286,7 +234,8 @@ const uint32_t PROGMEM unicode_map[] = {
#define _________________NORMAN_R2_________________ KC_J, KC_N, KC_I, KC_O, KC_U
#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0
// Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
// this allows us to quickly modify the bottom row for all of the layouts
@@ -301,4 +250,4 @@ const uint32_t PROGMEM unicode_map[] = {
KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
#endif
#endif // !USERSPACE

View File

@@ -0,0 +1,71 @@
#ifndef UNICODE_USERSPACE_H
#define UNICODE_USERSPACE_H
/* use X(n) to call the */
enum unicode_name {
THINK, // thinking face 🤔
GRIN, // grinning face 😊
SMRK, // smirk 😏
WEARY, // good shit 😩
UNAMU, // unamused 😒
SNEK, // snke 🐍
PENGUIN, // 🐧
DRAGON, // 🐉
MONKEY, // 🐒
CHICK, // 🐥
BOAR, // 🐗
OKOK, // 👌
EFFU, // 🖕
INUP, // 👆
THUP, // 👍
THDN, // 👎
BBB, // dat B 🅱
POO, // poop 💩
HUNDR, // 100 💯
EGGPL, // EGGPLANT 🍆
WATER, // wet 💦
TUMBLER, // 🥃
LIT, // fire 🔥
BANG, // ‽
IRONY, // ⸮
DEGREE // °
};
const uint32_t PROGMEM unicode_map[] = {
[THINK] = 0x1F914,
[GRIN] = 0x1F600,
[BBB] = 0x1F171,
[POO] = 0x1F4A9,
[HUNDR] = 0x1F4AF,
[SMRK] = 0x1F60F,
[WEARY] = 0x1F629,
[EGGPL] = 0x1F346,
[WATER] = 0x1F4A6,
[LIT] = 0x1F525,
[UNAMU] = 0x1F612,
[SNEK] = 0x1F40D,
[PENGUIN] = 0x1F427,
[BOAR] = 0x1F417,
[MONKEY] = 0x1F412,
[CHICK] = 0x1F425,
[DRAGON] = 0x1F409,
[OKOK] = 0x1F44C,
[EFFU] = 0x1F595,
[INUP] = 0x1F446,
[THDN] = 0x1F44E,
[THUP] = 0x1F44D,
[TUMBLER] = 0x1F943,
[BANG] = 0x0203D,
[IRONY] = 0x02E2E,
[DEGREE] = 0x000B0
};
#endif

View File

@@ -146,3 +146,31 @@ endif
```
Then, if you run `make keyboard:name NO_SECRETS=yes`, it will default to the test strings in your `<name>.c` file, rather than reading from your file.
Userspace EEPROM config
-----------------------
This adds EEPROM support fo the userspace, so that certain values are configurable in such a way that persists when power is lost. Namely, just the clicky feature and the Overwatch macro option ("is_overwatch"). This is done by reading and saving the structure from EEPROM.
To implement this, first you need to specify the location:
```c
#define EECONFIG_USERSPACE (uint8_t *)20
```
This tells us where in the EEPROM that the data structure is located, and this specifies that it's a byte (8 bits). However, to maximize it's usage, we want to specify a data structure here, so that we can use multiple settings. To do that:
```c
typedef union {
uint32_t raw;
struct {
bool clicky_enable :1;
bool is_overwatch :1;
};
} userspace_config_t;
```
Then, in your C file, you want to add: `userspace_config_t userspace_config;`, and in your `matrix_init_*` function, you want to add `userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);`
From there, you'd want to use the data structure (such as `userspace_config.is_overwatch`) when you want to check this value.
And if you want to update it, update directly and then use `eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);` to write the value back to the EEPROM.