merging
@ -0,0 +1,80 @@
|
||||
/*
|
||||
Copyright 2012 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 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 Arbitrary Definitions
|
||||
#define PRODUCT Planckeus
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Planckeus
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 11
|
||||
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
||||
#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* 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)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@ -0,0 +1,45 @@
|
||||
#include "atreus.h"
|
||||
|
||||
#define BASE 0
|
||||
#define SYMB 1
|
||||
#define ETC 2
|
||||
|
||||
enum macro_id {
|
||||
TEENSY,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = KEYMAP(
|
||||
KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN,
|
||||
LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H,
|
||||
SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH),
|
||||
KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT)
|
||||
),
|
||||
|
||||
[SYMB] = KEYMAP(
|
||||
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS,
|
||||
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT,
|
||||
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO,
|
||||
KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS
|
||||
),
|
||||
|
||||
[ETC] = KEYMAP(
|
||||
RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME,
|
||||
LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS,
|
||||
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case TEENSY:
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -1 +1,5 @@
|
||||
# The default keymap for cluecard
|
||||
|
||||
Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects.
|
||||
So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness
|
||||
buttons. You can of course also turn them on and off with the on/off button.
|
||||
|
@ -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 = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # 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 = yes # Enable WS2812 RGB underlight.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,12 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2
|
||||
|
||||
#endif
|
@ -0,0 +1,28 @@
|
||||
#include "cluecard.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
RGB_TOG, RGB_SAI, RGB_VAI, \
|
||||
RGB_HUD, RGB_HUI, \
|
||||
RGB_MOD, RGB_SAD, RGB_VAD, \
|
||||
BL_STEP, \
|
||||
KC_NO, KC_NO, KC_NO \
|
||||
)
|
||||
};
|
||||
|
||||
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85};
|
||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85};
|
||||
|
||||
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,7 @@
|
||||
# RGB effect test keymap for cluecard
|
||||
|
||||
This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each
|
||||
effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check
|
||||
the `rgblight.c` file.
|
||||
|
||||
The hue, saturation and brightness buttons will work depending on which effect is active.
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
|
||||
|
||||
sudo "${HL}" | grep --line-buffered LAYER: | \
|
||||
(while read line; do
|
||||
case $line in
|
||||
LAYER:*)
|
||||
layer="$(echo $(echo $line | cut -d: -f2-))"
|
||||
notify-send -i mark-location-symbolic "Switched to layer: $layer"
|
||||
;;
|
||||
esac
|
||||
done)
|
@ -0,0 +1,17 @@
|
||||
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
|
||||
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 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 = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,12 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define FORCE_NKRO
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#undef IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#endif
|
@ -0,0 +1,107 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define ETC 2 // etc
|
||||
|
||||
enum macro_id {
|
||||
TEENSY,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP,
|
||||
CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN,
|
||||
KC_GRV, KC_DEL, KC_DEL, KC_LALT, GUI_T(KC_TAB),
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO,
|
||||
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT,
|
||||
KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT),
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC)
|
||||
),
|
||||
|
||||
[SYMB] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
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_BSLS,
|
||||
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS,
|
||||
KC_TILD, KC_AMPR, KC_AMPR, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_NO,
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_NO,
|
||||
KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS,
|
||||
KC_0, KC_NO, KC_DOT, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[ETC] = KEYMAP(
|
||||
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, KC_NO,
|
||||
KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO,
|
||||
KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case TEENSY:
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
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) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
BOOTMAGIC_ENABLE=no
|
||||
COMMAND_ENABLE=no
|
||||
SLEEP_LED_ENABLE=no
|
||||
FORCE_NKRO ?= yes
|
||||
DEBUG_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
@ -0,0 +1,15 @@
|
||||
Dvorak Programmer Layout
|
||||
========================
|
||||
|
||||
This is a dvorak-only layout. The overall philosophy is that the left hand contains a number of layer-switching shortcuts, and the right hand key codes vary based on the layer selected.
|
||||
|
||||
Layers
|
||||
------
|
||||
|
||||
* BASE: this is where you type.
|
||||
* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
|
||||
* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
|
||||
* KEY_SEL: same as above, but every movement shift-selects.
|
||||
* NUMBER: keypad layer.
|
||||
* SYMBOL: all the symbols as well as brackets at the bottom.
|
||||
* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
|
@ -0,0 +1,403 @@
|
||||
|
||||
#include "ergodox.h"
|
||||
#include "led.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "action_code.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SHELL_NAV 1
|
||||
#define KEY_NAV 3 // key navigation layer
|
||||
#define KEY_SEL 4 // key selection layer
|
||||
#define NUMBER 5 // number layer
|
||||
#define SYMBOL 6
|
||||
#define BRACKETS 7
|
||||
#define SHORTCUTS 8
|
||||
|
||||
// macros
|
||||
#define MC_COPY_LINE 0
|
||||
#define MC_CUT_LINE 1
|
||||
#define MC_PASTE_LINE 2
|
||||
#define MC_NEW_SEARCH_TAB 3
|
||||
#define SCREEN_TAB_LEFT 4
|
||||
#define SCREEN_TAB_RIGHT 5
|
||||
#define SCREEN_NEW_TAB 6
|
||||
#define SWITCH_NDS 7
|
||||
#define SCREEN_COPY_MODE 8
|
||||
#define SCREEN_PASTE 9
|
||||
#define OPEN_CLOSE_PAREN 10
|
||||
#define OPEN_CLOSE_BRACKET 11
|
||||
#define OPEN_CLOSE_CURLY 12
|
||||
#define OPEN_CLOSE_SINGLE_QUOTE 13
|
||||
#define OPEN_CLOSE_DOUBLE_QUOTE 14
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
|
||||
#define SEMICOLON_NEWLINE 16
|
||||
#define END_NEWLINE 17
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer
|
||||
[3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot
|
||||
[4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot
|
||||
[5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot
|
||||
};
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_SHIFT_CAPSLOCK = 0,
|
||||
TD_BRK_LEFT = 1,
|
||||
TD_BRK_RIGHT = 2
|
||||
};
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// base layer
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
LT(BRACKETS,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
|
||||
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
|
||||
OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
|
||||
// thumb cluster
|
||||
RCTL(KC_F), RCTL(KC_S),
|
||||
RCTL(KC_DEL),
|
||||
KC_BSPC,RCTL(KC_BSPC),KC_DEL,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS,
|
||||
KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK),
|
||||
// lower keys - browser tab control
|
||||
RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), RCTL(KC_K), RCTL(KC_W),
|
||||
// thumb cluster
|
||||
M(SEMICOLON_NEWLINE), M(END_NEWLINE),
|
||||
KC_UP,
|
||||
KC_DOWN,KC_ENT, KC_SPC
|
||||
),
|
||||
|
||||
|
||||
// shell navigation layer
|
||||
[SHELL_NAV] = KEYMAP(
|
||||
// left 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_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
LALT(KC_D),
|
||||
KC_TRNS,RCTL(KC_W),KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), HYPR(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
// key navigation layer
|
||||
[KEY_NAV] = KEYMAP(
|
||||
// left 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_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
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_PGDN, KC_HOME, KC_UP, KC_END, KC_PGUP, M(MC_COPY_LINE),
|
||||
RCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, RCTL(KC_RIGHT), M(MC_CUT_LINE),
|
||||
KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
|
||||
// bottom row
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// key selection layer
|
||||
[KEY_SEL] = KEYMAP(
|
||||
// left 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_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
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,
|
||||
RSFT(KC_PGUP), RSFT(KC_PGDN), RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), M(MC_COPY_LINE),
|
||||
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), M(MC_CUT_LINE),
|
||||
RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
|
||||
// bottom row
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// number layer
|
||||
[NUMBER] = KEYMAP(
|
||||
// left 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_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
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_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_COLN, KC_TRNS,
|
||||
// bottom row
|
||||
KC_0, KC_DOT, KC_COMMA, KC_TRNS, KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
[SYMBOL] = KEYMAP(
|
||||
// left hand
|
||||
KC_NO,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS,KC_TRNS, M(OPEN_CLOSE_PAREN), KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, M(OPEN_CLOSE_BRACKET), KC_LBRC, KC_RBRC, M(OPEN_CLOSE_DOUBLE_QUOTE),
|
||||
KC_TRNS,M(SEMICOLON_NEWLINE),M(OPEN_CLOSE_CURLY), KC_LCBR, KC_RCBR, M(OPEN_CLOSE_SINGLE_QUOTE),KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS,
|
||||
KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS,
|
||||
KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS,
|
||||
KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS,
|
||||
KC_LBRC, KC_RBRC, TD(TD_BRK_LEFT), TD(TD_BRK_RIGHT), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[BRACKETS] = KEYMAP(
|
||||
// left 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_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,
|
||||
// right hand
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(OPEN_CLOSE_BRACKET),M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_CURLY),KC_TRNS,KC_TRNS,
|
||||
KC_TRNS, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, 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
|
||||
),
|
||||
|
||||
[SHORTCUTS] = KEYMAP(
|
||||
// left hand
|
||||
KC_NO, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), HYPR(KC_F6),
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12), M(SWITCH_NDS),
|
||||
KC_TRNS, HYPR(KC_A), HYPR(KC_B), HYPR(KC_C), HYPR(KC_D), HYPR(KC_E), HYPR(KC_F),
|
||||
HYPR(KC_G), HYPR(KC_H), HYPR(KC_I), HYPR(KC_J), HYPR(KC_K), HYPR(KC_L),
|
||||
KC_TRNS, HYPR(KC_M), HYPR(KC_N), HYPR(KC_O), HYPR(KC_P), HYPR(KC_Q), HYPR(KC_R),
|
||||
LALT(KC_LEFT),LALT(KC_RIGHT),KC_F5, LCTL(LGUI(KC_LEFT)), LCTL(LGUI(KC_RIGHT)),
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case MC_COPY_LINE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(C), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case MC_CUT_LINE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(X), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case MC_PASTE_LINE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(END), T(ENTER), D(LCTL), T(V), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case MC_NEW_SEARCH_TAB:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(T), T(K), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_TAB_LEFT:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(P), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_TAB_RIGHT:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(N), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_NEW_TAB:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_COPY_MODE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_PASTE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END);
|
||||
}
|
||||
break;
|
||||
case SWITCH_NDS:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END);
|
||||
}
|
||||
break;
|
||||
case OPEN_CLOSE_PAREN:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case OPEN_CLOSE_BRACKET:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(LBRC), T(RBRC), T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case OPEN_CLOSE_CURLY:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case OPEN_CLOSE_SINGLE_QUOTE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(QUOT), T(QUOT), T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case OPEN_CLOSE_DOUBLE_QUOTE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LSFT), T(QUOT), T(QUOT), U(LSFT), T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(UP), T(HOME), D(LALT), T(D), U(LALT), END);
|
||||
}
|
||||
break;
|
||||
case SEMICOLON_NEWLINE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(END), T(SCLN), T(ENTER), END);
|
||||
}
|
||||
break;
|
||||
case END_NEWLINE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(END), T(ENTER), END);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
ergodox_right_led_1_on();
|
||||
} else {
|
||||
ergodox_right_led_1_off();
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_SHIFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPSLOCK),
|
||||
[TD_BRK_LEFT] = ACTION_TAP_DANCE_DOUBLE (KC_LPRN, KC_LCBR),
|
||||
[TD_BRK_RIGHT] = ACTION_TAP_DANCE_DOUBLE (KC_RPRN, KC_RCBR)
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 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_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
case NUMBER:
|
||||
case SYMBOL:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case KEY_NAV:
|
||||
case KEY_SEL:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case SHORTCUTS:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
return;
|
||||
};
|
@ -0,0 +1,231 @@
|
||||
/*
|
||||
* This is built out of frustration with OSX / Sierra caps lock delay.
|
||||
* Fake it till you make it!
|
||||
*/
|
||||
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "timer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
#define BLINK_BASE 150U // timer threshold for blinking on MDIA layer
|
||||
|
||||
typedef enum onoff_t {OFF, ON} onoff;
|
||||
|
||||
#define caps_led_on ergodox_right_led_2_on
|
||||
#define caps_led_off ergodox_right_led_2_off
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | ` | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | CapsL | A | S | D | F | G |------| |------| H | J | K | L | ; | " |
|
||||
* |--------+------+------+------+------+------| ~L1 | | ~L1 |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Ctrl | Opt | Cmd | Left | Right| | Down | Up | Ctrl | Cmd | Opt |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | L1 | | Alt | Ctrl ]
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* |Backsp| Del |------| |------| Enter | Spc |
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC,
|
||||
M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G),
|
||||
KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), KC_FN0,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT,
|
||||
KC_TRNS, KC_FN1,
|
||||
KC_HOME,
|
||||
KC_BSPC, KC_DEL, KC_END,
|
||||
// right hand
|
||||
KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS,
|
||||
M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT,
|
||||
KC_FN0, M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT,
|
||||
KC_RALT, KC_RCTL,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_ENT, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L0 | L2 | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_GRV ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_FN3, KC_FN2,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, 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
|
||||
),
|
||||
/* Keymap 2: Media and tenkey
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | BOOTL | | Mute | Vol- | Vol+ | F14 | F15 | | | | NumLk| / | * | - | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 7 | 8 | 9 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+-----+-------+------+------+--------|
|
||||
* | | | | | | |------| |------| | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 1 | 2 | 3 | Enter| |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | 0 | . | Enter| |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L1 | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND TENKEY
|
||||
[MDIA] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, KC_F15,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
|
||||
KC_FN4, KC_NO,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_NO, KC_NO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NO,
|
||||
KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NO,
|
||||
KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO,
|
||||
KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_NO,
|
||||
KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_LAYER_MOMENTARY(SYMB), // FN0 - Momentary Layer 1 (Symbols)
|
||||
ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols)
|
||||
ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media)
|
||||
ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols)
|
||||
ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia)
|
||||
ACTION_LAYER_MOMENTARY(MDIA) // FN5 - Momentary Layer 2 (Mdia)
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static onoff caps_state = OFF;
|
||||
switch(id) {
|
||||
case KC_CAPS:
|
||||
if (record->event.pressed) {
|
||||
// Toggle caps state;
|
||||
if (caps_state == OFF) {
|
||||
// Turn it on then!
|
||||
caps_led_on();
|
||||
caps_state = ON;
|
||||
} else {
|
||||
caps_led_off();
|
||||
caps_state = OFF;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (record->event.pressed) {
|
||||
bool shifted = false;
|
||||
if (caps_state == ON && get_mods() == 0) {
|
||||
register_code(KC_LSFT);
|
||||
shifted = true;
|
||||
}
|
||||
register_code(id);
|
||||
if(shifted) {
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
} else {
|
||||
unregister_code(id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// 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);
|
||||
|
||||
static onoff board_led_state = OFF;
|
||||
static uint16_t dt = 0;
|
||||
static uint8_t oldlayer = 0;
|
||||
|
||||
if(oldlayer != layer) {
|
||||
// Layer was just toggled.
|
||||
if(layer == BASE) {
|
||||
ergodox_board_led_off();
|
||||
board_led_state = OFF;
|
||||
} else {
|
||||
ergodox_board_led_on();
|
||||
board_led_state = ON;
|
||||
}
|
||||
} else if (layer >= MDIA) {
|
||||
// We need to do blinking.
|
||||
if(timer_elapsed(dt) > BLINK_BASE) {
|
||||
// toggle
|
||||
dt = timer_read();
|
||||
if(board_led_state == OFF) {
|
||||
ergodox_board_led_on();
|
||||
board_led_state = ON;
|
||||
} else {
|
||||
ergodox_board_led_off();
|
||||
board_led_state = OFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
oldlayer = layer;
|
||||
}
|
After Width: | Height: | Size: 181 KiB |
@ -0,0 +1,38 @@
|
||||
# The extra special ergodox build for MacOS Sierra caps lock users
|
||||
|
||||
###Do you
|
||||
- Hate the OSX / MacOS caps lock delay?
|
||||
- Have an ergodox?
|
||||
|
||||
###Then this might just be for you!
|
||||
|
||||
[This](http://apple.stackexchange.com/questions/81234/how-to-remove-caps-lock-delay-on-apple-macbook-pro-aluminum-keyboard)
|
||||
and [this](http://sleepycow.org/2014/07/removing-the-caps-lock-delay-on-a-macbook/)
|
||||
are good workarounds for the caps lock delay, however none of these
|
||||
work on Sierra. This abomination of a keymap simulates capslock to the best
|
||||
of its abilities.
|
||||
This means that it keeps track of caps lock state internally rather than
|
||||
sending a caps lock keypress to the OS. It is smart enough to check for
|
||||
modifiers, such as Control being held down, and stop it with the hanky panky
|
||||
and just send on the key event unmolested even if FakeCaps is enabled. And
|
||||
since the macro isn't even registered on the non-alphas, it will not affect
|
||||
them regardless. Only in the event that FakeCaps is enabled and an alpha key
|
||||
is pressed will it sneak in a shift keydown before the alpha keydown and
|
||||
immediately afterward sneaks in a shift keyup. Generally this works well,
|
||||
however there is one known issue:
|
||||
|
||||
- Holding down a key will only have the first character in caps. For instance,
|
||||
with caps lock on, if you hold down the 'a' key, you get:
|
||||
|
||||
```
|
||||
Aaaaaaaaaaaaaaaaaa
|
||||
```
|
||||
|
||||
I have only tested this on an original Ergodox with a Teensy 2.0.
|
||||
|
||||
####Some other small tweaks
|
||||
- Layer 0 board light is off
|
||||
- Layer 1 board light is on solid
|
||||
- Layer 2 board light blinks at speed controlled by BLINK_BASE
|
||||
|
||||
![osx whiskey tango foxtrot](osx_whiskey_tango_foxtrot_capslock.png)
|
@ -0,0 +1,184 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | Home | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | End | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Enter |Space |
|
||||
* | |ace | LGui | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_HOME,
|
||||
KC_END,
|
||||
KC_SPC,KC_BSPC,KC_LGUI,
|
||||
// right hand
|
||||
KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_ENT, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | 0 | . | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||
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_0, KC_0, KC_DOT, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
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_VOLD, KC_VOLU, 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) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// 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,10 @@
|
||||
# ErgoDox EZ Phoenix Configuration
|
||||
|
||||
I started working using the default layout. The changes that I made are largely things that I consistely do wrong.
|
||||
|
||||
As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other.
|
||||
|
||||
## Changelog
|
||||
|
||||
* April 25, 2016 (V1.0):
|
||||
* Initial submission.
|
@ -0,0 +1,7 @@
|
||||
## v0.3
|
||||
|
||||
*2016-10-11*
|
||||
|
||||
### Starting point
|
||||
|
||||
* The starting point of this keymap. A beginner layout, and a couple placeholders.
|
@ -0,0 +1,9 @@
|
||||
CONSOLE_ENABLE = no # for debugging
|
||||
|
||||
SLEEP_LED_ENABLE = no # no led blinking while sleeping
|
||||
NKRO_ENABLE = yes # disable for windows
|
||||
TAP_DANCE_ENABLE = yes # tap-tap-tap
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,65 @@
|
||||
pvinis' keymap
|
||||
==============
|
||||
|
||||
This is a getting-used-to keymap for the [ErgoDox EZ][ez]. It's very much a work in progress.
|
||||
|
||||
[ez]: https://ergodox-ez.com/
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Todo](#todo)
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [Beginner layer](#beginner-layer)
|
||||
- [QWERTY layer](#qwerty-layer)
|
||||
- [CARPALX layer](#carpalx-layer)
|
||||
- [System Control layer](#system-control-layer)
|
||||
- [Template layers](#template-layers)
|
||||
* [Building](#building)
|
||||
|
||||
# Todo
|
||||
|
||||
- [ ] Generate images from keymap
|
||||
- [ ] Implement algernon's heatmap
|
||||
- [ ] Implement `KC_POP`
|
||||
|
||||
# Layouts
|
||||
|
||||
## Base layer
|
||||
|
||||
This is the base layer that contains the common buttons of all keymaps. Right now, it has the top left button as a `flash` button when it's tapped 4 times, and the two thumb islands. The islands contain the `space` and `enter` keys on the right, the `backspace` and `shift` on the left, and all the 1x1 keys are just layer switches.
|
||||
Every time I connect the keyboard, I press the `BEGIN` layer switch, and then start typing.
|
||||
Recently, I added a few application "shortcuts", that basically call `ctrl`+`alt`+`cmd`+`<key>`, and `<key>` is `S` for Slack, `X` for Xcode, `M` for Messenger. Using [Hammerspoon][hammerspoon], I show/hide the application.
|
||||
|
||||
[hammerspoon]: http://www.hammerspoon.org/
|
||||
|
||||
## Beginner layer
|
||||
|
||||
This is a basic keymap I use right now until I'm comfortable typing on the Ergodox. Currently uses a QWERTY layout, and the `([{}])` on the middle keys. Not a perfect layout, and its going to go away at some point, but for now thats my daily driver.
|
||||
|
||||
## QWERTY layer
|
||||
|
||||
This is basically the same as the `BEGIN` layer, but it might go away. I'm not using it, but I should have a QWERTY layout on the keyboard, in case someone else wants to try it out, or if I completely forget how keyboards work! At some point, this and the `BEGIN` layer will become one.
|
||||
|
||||
## CARPALX layer
|
||||
|
||||
This is here as a placeholder. I want to transition to [Carpalx QGMLWY][carpalx] or [White][white] at some point. They both look very interesting and more comfortable to type on, but after I'm confident with typing on the Ergodox.
|
||||
|
||||
[carpalx]: http://mkweb.bcgsc.ca/carpalx/?full_optimization
|
||||
[white]: https://github.com/mw8/white_keyboard_layout
|
||||
|
||||
## System Control layer
|
||||
|
||||
This one is a layer that, in time, will have controls like mouse movement, volume up/down, mute, sleep, restart, shutdown, etc.
|
||||
|
||||
## Template layers
|
||||
|
||||
I have two commented out layers that are just templates, so I can easily create a new layer.
|
||||
|
||||
# Building
|
||||
|
||||
```
|
||||
$ git clone https://github.com/jackhumbert/qmk_firmware.git
|
||||
$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis
|
||||
$ make
|
||||
```
|
@ -0,0 +1,430 @@
|
||||
// pvinis' ergodox keymap
|
||||
|
||||
#include "ergodox.h"
|
||||
#include "mousekey.h"
|
||||
|
||||
// easier name for left ctrl-alt-gui
|
||||
#define ALLM(kc) LCAG(kc)
|
||||
|
||||
// layers
|
||||
enum {
|
||||
BASE = 0,
|
||||
BEGIN,
|
||||
QWERTY,
|
||||
CARPALX,
|
||||
SYSCTL,
|
||||
};
|
||||
|
||||
// extra keys
|
||||
enum {
|
||||
NONE = 0,
|
||||
|
||||
// mouse
|
||||
MS_UL, // up left
|
||||
MS_UR, // up right
|
||||
MS_DL, // down left
|
||||
MS_DR, // down right
|
||||
|
||||
// tap dance
|
||||
TD_FLSH, // flash keyboard
|
||||
};
|
||||
|
||||
// application selection
|
||||
// this is sending ctrl-alt-gui-<key>, and this is picked up by hammerspoon
|
||||
#define AP_SLCK ALLM(KC_S)
|
||||
#define AP_XCOD ALLM(KC_X)
|
||||
#define AP_MSGR ALLM(KC_M)
|
||||
|
||||
// keymaps
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* BASE
|
||||
* the base of the keyboard.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |4x FLASH| | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |BEGIN |QWERTY| |SYSCTL| |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | |CARPAL| |Slack | | |
|
||||
* |Backsp|LShift|------| |------| Enter |Space |
|
||||
* | | |SYSCTL| |Msngr | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP(
|
||||
TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,TG(BEGIN) ,TG(QWERTY)
|
||||
,TG(CARPALX)
|
||||
,KC_BSPC ,KC_LSFT ,TG(SYSCTL)
|
||||
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,TG(SYSCTL) ,KC_NO
|
||||
,AP_SLCK
|
||||
,AP_MSGR ,KC_ENT ,KC_SPC
|
||||
),
|
||||
|
||||
/* BEGIN
|
||||
* a beginner's keymap i currently use.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter |
|
||||
* |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | ` | Cmd | | Cmd | | | | | ' | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[BEGIN] = KEYMAP(
|
||||
KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6
|
||||
,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
|
||||
,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
||||
,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN
|
||||
,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL
|
||||
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS
|
||||
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT
|
||||
,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT
|
||||
,KC_UP ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
|
||||
/* QWERTY
|
||||
* the default qwerty keymap. not really used, but i'll keep it here for now.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | Q | W | E | R | T | | | | Y | U | I | O | P | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | A | S | D | F | G |------| |------| H | J | K | L | ; | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Z | X | C | V | B | | | | N | M | , | . | / | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[QWERTY] = KEYMAP(
|
||||
KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS
|
||||
,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
|
||||
,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,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_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS
|
||||
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS
|
||||
,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
|
||||
/* CARPALX
|
||||
* the keymap i would like to transition to.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | D | S | T | N | R |------| |------| I | A | E | O | H | |
|
||||
* |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------|
|
||||
* | | Z | X | C | V | J | | | | K | P | , | . | / | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Up | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[CARPALX] = KEYMAP(
|
||||
KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS
|
||||
,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R
|
||||
,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,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_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS
|
||||
,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS
|
||||
,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS
|
||||
,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
/* SYSCTL
|
||||
* a keymap to control my system.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | Mute |VolDn |VolUp | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | |MsUpL | MsUp |MsUpR | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | Lock |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | |MsDnL | MsDn | | | Sleep |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | Power|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | |MidClk|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Left |Right |
|
||||
* | | |------| |------| Click| Click|
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[SYSCTL] = KEYMAP(
|
||||
KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
/*,KC_POP*/,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO
|
||||
/*,KC_PTRN*/,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LCTL(LSFT(KC_PWR))
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_SLEP
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
),
|
||||
|
||||
/* TEMPLATE
|
||||
* keymap template with transparent and non-transparent keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
/*
|
||||
[TEMPLATE] = KEYMAP(
|
||||
KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
|
||||
,KC_TRNS ,KC_TRNS
|
||||
,KC_TRNS
|
||||
,KC_TRNS ,KC_TRNS ,KC_TRNS
|
||||
),
|
||||
[TEMPLATE] = KEYMAP(
|
||||
KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
// keyboard initialization
|
||||
void matrix_init_user() {
|
||||
ergodox_led_all_on();
|
||||
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
|
||||
ergodox_led_all_set(i);
|
||||
wait_ms(5);
|
||||
}
|
||||
wait_ms(1000);
|
||||
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
|
||||
ergodox_led_all_set(i);
|
||||
wait_ms(10);
|
||||
}
|
||||
ergodox_led_all_off();
|
||||
}
|
||||
|
||||
// extra keys
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
|
||||
// mouse
|
||||
case MS_UL:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_UP);
|
||||
mousekey_on(KC_MS_LEFT);
|
||||
} else {
|
||||
mousekey_off(KC_MS_UP);
|
||||
mousekey_off(KC_MS_LEFT);
|
||||
}
|
||||
break;
|
||||
case MS_UR:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_UP);
|
||||
mousekey_on(KC_MS_RIGHT);
|
||||
} else {
|
||||
mousekey_off(KC_MS_UP);
|
||||
mousekey_off(KC_MS_RIGHT);
|
||||
}
|
||||
break;
|
||||
case MS_DL:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_DOWN);
|
||||
mousekey_on(KC_MS_LEFT);
|
||||
} else {
|
||||
mousekey_off(KC_MS_DOWN);
|
||||
mousekey_off(KC_MS_LEFT);
|
||||
}
|
||||
break;
|
||||
case MS_DR:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_DOWN);
|
||||
mousekey_on(KC_MS_RIGHT);
|
||||
} else {
|
||||
mousekey_off(KC_MS_DOWN);
|
||||
mousekey_off(KC_MS_RIGHT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
// tap dances
|
||||
|
||||
// flash keyboard on 4x tap, with leds
|
||||
void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_3_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_1_off();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
reset_keyboard();
|
||||
reset_tap_dance(state);
|
||||
}
|
||||
}
|
||||
|
||||
void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ergodox_right_led_1_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
|
||||
};
|
@ -0,0 +1,213 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
/* Keymap 0: Basic Dvorak layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - |
|
||||
* |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------|
|
||||
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A |
|
||||
* `----------------------------------' `------------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | DEL | | | END | HOME |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | SUPER| | PgUp | | |
|
||||
* | BACK | CTRL |------| |------| Enter |SPACE |
|
||||
* | SPACE| | ALT | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[0] = KEYMAP(
|
||||
TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT),
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3),
|
||||
KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2),
|
||||
MO(3), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(2),
|
||||
KC_DELETE, KC_TRNS,
|
||||
KC_LGUI,
|
||||
KC_BSPACE,CTL_T(KC_NO),KC_LALT,
|
||||
|
||||
KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS,
|
||||
KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSHIFT,
|
||||
KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_UNDO, LCTL(KC_A),
|
||||
KC_END, KC_HOME,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_ENTER, KC_SPACE
|
||||
),
|
||||
|
||||
/* Keymap 1: Hebrew layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[1] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_W, KC_QUOTE, KC_SLASH, KC_R, KC_T, KC_TRNS,
|
||||
KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_Y, KC_U, KC_E, KC_O, KC_P, KC_TRNS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_TRNS,
|
||||
KC_TRNS, KC_N, KC_M, KC_COMMA, KC_DOT, KC_I, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: Arrows ,Mouse Navigation and F Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | F11 | | | UP | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | LEFT | DOWN | RIGHT| | |
|
||||
* |--------+------+------+------+------+------| | | F12 |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Lclk | Rclk | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[2] = KEYMAP(
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
KC_F11, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS,
|
||||
KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MS_BTN1, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 3: Numpad Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | NMLK | P/ | P* | P- | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 7 | 8 | 9 | P+ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | 4 | 5 | 6 | P+ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 1 | 2 | 3 | ENTER| |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | 0 | . | ENTER| |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[3] = KEYMAP(
|
||||
// Left 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_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,
|
||||
// Right Hand
|
||||
KC_TRNS, KC_TRNS, KC_LOCKING_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_ENTER, KC_TRNS,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_ENTER, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
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 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
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) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 286 KiB |
@ -0,0 +1,10 @@
|
||||
#Dvorak-Hebrew
|
||||
|
||||
* This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play.
|
||||
|
||||
* The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems.
|
||||
|
||||
* these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout.
|
||||
|
||||
![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png)
|
||||
![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png)
|
@ -0,0 +1,9 @@
|
||||
# Having a file like this allows you to override Makefile definitions
|
||||
# for your own particular keymap
|
||||
|
||||
TAP_DANCE_ENABLE=yes
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,36 @@
|
||||
#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
#define KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
#define MOUSEKEY_TIME_TO_MAX 10
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
#define TAPPING_TERM 300
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
|
||||
/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
|
||||
)
|
||||
|
||||
#ifdef SUBPROJECT_ez
|
||||
#include "ez/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_infinity
|
||||
#include "infinity/config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */
|
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 99 KiB |
@ -0,0 +1,324 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define BASE 0 // default layer - helpful for writing in Office-style word processors.
|
||||
#define SYMB 1 // symbol layer - NumPad, etc. - same as Ergodox EZ default but no EEPROM or Version key
|
||||
#define RIMW 2 // rimworld layer - made for the game RimWorld, by Tynan Sylvester | feel free to remap for your favorite game!
|
||||
#define MDIA 3 // media layer - mouse and music - close to Ergodox EZ default media layer
|
||||
|
||||
#define CO_PA M(0) // hold copy, tap paste
|
||||
|
||||
#define W_CUT LCTL(KC_X) // C-x Cut
|
||||
#define W_COPY LCTL(KC_C) // C-c Copy
|
||||
#define W_PASTE LCTL(KC_V) // C-v Paste
|
||||
#define W_UNDO LCTL(KC_Z) // C-z Undo
|
||||
#define W_FIND LCTL(KC_F) // C-v Find
|
||||
#define W_CAD LCTL(LALT(KC_DEL)) // one-tap ctrl-alt-del
|
||||
|
||||
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
CAKEWARP,
|
||||
CTRLALTMDIA,
|
||||
};
|
||||
|
||||
void cake_count (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 2) {
|
||||
layer_on (SYMB); //define double tap here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
else {
|
||||
layer_off (SYMB); //define single tap or hold here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
if (state->count == 3) {
|
||||
layer_on (RIMW); //define triple tap here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
else {
|
||||
layer_off (RIMW); //define single tap or hold here
|
||||
layer_off (MDIA);
|
||||
reset_tap_dance (state);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cad_mdia_fin (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_LCTL);
|
||||
register_code (KC_LALT);
|
||||
register_code (KC_DEL);
|
||||
} else {
|
||||
layer_on (MDIA);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cad_mdia_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code (KC_DEL);
|
||||
unregister_code (KC_LALT);
|
||||
unregister_code (KC_LCTL);
|
||||
} else {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// tap for Layer 0, tap twice to switch to symbol layer, and tap three times to switch to rimworld layer.
|
||||
[CAKEWARP] = ACTION_TAP_DANCE_FN(cake_count)
|
||||
// tap for ctrl-alt-del, tap twice for media layer
|
||||
,[CTRLALTMDIA] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cad_mdia_fin, dance_cad_mdia_reset)
|
||||
// Other declarations would go here, separated by commas, if you have them
|
||||
};
|
||||
|
||||
//In Layer declaration, add tap dance item in place of a key code
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer - TD(one_tap, two_taps, three_taps...)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F12/L1 | Q | W | E | R | T | {/[ | |TD(L0 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
|
||||
* |Caps/Win| A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
* |--------+------+------+------+------+------| }/] | TD(ctrl|------+------+------+------+------+--------|
|
||||
* |LShift/(|Z/Ctrl| X | C | V | B | | |altdel| N | M | , | . | / |RShift/)|
|
||||
* `--------+------+------+------+------+-------------' |L3) |------+------+------+------+------+--------'
|
||||
* | Undo | Cut |CopyPa| Meh | LGui | '------| | Enter| Left | Up | Down | Right |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Esc | VolUp| | F4 | Mute |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | VolDn| | F5 | | |
|
||||
* |Backsp|Delete|------| |------| Tab / |Space |
|
||||
* |ace | | Find | | Alt | CTRL | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
|
||||
GUI_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_RBRC,
|
||||
W_UNDO, W_CUT, CO_PA, MEH_T(KC_NO), KC_LGUI,
|
||||
KC_ESC, KC_VOLU,
|
||||
KC_VOLD,
|
||||
KC_BSPC, KC_DELETE, W_FIND,
|
||||
// right hand
|
||||
KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
TD(CAKEWARP), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
TD(CTRLALTMDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||
KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
|
||||
KC_F4, KC_MUTE,
|
||||
KC_F5,
|
||||
KC_RALT, CTL_T(KC_TAB), KC_SPC
|
||||
),
|
||||
|
||||
/* Keymap 1: Symbol Layer | No EEPROM Or Version keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | xx | | xx | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | |TD(L0 | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | - |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,
|
||||
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,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_NO, 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_MINS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_NO,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: RimWorld Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | C | ,< | W | >. | R | | |TD(L0 | U | B | N | J | M | PGUP |
|
||||
* |--------+------+------+------+------+------| F10 | |L1 L2)|------+------+------+------+------+--------|
|
||||
* | I | F | A | S | D | 8 |------| |------| X | L | P | Y | H | ENTER |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | K | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PGDN |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | F | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* |SPACE | C |------| |------| E |SPACE |
|
||||
* | | | Q | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// RIMWORLD
|
||||
[RIMW] = KEYMAP(
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_C, KC_COMM, KC_W, KC_DOT, KC_R, KC_F10,
|
||||
KC_I, KC_F, KC_A, KC_S, KC_D, KC_8,
|
||||
KC_K, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_C,KC_Q,KC_TRNS,
|
||||
// right hand
|
||||
KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
KC_TRNS, KC_U, KC_B, KC_N, KC_J, KC_M, KC_PGUP,
|
||||
KC_X, KC_L, SFT_T(KC_P), KC_Y, KC_H, KC_ENT,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN,
|
||||
KC_F, KC_LEFT, KC_UP, KC_DOWN,KC_RIGHT,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_E, KC_TRNS
|
||||
),
|
||||
/* Keymap 3: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | Lclk | Rclk |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
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_BTN1, KC_BTN2, 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
|
||||
),
|
||||
};
|
||||
|
||||
static uint16_t key_timer;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
}
|
||||
else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Anything you want to do once when the keyboard initializes.
|
||||
// Tests LED function when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
wait_ms(500);
|
||||
ergodox_board_led_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_on();
|
||||
wait_ms(200);
|
||||
ergodox_board_led_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 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) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,113 @@
|
||||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||
|
||||
Win10 Writer's Block ErgoDox - v1.0
|
||||
|
||||
=======================
|
||||
|
||||
This is a QWERTY layout for QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10.
|
||||
|
||||
Professional writers may find this layout useful -- copywriters, technical writers, novelists, etc.
|
||||
|
||||
I use my ErgoDox with this keymap as a daily driver at my office.
|
||||
|
||||
A gaming layer is unobtrusively built into this layout. I use that layer to play RimWorld.
|
||||
|
||||
Feel free to modify the gaming layer to your personal taste.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [Symbol layer](#symbol-layer)
|
||||
- [Gaming layer](#rimworld-layer)
|
||||
- [Media layer](#media-layer)
|
||||
* [Tools](#tools)
|
||||
- [Layer notification](#layer-notification)
|
||||
* [Building](#building)
|
||||
- [Using on Windows](#using-on-windows)
|
||||
* [License](#license)
|
||||
* [Special Thanks](#special-thanks)
|
||||
|
||||
# Layouts
|
||||
|
||||
* TapDance will teleport you to the layer you want:
|
||||
* One Tap for the Base layer
|
||||
* Two Taps for the Symbol layer
|
||||
* Three Taps for the Rimworld/Gaming layer
|
||||
|
||||
* Where the "Meh" key is located on the Ergodox EZ default layout, I've changed it to another tap dance key:
|
||||
* One Tap for CTRL-ALT-DEL
|
||||
* Two Taps for the Media/Mouse layer
|
||||
|
||||
## Base layer
|
||||
|
||||
[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/8fd9bbdd3a23bbb5a8779de3624a3be1)
|
||||
|
||||
This is a QWERTY layout with some quirks.
|
||||
|
||||
* Enter is located on a key that won't cause as much thumb fatigue.
|
||||
* Copy and Paste work from the same key. Just hold the key to copy and tap the key to paste!
|
||||
* Undo, Find and Cut are also one-touch keys.
|
||||
* F12 is where you would normally find TAB on standard layouts. Quickly save in Word, safely.
|
||||
* You'll find bracket keys below the "6" key.
|
||||
|
||||
* The Meh Key is a single-button CTRL+ALT+SHIFT modifier.
|
||||
|
||||
* Space Cadet Shift: Tap L Shift for "(" and R Shift for ")" -- holding either shift works like a normal shift.
|
||||
* Tap "Z" or Tab to use either normally. Hold them for CTRL.
|
||||
* Tap Caps Lock to use it normally. Hold it for Win key combinations (Win+D to minimize all programs, etc).
|
||||
|
||||
## Symbol layer
|
||||
|
||||
[![Symbol layer](images/symbol-layer.png)](http://www.keyboard-layout-editor.com/#/gists/04eb6458b8b17882e472f64d482f12b4)
|
||||
|
||||
Your standard Ergodox EZ symbol + numpad layout, minus the Version and EEPROM keys.
|
||||
|
||||
* From the base layer, hold the F12 Key to temporarily access this layer (use for quick access to numpad)
|
||||
* Release F12 to return to the base layer.
|
||||
|
||||
## Rimworld layer
|
||||
|
||||
[![Rimworld / Gaming Layer](images/rimworld-layer.png)](http://www.keyboard-layout-editor.com/#/gists/d53af8391e6e443ed0a98ccfbdb4eace)
|
||||
|
||||
This layer was made to play RimWorld, a Sci-Fi Colony Survival Game by Tynan Sylvester and Ludeon Studios, available on Steam.
|
||||
|
||||
* Have fun!
|
||||
|
||||
## Media layer
|
||||
|
||||
[![Media layer](images/media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/3209d09ed4bd997e4f49f28c6ada2ab3)
|
||||
|
||||
This is the standard Ergodox EZ media layout with more options for mouseclick buttons.
|
||||
|
||||
* In this layer, your "space" key changes into a back button for your browser.
|
||||
|
||||
## LED states
|
||||
|
||||
Your LEDs will change to indicate your layer. You'll know you are in the base layer if all LEDs are off.
|
||||
|
||||
# Building
|
||||
|
||||
To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/`
|
||||
|
||||
[qmk]: https://github.com/jackhumbert/qmk_firmware
|
||||
|
||||
```
|
||||
$ make keyboard=ergodox keymap=win10_writers-block
|
||||
```
|
||||
|
||||
## Using on Windows
|
||||
|
||||
This layout is tested in Windows 7 Pro and Windows 10 Home environments.
|
||||
|
||||
# License
|
||||
|
||||
GPL 3+
|
||||
|
||||
# Special Thanks
|
||||
|
||||
* To algernon for his coding help. I'm a novice but I still made this work (and figured out tap dance) with his help.
|
||||
|
||||
* To /r/MechanicalKeyboards for being an all-around great community.
|
||||
|
||||
* To /u/profet23 for his amazing custom Ergodox boards.
|
@ -0,0 +1,102 @@
|
||||
GameNum firmware
|
||||
======================
|
||||
## Board overview
|
||||
|
||||
The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited.
|
||||
It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers.
|
||||
The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games.
|
||||
The RTS layer is meant to be used rotating the device 90 degrees counterclockwise.
|
||||
|
||||
The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK.
|
||||
|
||||
## Build considerations
|
||||
|
||||
Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind.
|
||||
Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz.
|
||||
The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled.
|
||||
'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro.
|
||||
|
||||
## schematic of the switches and diodes
|
||||
|
||||
![schematic overview](http://i.imgur.com/fleitoA.jpg)
|
||||
|
||||
Keep in mind that the minus of the diodes should point towards the pro micros inputs.
|
||||
|
||||
##LED hookup
|
||||
|
||||
![led overview](http://i.imgur.com/U6m865n.jpg)
|
||||
|
||||
## Adding more layers
|
||||
|
||||
Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`.
|
||||
Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers.
|
||||
|
||||
Next thing to do is to add the actual layer for the keymap.
|
||||
|
||||
```
|
||||
[DEF] = KEYMAP(
|
||||
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
||||
KC_7, KC_8, KC_9, KC_PLUS, \
|
||||
KC_4, KC_5, KC_6, \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_0, KC_DOT, KC_ENT \
|
||||
)
|
||||
```
|
||||
|
||||
This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D:
|
||||
In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does!
|
||||
|
||||
Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer.
|
||||
The number that is at the end of the keycode corresponds with the code in the function.
|
||||
`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well.
|
||||
|
||||
Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`.
|
||||
Look for this piece of code:
|
||||
|
||||
```
|
||||
DDRD |= (1<<4);
|
||||
PORTD &= ~(1<<4);
|
||||
```
|
||||
|
||||
Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<<y);` defines that pin as an output. `PORTx &= ~(1<<y);` sets the pin to LOW turning off the LED.
|
||||
|
||||
Now go back to `keymap.c` and look for the `process_record_user` function. The function is basically a switch case that checks if you pushed one of the defined layer-switch buttons. When it sees that you pushed one of them it sets the pins of the LED's either low or high.
|
||||
|
||||
```
|
||||
case KC_FN1:
|
||||
if (record->event.pressed) {
|
||||
PORTC &= ~(1 << 6); // PC6 goes low
|
||||
PORTD |= (1<<4); //PD4 goes high
|
||||
}
|
||||
break;
|
||||
```
|
||||
|
||||
This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit.
|
||||
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder.
|
||||
Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with.
|
||||
Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you.
|
||||
Once your dev env is set up, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file.
|
||||
|
||||
### Default
|
||||
|
||||
To build with the default keymap, simply run `make`.
|
||||
|
||||
### Other Keymaps
|
||||
|
||||
To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
|
||||
|
||||
```
|
||||
$ make keymap=[default|jack|<name>]
|
||||
```
|
||||
|
||||
Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
|
||||
|
||||
|
@ -0,0 +1,162 @@
|
||||
/*
|
||||
Copyright 2012 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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x1234
|
||||
#define PRODUCT_ID 0x5678
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Seth-Senpai
|
||||
#define PRODUCT GameNum
|
||||
#define DESCRIPTION Numpad with gamelayers
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 }
|
||||
#define MATRIX_COL_PINS { D7, E6, B4, B5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
// #define BACKLIGHT_PIN C6
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@ -0,0 +1,14 @@
|
||||
#include "gamenum.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
DDRC |= (1<<6);
|
||||
PORTC &= ~(1<<6);
|
||||
|
||||
DDRD |= (1<<4);
|
||||
PORTD &= ~(1<<4);
|
||||
|
||||
matrix_init_user();
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
#ifndef GAMENUM_H
|
||||
#define GAMENUM_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, \
|
||||
k41, k42, k43 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03}, \
|
||||
{ k10, k11, k12, k13}, \
|
||||
{ k20, k21, k22, KC_NO}, \
|
||||
{ k30, k31, k32, KC_NO}, \
|
||||
{ KC_NO, k41, k42, k43} \
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,68 @@
|
||||
#include "gamenum.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define DEF 0
|
||||
#define HDN 1
|
||||
#define OSY 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[DEF] = KEYMAP(
|
||||
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
||||
KC_7, KC_8, KC_9, KC_PLUS, \
|
||||
KC_4, KC_5, KC_6, \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_0, KC_DOT, KC_ENT \
|
||||
),
|
||||
[HDN] = KEYMAP(
|
||||
KC_FN1, KC_1, KC_2, KC_3, \
|
||||
KC_Q, KC_W, KC_E, KC_R, \
|
||||
KC_A, KC_S, KC_D, \
|
||||
KC_Z, KC_X, KC_C, \
|
||||
KC_LSFT, KC_LALT, KC_SPC \
|
||||
),
|
||||
[OSY] = KEYMAP(
|
||||
KC_A, KC_Q, KC_1, KC_FN2, \
|
||||
KC_S, KC_W, KC_2, KC_LALT, \
|
||||
KC_D, KC_E, KC_3, \
|
||||
KC_F, KC_R, KC_4, \
|
||||
KC_SPC, KC_T, KC_TAB \
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_SET(HDN, ON_PRESS),
|
||||
[1] = ACTION_LAYER_SET(OSY, ON_PRESS),
|
||||
[2] = ACTION_LAYER_SET(DEF, ON_PRESS),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case KC_FN0:
|
||||
if (record->event.pressed) {
|
||||
PORTC |= (1 << 6); // PC6 goes high
|
||||
}
|
||||
break;
|
||||
case KC_FN1:
|
||||
if (record->event.pressed) {
|
||||
PORTC &= ~(1 << 6); // PC6 goes high
|
||||
PORTD |= (1<<4);
|
||||
}
|
||||
break;
|
||||
case KC_FN2:
|
||||
if (record->event.pressed) {
|
||||
PORTD &= ~(1 << 4); // PC6 goes high
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
|
||||
# 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*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
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 ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../Makefile
|
||||
endif
|
||||
|
||||
|
@ -0,0 +1,73 @@
|
||||
// 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 "kc60.h"
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _FN 1
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define ______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Func macro definitions.
|
||||
#define S_LED FUNC(0)
|
||||
#define S_LEDI FUNC(1)
|
||||
#define S_LEDD FUNC(2)
|
||||
|
||||
// Enable these functions using FUNC(n) macro.
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_BACKLIGHT_TOGGLE(),
|
||||
[1] = ACTION_BACKLIGHT_INCREASE(),
|
||||
[2] = ACTION_BACKLIGHT_DECREASE()
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | LGUI | LAlt | Space | RAlt | RGUI |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[0] = KEYMAP( /* Basic QWERTY */
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, \
|
||||
KC_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_LCTL, 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, MO(_FN), KC_RSFT, \
|
||||
______, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_RGUI, ______, ______ \
|
||||
),
|
||||
|
||||
/* Layer 1
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Led | Led-| Led+| | | | | Psc | Slck| Paus| Up | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | Stop | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_FN] = KEYMAP( /* Layer 1 */
|
||||
______, 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, \
|
||||
______, S_LED, S_LEDI, S_LEDD, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
|
||||
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, ______, \
|
||||
______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______, \
|
||||
______, ______, ______, ______, KC_DEL, KC_MSTP, ______, ______, ______ \
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,9 @@
|
||||
# Dbroqua HHKB like Layout
|
||||
|
||||
Like the HHKB but with a KC60 PCB :D.
|
||||
|
||||
# Programming Instructions:
|
||||
Enter into programming mode and run the following command.
|
||||
```
|
||||
$ sudo KEYMAP=dbroqua_hhkb make dfu
|
||||
```
|
@ -0,0 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,24 @@
|
||||
pegasushoof keyboard firmware
|
||||
=============================
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent README.md](/README.md).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the `keyboard/pegasushoof` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your `.hex` file.
|
||||
|
||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||
|
||||
### Default
|
||||
To build all keymaps, simply run `make`, the `.hex` files will end up in the top directory.
|
||||
|
||||
### Specific Keymap
|
||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>/keymap.c` in the `keymaps` folder, and see keymap document (you can find in top README.md) and existent keymap files.
|
||||
|
||||
To build the firmware binary hex file with a keymap just enter the keymap directory and type `make`:
|
||||
```
|
||||
$ cd keymaps/default
|
||||
$ make
|
||||
```
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright 2016 Daniel Svensson <dsvensson@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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6050
|
||||
#define DEVICE_VER 0x0104
|
||||
#define MANUFACTURER Filco
|
||||
#define PRODUCT Majestouch TKL \\w The Pegasus Hoof
|
||||
#define DESCRIPTION QMK firmware for Majestouch TKL
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 18
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#endif
|
@ -0,0 +1,22 @@
|
||||
# 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 ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42
|
||||
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||
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.
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,112 @@
|
||||
/*
|
||||
Copyright 2016 Daniel Svensson <dsvensson@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/>.
|
||||
*/
|
||||
|
||||
#include "pegasushoof.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
/* Swedish keys */
|
||||
#define SE_HALF KC_GRV
|
||||
#define SE_PLUS KC_MINS
|
||||
#define SE_ACUT KC_EQL
|
||||
#define SE_AO KC_LBRC
|
||||
#define SE_CIRC KC_RBRC
|
||||
#define SE_QUOT KC_BSLS
|
||||
#define SE_OE KC_SCLN
|
||||
#define SE_AE KC_QUOT
|
||||
#define SE_MINS KC_SLSH
|
||||
#define SE_LTGT KC_NUBS
|
||||
#define SE_LCBR RALT(KC_7)
|
||||
#define SE_LBRC RALT(KC_8)
|
||||
#define SE_RBRC RALT(KC_9)
|
||||
#define SE_RCBR RALT(KC_0)
|
||||
#define SE_PIPE RALT(SE_LTGT)
|
||||
#define SE_BSLS RALT(SE_PLUS)
|
||||
|
||||
#define KM_BLOWRAK 0
|
||||
#define KM_QWERTY 1
|
||||
#define KM_MEDIA 2
|
||||
#define KM_HAXHAX 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0: Blowrak ISO layer, a Swedish take on Dvorak */
|
||||
[KM_BLOWRAK] = 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, \
|
||||
SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
|
||||
KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
|
||||
KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \
|
||||
KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \
|
||||
KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||
/* Layer 1: Standard ISO layer */
|
||||
[KM_QWERTY] = 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, \
|
||||
SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,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, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
|
||||
KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \
|
||||
KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \
|
||||
KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||
/* Layer 2: Media layer */
|
||||
[KM_MEDIA] = KEYMAP( \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_MUTE,_______,KC_VOLD, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MPLY, \
|
||||
_______,_______,_______, _______, _______,_______,RESET ,_______, KC_MPRV,KC_MSTP,KC_MNXT),
|
||||
/* Layer 3: Programming layer */
|
||||
[KM_HAXHAX] = KEYMAP( \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
|
||||
_______,SE_LCBR,SE_PIPE,SE_RCBR,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
|
||||
_______,SE_LBRC,SE_BSLS,SE_RBRC,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
|
||||
_______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(KM_MEDIA),
|
||||
[1] = ACTION_LAYER_TOGGLE(KM_QWERTY)
|
||||
};
|
||||
|
||||
void matrix_scan_user(void)
|
||||
{
|
||||
uint8_t layer = biton32(layer_state);
|
||||
switch (layer) {
|
||||
case KM_BLOWRAK:
|
||||
ph_caps_led_on();
|
||||
ph_sclk_led_off();
|
||||
break;
|
||||
case KM_QWERTY:
|
||||
ph_sclk_led_on();
|
||||
ph_caps_led_off();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mixes in KM_HAXHAX via RALT modifier without shadowing the RALT key combinations. */
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t modifiers = get_mods();
|
||||
if (modifiers & MOD_BIT(KC_RALT) && record->event.pressed) {
|
||||
uint16_t kc = keymap_key_to_keycode(KM_HAXHAX, record->event.key);
|
||||
if (kc != KC_TRNS) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
# 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 ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42
|
||||
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||
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.
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright 2016 Daniel Svensson <dsvensson@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/>.
|
||||
*/
|
||||
|
||||
#include "pegasushoof.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define KM_QWERTY 0
|
||||
#define KM_MEDIA 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0: Standard ISO layer */
|
||||
[KM_QWERTY] = 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_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_CLCK, 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_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_MENU,KC_FN0, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||
/* Layer 1: Function layer */
|
||||
[KM_MEDIA] = KEYMAP( \
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLD, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MPLY, \
|
||||
_______,_______,_______, _______, _______,_______,RESET ,_______, KC_MPRV,KC_MSTP,KC_MNXT)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(KM_MEDIA)
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
ph_caps_led_on();
|
||||
} else {
|
||||
ph_caps_led_off();
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
ph_sclk_led_on();
|
||||
} else {
|
||||
ph_sclk_led_off();
|
||||
}
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
/*
|
||||
Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
|
||||
Copyright 2016 Daniel Svensson <dsvensson@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/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
|
||||
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
static matrix_row_t read_cols(void);
|
||||
static void select_row(uint8_t col);
|
||||
|
||||
inline uint8_t matrix_rows(void)
|
||||
{
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline uint8_t matrix_cols(void)
|
||||
{
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
/* Column output pins */
|
||||
DDRD |= 0b01111011;
|
||||
/* Row input pins */
|
||||
DDRC &= ~0b10000000;
|
||||
DDRB &= ~0b01111111;
|
||||
PORTC |= 0b10000000;
|
||||
PORTB |= 0b01111111;
|
||||
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||
select_row(col);
|
||||
wait_us(30);
|
||||
matrix_row_t rows = read_cols();
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||
bool curr_bit = rows & (1<<row);
|
||||
if (prev_bit != curr_bit) {
|
||||
matrix_debouncing[row] ^= (matrix_row_t) 1 << col;
|
||||
debouncing = DEBOUNCING_DELAY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing) {
|
||||
if (--debouncing) {
|
||||
wait_ms(1);
|
||||
} else {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = matrix_debouncing[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
if (debouncing)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return matrix[row] & 1 << col;
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 0123456789ABCDEF\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
pbin_reverse16(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop16(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static matrix_row_t read_cols(void)
|
||||
{
|
||||
return
|
||||
(PINB & (1 << 5) ? 0 : 1 << 0) |
|
||||
(PINC & (1 << 7) ? 0 : 1 << 1) |
|
||||
(PINB & (1 << 4) ? 0 : 1 << 2) |
|
||||
(PINB & (1 << 6) ? 0 : 1 << 3) |
|
||||
(PINB & (1 << 1) ? 0 : 1 << 4) |
|
||||
(PINB & (1 << 0) ? 0 : 1 << 5) |
|
||||
(PINB & (1 << 3) ? 0 : 1 << 6) |
|
||||
(PINB & (1 << 2) ? 0 : 1 << 7);
|
||||
}
|
||||
|
||||
static void select_row(uint8_t col)
|
||||
{
|
||||
switch (col) {
|
||||
case 0:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00110011;
|
||||
break;
|
||||
case 1:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01110000;
|
||||
break;
|
||||
case 2:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00010011;
|
||||
break;
|
||||
case 3:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01101000;
|
||||
break;
|
||||
case 4:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00001011;
|
||||
break;
|
||||
case 5:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00111011;
|
||||
break;
|
||||
case 6:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01111000;
|
||||
break;
|
||||
case 7:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01100001;
|
||||
break;
|
||||
case 8:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01101001;
|
||||
break;
|
||||
case 9:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01110001;
|
||||
break;
|
||||
case 10:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01101010;
|
||||
break;
|
||||
case 11:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01100010;
|
||||
break;
|
||||
case 12:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01111001;
|
||||
break;
|
||||
case 13:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01100000;
|
||||
break;
|
||||
case 14:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b01000011;
|
||||
break;
|
||||
case 15:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00011011;
|
||||
break;
|
||||
case 16:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00100011;
|
||||
break;
|
||||
case 17:
|
||||
PORTD = (PORTD & ~0b01111011) | 0b00101011;
|
||||
break;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright 2016 Daniel Svensson <dsvensson@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/>.
|
||||
*/
|
||||
|
||||
#include "pegasushoof.h"
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
bool process_action_user(keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_action_kb(keyrecord_t *record) {
|
||||
return process_action_user(record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
led_set_user(usb_led);
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright 2016 Daniel Svensson <dsvensson@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 PEGASUSHOOF_H
|
||||
#define PEGASUSHOOF_H
|
||||
|
||||
#include "matrix.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#define ___ KC_NO
|
||||
|
||||
#define KEYMAP( \
|
||||
KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
|
||||
KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \
|
||||
KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \
|
||||
KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \
|
||||
KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \
|
||||
KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \
|
||||
) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
|
||||
/* 0 */ { ___ , ___ , KC0 , ___ , ___ , KF0 , ___ , ___ , ___ , KJ0 , KK0 , ___ , KM0 , KN0 , KO0 , ___ , KQ0 , KR0 }, \
|
||||
/* 1 */ { ___ , ___ , ___ , ___ , ___ , ___ , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , ___ , KO1 , KP1 , ___ , ___ }, \
|
||||
/* 2 */ { ___ , KB2 , ___ , KD2 , ___ , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , ___ , KO2 , ___ , ___ , ___ }, \
|
||||
/* 3 */ { KA3 , KB3 , ___ , ___ , ___ , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , ___ , KO3 , ___ , ___ , ___ }, \
|
||||
/* 4 */ { ___ , ___ , KC4 , ___ , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , ___ , KO4 , KP4 , KQ4 , KR4 }, \
|
||||
/* 5 */ { ___ , ___ , KC5 , ___ , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , ___ , ___ }, \
|
||||
/* 6 */ { ___ , ___ , KC6 , ___ , ___ , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , KL6 , ___ , KN6 , KO6 , ___ , KQ6 , ___ }, \
|
||||
/* 7 */ { ___ , ___ , ___ , ___ , ___ , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , ___ , KP7 , ___ , ___ }, \
|
||||
}
|
||||
|
||||
inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); }
|
||||
inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); }
|
||||
|
||||
inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); }
|
||||
inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); }
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,67 @@
|
||||
# MCU name
|
||||
MCU = atmega32u2
|
||||
|
||||
# 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*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
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 ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||
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.
|
||||
|
||||
|
||||
CUSTOM_MATRIX ?= yes
|
||||
SRC = matrix.c
|
@ -0,0 +1,26 @@
|
||||
|
||||
|
||||
# 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 = no # 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 = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
UNICODEMAP_ENABLE = yes # Unicode map
|
||||
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.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,447 @@
|
||||
// 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"
|
||||
#include "musical_notes.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
#include "process_unicode.h"
|
||||
#include "quantum.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_WORKMAN,
|
||||
_PUNC,
|
||||
_NUM,
|
||||
_FUNC,
|
||||
_EMOJI,
|
||||
_GUI,
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
// layouts
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
WORKMAN,
|
||||
|
||||
// layer switchers
|
||||
PUNC,
|
||||
NUM,
|
||||
FUNC,
|
||||
EMOJI,
|
||||
GUI,
|
||||
|
||||
// os switchers
|
||||
LINUX,
|
||||
WIN,
|
||||
OSX,
|
||||
};
|
||||
|
||||
// Fillers to make layering clearer
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// unicode map
|
||||
|
||||
enum unicode_name {
|
||||
GRIN, // grinning face 😊
|
||||
TJOY, // tears of joy 😂
|
||||
SMILE, // grining face with smiling eyes 😁
|
||||
HEART, // heart ❤
|
||||
EYERT, // smiling face with heart shaped eyes 😍
|
||||
CRY, // crying face 😭
|
||||
SMEYE, // smiling face with smiling eyes 😊
|
||||
UNAMU, // unamused 😒
|
||||
KISS, // kiss 😘
|
||||
HART2, // two hearts 💕
|
||||
WEARY, // weary 😩
|
||||
OKHND, // ok hand sign 👌
|
||||
PENSV, // pensive 😔
|
||||
SMIRK, // smirk 😏
|
||||
RECYC, // recycle ♻
|
||||
WINK, // wink 😉
|
||||
THMUP, // thumb up 👍
|
||||
THMDN, // thumb down 👎
|
||||
PRAY, // pray 🙏
|
||||
PHEW, // relieved 😌
|
||||
MUSIC, // musical notes
|
||||
FLUSH, // flushed 😳
|
||||
CELEB, // celebration 🙌
|
||||
CRY2, // crying face 😢
|
||||
COOL, // smile with sunglasses 😎
|
||||
NOEVS, // see no evil
|
||||
NOEVH, // hear no evil
|
||||
NOEVK, // speak no evil
|
||||
POO, // pile of poo
|
||||
EYES, // eyes
|
||||
VIC, // victory hand
|
||||
BHART, // broken heart
|
||||
SLEEP, // sleeping face
|
||||
SMIL2, // smiling face with open mouth & sweat
|
||||
HUNRD, // 100
|
||||
CONFU, // confused
|
||||
TONGU, // face with tongue & winking eye
|
||||
DISAP, // disappointed
|
||||
YUMMY, // face savoring delicious food
|
||||
CLAP, // hand clapping
|
||||
FEAR, // face screaming in fear
|
||||
HORNS, // smiling face with horns
|
||||
HALO, // smiling face with halo
|
||||
BYE, // waving hand
|
||||
SUN, // sun
|
||||
MOON, // moon
|
||||
SKULL, // skull
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[GRIN] = 0x1F600,
|
||||
[TJOY] = 0x1F602,
|
||||
[SMILE] = 0x1F601,
|
||||
[HEART] = 0x2764,
|
||||
[EYERT] = 0x1f60d,
|
||||
[CRY] = 0x1f62d,
|
||||
[SMEYE] = 0x1F60A,
|
||||
[UNAMU] = 0x1F612,
|
||||
[KISS] = 0x1F618,
|
||||
[HART2] = 0x1F495,
|
||||
[WEARY] = 0x1F629,
|
||||
[OKHND] = 0x1F44C,
|
||||
[PENSV] = 0x1F614,
|
||||
[SMIRK] = 0x1F60F,
|
||||
[RECYC] = 0x267B,
|
||||
[WINK] = 0x1F609,
|
||||
[THMUP] = 0x1F44D,
|
||||
[THMDN] = 0x1F44E,
|
||||
[PRAY] = 0x1F64F,
|
||||
[PHEW] = 0x1F60C,
|
||||
[MUSIC] = 0x1F3B6,
|
||||
[FLUSH] = 0x1F633,
|
||||
[CELEB] = 0x1F64C,
|
||||
[CRY2] = 0x1F622,
|
||||
[COOL] = 0x1F60E,
|
||||
[NOEVS] = 0x1F648,
|
||||
[NOEVH] = 0x1F649,
|
||||
[NOEVK] = 0x1F64A,
|
||||
[POO] = 0x1F4A9,
|
||||
[EYES] = 0x1F440,
|
||||
[VIC] = 0x270C,
|
||||
[BHART] = 0x1F494,
|
||||
[SLEEP] = 0x1F634,
|
||||
[SMIL2] = 0x1F605,
|
||||
[HUNRD] = 0x1F4AF,
|
||||
[CONFU] = 0x1F615,
|
||||
[TONGU] = 0x1F61C,
|
||||
[DISAP] = 0x1F61E,
|
||||
[YUMMY] = 0x1F60B,
|
||||
[CLAP] = 0x1F44F,
|
||||
[FEAR] = 0x1F631,
|
||||
[HORNS] = 0x1F608,
|
||||
[HALO] = 0x1F607,
|
||||
[BYE] = 0x1F44B,
|
||||
[SUN] = 0x2600,
|
||||
[MOON] = 0x1F314,
|
||||
[SKULL] = 0x1F480,
|
||||
};
|
||||
|
||||
|
||||
// hybrid shift - =
|
||||
// #undef KC_LSFT
|
||||
// #define KC_LSFT MT(MOD_LSFT, KC_MINS)
|
||||
// #undef KC_RSFT
|
||||
// #define KC_RSFT MT(MOD_LSFT, KC_EQL)
|
||||
|
||||
|
||||
// hybrid right-gui & scroll lock (mapped to Compose in OS)
|
||||
#undef KC_RCTL
|
||||
#define KC_RCTL MT(MOD_LCTL, KC_SLCK)
|
||||
|
||||
// keymaps
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, 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, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_ENT },
|
||||
{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_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL}
|
||||
},
|
||||
|
||||
/* Workman
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | H | T | G | Y | N | E | O | I |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | M | C | V | K | K | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_WORKMAN] = {
|
||||
{KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT },
|
||||
{KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
|
||||
{KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL}
|
||||
},
|
||||
|
||||
/* Punc
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | \ | - | = | < | > | ( | ) | ' | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | _ | + | { | } | [ | ] | " | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_PUNC] = {
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV },
|
||||
{XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX},
|
||||
{XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
/* Num
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | x | | | 0 | , | . | + | - |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUM] = {
|
||||
{KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{ KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT},
|
||||
{KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR},
|
||||
{_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS}
|
||||
},
|
||||
|
||||
/* Func
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F9 | F10 | F11 | F12 | | | | Home | End | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = {
|
||||
{XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL},
|
||||
{XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS},
|
||||
{_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
/* Emoji
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EMOJI] = {
|
||||
{X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW)},
|
||||
{X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS)},
|
||||
{X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH)},
|
||||
{ X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)}
|
||||
},
|
||||
|
||||
/* GUI
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Win | | Prev | Play | Next | | | | | | |Colmak|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | OSX | | | | | BL- | BL+ | | | | |Workmn|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GUI] = {
|
||||
{_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______},
|
||||
{ LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY},
|
||||
{ WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK},
|
||||
{ OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_workman[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND);
|
||||
float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND);
|
||||
float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2));
|
||||
#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) {
|
||||
// faux clicky
|
||||
if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0);
|
||||
|
||||
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 WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_workman, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_PUNC);
|
||||
update_tri_layer(_PUNC, _EMOJI, _GUI);
|
||||
} else {
|
||||
layer_off(_PUNC);
|
||||
update_tri_layer(_PUNC, _EMOJI, _GUI);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EMOJI:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_EMOJI);
|
||||
update_tri_layer(_PUNC, _EMOJI, _GUI);
|
||||
} else {
|
||||
layer_off(_EMOJI);
|
||||
update_tri_layer(_PUNC, _EMOJI, _GUI);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUM:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_NUM);
|
||||
} else {
|
||||
layer_off(_NUM);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LINUX:
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_linux, false, 0);
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case WIN:
|
||||
set_unicode_input_mode(UC_WINC);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_windows, false, 0);
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case OSX:
|
||||
set_unicode_input_mode(UC_OSX);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_osx, false, 0);
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
}
|
||||
|
||||
#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();
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
# Priyadi's Planck Layout
|
||||
|
||||
Features:
|
||||
|
||||
- Supports QWERTY, Colemak and Workman layouts.
|
||||
- Cursor and nav cluster on home row.
|
||||
- Hybrid number row and numpad, located on home row.
|
||||
- Number layer supports hexadecimal input.
|
||||
- Left and right side modifiers.
|
||||
- Emoji layer. An entire layer filled with common emojis.
|
||||
- Faux-clickey (poor man's replacement for Cherry blue switches)
|
@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
# 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 = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # 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.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
Copyright 2012 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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define MANUFACTURER Ortholinear Keyboards
|
||||
#define PRODUCT The Planck Keyboard
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/* Planck PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
|
||||
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* 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)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/* prevent the modifiers from being stuck, sacrificing some memory */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef SUBPROJECT_rev3
|
||||
#include "rev3/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_rev4
|
||||
#include "rev4/config.h"
|
||||
#endif
|
||||
|
||||
#endif
|
@ -0,0 +1,187 @@
|
||||
// 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"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
# include "backlight.h"
|
||||
#endif
|
||||
#include "timer.h"
|
||||
#include <bootloader.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.
|
||||
enum userlayer {
|
||||
_QW = 0,
|
||||
_CM,
|
||||
_PP,
|
||||
_PPG,
|
||||
_NM,
|
||||
_LW,
|
||||
_RS,
|
||||
_DL,
|
||||
_DYN,
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
KM_LW = SAFE_RANGE,
|
||||
KM_RS,
|
||||
KM_SHLK, /* ShiftLock */
|
||||
KM_RST, /* Reset */
|
||||
KM_NUM, /* Numeric layer */
|
||||
KM_SLP, /* Sleep 250 ms */
|
||||
KM_PPLR, /* Pure Pro layer */
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = { /* Qwerty */
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN0 },
|
||||
{KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL}
|
||||
},
|
||||
[_CM] = { /* 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},
|
||||
{CTL_T(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_FN0 },
|
||||
{KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL}
|
||||
},
|
||||
[_PP] = { /* Pure Pro */
|
||||
{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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_UP, KC_RCTL},
|
||||
{KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT}
|
||||
},
|
||||
[_PPG] = { /* Pure Pro: Gaming */
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______},
|
||||
{_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______},
|
||||
},
|
||||
[_NM] = { /* Numeric */
|
||||
{KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{KC_LSFT, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, KC_FN0 },
|
||||
{_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______}
|
||||
},
|
||||
[_LW]= { /* LOWER */
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||
{KC_ESC, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KM_NUM, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), KM_SLP, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_ENT },
|
||||
{_______, BL_TOGG, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
[_RS]= { /* RAISE */
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
|
||||
{KC_ESC, 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, DF(_QW), DF(_CM), KM_PPLR, KM_RST, KC_ENT },
|
||||
{_______, BL_STEP, _______, _______, _______, KC_BTN2, KC_BTN2, _______, KC_MPLY, KC_VOLD, KC_VOLU, _______}
|
||||
},
|
||||
[_DL]= { /* DUAL */
|
||||
{_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, _______},
|
||||
{_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ACL0, KC_ACL2},
|
||||
{_______, _______, KC_BTN2, KC_BTN3, KC_BTN1, KC_WWW_BACK, KC_WWW_FORWARD, KC_MUTE, _______, _______, _______, _______},
|
||||
{_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
[_DYN]= { /* special */
|
||||
{_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS},
|
||||
{_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK},
|
||||
{KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
};
|
||||
|
||||
#undef _______
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
static uint16_t key_timer;
|
||||
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case KM_LW:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LW);
|
||||
} else {
|
||||
layer_off(_LW);
|
||||
}
|
||||
update_tri_layer(_LW, _RS, _DL);
|
||||
return false;
|
||||
break;
|
||||
case KM_RS:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RS);
|
||||
} else {
|
||||
layer_off(_RS);
|
||||
}
|
||||
update_tri_layer(_LW, _RS, _DL);
|
||||
return false;
|
||||
break;
|
||||
case KM_SHLK:
|
||||
register_code(KC_LSFT);
|
||||
break;
|
||||
case KM_RST:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) >= 500) {
|
||||
clear_keyboard();
|
||||
backlight_toggle();
|
||||
_delay_ms(250);
|
||||
backlight_toggle();
|
||||
bootloader_jump();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KM_PPLR:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) >= 250) {
|
||||
default_layer_set((1UL << _PP) | (1UL << _PPG));
|
||||
backlight_toggle();
|
||||
_delay_ms(100);
|
||||
backlight_toggle();
|
||||
} else {
|
||||
default_layer_set(1UL << _PP);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KM_NUM:
|
||||
layer_on(_NM);
|
||||
break;
|
||||
case KM_SLP:
|
||||
if (record->event.pressed) {
|
||||
_delay_ms(250);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (record->event.pressed
|
||||
&& IS_LAYER_ON(_NM)
|
||||
&& keymap_key_to_keycode(_NM, record->event.key) == KC_TRNS) {
|
||||
|
||||
layer_off(_NM);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
return MACRO_NONE;
|
||||
}
|
@ -1,3 +1,15 @@
|
||||
# Jacwib's preonic keymap.
|
||||
|
||||
Designed for use with a swedish language.
|
||||
|
||||
Version 1.1:
|
||||
|
||||
Added PgUp and PgDn keys.
|
||||
|
||||
Also added "Mac mode". Unsure if it even works. Might however be able to test soon.
|
||||
|
||||
Version 1.2:
|
||||
|
||||
Changed around alt and super keys.
|
||||
|
||||
Made "Mac mode" function, and tested it! (It works)
|
||||
|
@ -0,0 +1,82 @@
|
||||
#ifndef KEYMAP_DVP_H
|
||||
#define KEYMAP_DVP_H
|
||||
|
||||
#include "keymap.h"
|
||||
|
||||
// Normal characters
|
||||
#define DP_DLR KC_GRV
|
||||
#define DP_AMPR KC_1
|
||||
#define DP_LBRC KC_2
|
||||
#define DP_LCBR KC_3
|
||||
#define DP_RCBR KC_4
|
||||
#define DP_LPRN KC_5
|
||||
#define DP_EQL KC_6
|
||||
#define DP_ASTR KC_7
|
||||
#define DP_RPRN KC_8
|
||||
#define DP_PLUS KC_9
|
||||
#define DP_RBRC KC_0
|
||||
#define DP_EXLM KC_MINS
|
||||
#define DP_HASH KC_EQL
|
||||
|
||||
#define DP_SCLN KC_Q
|
||||
#define DP_COMM KC_W
|
||||
#define DP_DOT KC_E
|
||||
#define DP_P KC_R
|
||||
#define DP_Y KC_T
|
||||
#define DP_F KC_Y
|
||||
#define DP_G KC_U
|
||||
#define DP_C KC_I
|
||||
#define DP_R KC_O
|
||||
#define DP_L KC_P
|
||||
#define DP_SLSH KC_LBRC
|
||||
#define DP_AT KC_RBRC
|
||||
#define DP_BSLS KC_BSLS
|
||||
|
||||
#define DP_A KC_A
|
||||
#define DP_O KC_S
|
||||
#define DP_E KC_D
|
||||
#define DP_U KC_F
|
||||
#define DP_I KC_G
|
||||
#define DP_D KC_H
|
||||
#define DP_H KC_J
|
||||
#define DP_T KC_K
|
||||
#define DP_N KC_L
|
||||
#define DP_S KC_SCLN
|
||||
#define DP_MINS KC_QUOT
|
||||
|
||||
#define DP_QUOT KC_Z
|
||||
#define DP_Q KC_X
|
||||
#define DP_J KC_C
|
||||
#define DP_K KC_V
|
||||
#define DP_X KC_B
|
||||
#define DP_B KC_N
|
||||
#define DP_M KC_M
|
||||
#define DP_W KC_COMM
|
||||
#define DP_V KC_DOT
|
||||
#define DP_Z KC_SLSH
|
||||
|
||||
// Shifted characters
|
||||
#define DP_TILD LSFT(DP_DLR)
|
||||
#define DP_PERC LSFT(DP_AMPR)
|
||||
#define DP_7 LSFT(DP_LBRC)
|
||||
#define DP_5 LSFT(DP_LCBR)
|
||||
#define DP_3 LSFT(DP_RCBR)
|
||||
#define DP_1 LSFT(DP_LPRN)
|
||||
#define DP_9 LSFT(DP_EQL)
|
||||
#define DP_0 LSFT(DP_ASTR)
|
||||
#define DP_2 LSFT(DP_RPRN)
|
||||
#define DP_4 LSFT(DP_PLUS)
|
||||
#define DP_6 LSFT(DP_RBRC)
|
||||
#define DP_8 LSFT(DP_EXLM)
|
||||
#define DP_GRV LSFT(DP_HASH)
|
||||
|
||||
#define DP_COLN LSFT(DP_SCLN)
|
||||
#define DP_LABK LSFT(DP_COMM)
|
||||
#define DP_RABK LSFT(DP_DOT)
|
||||
#define DP_QUES LSFT(DP_SLSH)
|
||||
#define DP_CIRC LSFT(DP_AT)
|
||||
#define DP_PIPE LSFT(DP_BSLS)
|
||||
#define DP_UNDS LSFT(DP_MINS)
|
||||
#define DP_DQUO LSFT(DP_QUOT)
|
||||
|
||||
#endif
|