commit
0ad93d7443
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H |
||||||
|
#define CONFIG_USER_H |
||||||
|
|
||||||
|
#include "../../config.h" |
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
#define GRAVE_ESC_CTRL_OVERRIDE |
||||||
|
|
||||||
|
#endif |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
#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) { |
||||||
|
|
||||||
|
} |
@ -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 | |
||||||
|
------------------------------------------------------------------------------------------- |
||||||
|
``` |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
# 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 |
@ -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 |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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; |
||||||
|
} |
||||||
|
}; |
@ -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}] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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; |
||||||
|
} |
||||||
|
|
||||||
|
}; |
@ -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; |
||||||
|
} |
||||||
|
|
||||||
|
}; |
@ -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}] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,3 +1,3 @@ |
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = yes #Don't enable this along with I2C
|
||||||
|
@ -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}] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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 |
@ -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 |
@ -0,0 +1,2 @@ |
|||||||
|
# A modified planck layout with arrow cluster |
||||||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#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 |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H |
||||||
|
#define CONFIG_USER_H |
||||||
|
|
||||||
|
#include "config_common.h" |
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
// 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; |
||||||
|
} |
@ -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 |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H |
||||||
|
#define CONFIG_USER_H |
||||||
|
|
||||||
|
#include "config_common.h" |
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#define DISABLE_SPACE_CADET_ROLLOVER |
||||||
|
|
||||||
|
|
||||||
|
#endif |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/// 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; |
||||||
|
}; |
@ -0,0 +1,3 @@ |
|||||||
|
# /u/rooski15 layout |
||||||
|
|
||||||
|
Changes include numpad codes, layer additions, and a toggle-able arrow cluster that is non layer dependant. |
@ -0,0 +1,2 @@ |
|||||||
|
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
#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); |
||||||
|
} |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
#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 |
@ -0,0 +1,18 @@ |
|||||||
|
# Prime_R |
||||||
|
|
||||||
|
 |
||||||
|
|
||||||
|
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. |
||||||
|
|
@ -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
|
@ -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
|
||||||
|
}; |
@ -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│▒▒▒▒▒│ │▒▒▒▒▒│ |
||||||
|
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ |
||||||
|
│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ |
||||||
|
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ |
@ -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
|
||||||
|
}; |
@ -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│▒▒▒▒▒│ │▒▒▒▒▒│ |
||||||
|
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ |
||||||
|
│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ |
||||||
|
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ |
@ -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)) |
||||||
|
}; |
@ -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. |
@ -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 |
@ -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}] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,2 @@ |
|||||||
|
cd c:/QMK |
||||||
|
make xd60 / / / / / / / / |
@ -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
|
||||||
|
}; |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H |
||||||
|
#define CONFIG_USER_H |
||||||
|
|
||||||
|
#include "../../config.h" |
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif |
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
#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; |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
# Modified keymap for xd75 with numpad on right |
@ -0,0 +1,18 @@ |
|||||||
|
# Copyright 2013 Jun Wako <wakojun@gmail.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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR |
||||||
|
include ../../../../Makefile
|
||||||
|
endif |
@ -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 |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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. |
@ -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
|
@ -0,0 +1 @@ |
|||||||
|
#include "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 |
@ -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; |
||||||
|
} |
@ -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 |
@ -0,0 +1,14 @@ |
|||||||
|
Copyright <year> <name> <email> @<github_username> |
||||||
|
|
||||||
|
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/>. |
@ -0,0 +1 @@ |
|||||||
|
SRC += gordon.c
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue