Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
7bef285553 | |||
bd8d717f1f | |||
d96175937b | |||
d369bfb83a | |||
fd2925efba | |||
21ad0c5bcd | |||
24a40d63c9 | |||
b28fb29898 | |||
8c93c5d9ab | |||
4010360912 | |||
c68e596f32 | |||
1e97f77278 | |||
68970679e7 | |||
3bf6c43de7 | |||
352d79e1fb | |||
4505db5d0e | |||
5f8535b356 | |||
b6730285b4 | |||
a773124537 | |||
420a032e8d | |||
467e284178 | |||
f6feee8167 | |||
a1c53d0f93 | |||
93c1bfa646 |
@ -30,3 +30,10 @@ addons:
|
||||
- diffutils
|
||||
after_success:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/cca31de3d44b9adb617b
|
||||
on_success: change # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
@ -161,6 +161,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_ENABLE = yes
|
||||
|
@ -4,5 +4,5 @@ SLEEP_LED_ENABLE=no
|
||||
FORCE_NKRO ?= yes
|
||||
DEBUG_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
|
@ -7,7 +7,6 @@ Layers
|
||||
------
|
||||
|
||||
* BASE: this is where you type.
|
||||
* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row.
|
||||
* 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.
|
||||
@ -20,6 +19,12 @@ Layers
|
||||
Updates
|
||||
-------
|
||||
|
||||
2017/02/10:
|
||||
* Made left shift an MO for SHELL_NAV, and symbol+right shift CAPSLOCK. Made all modifiers OSM.
|
||||
|
||||
2017/01/28:
|
||||
* Made the capslock key a dual momentary layer activation for BRACKETS and SHELL_NAV. One keypress held down for BRACKETS, one keypress, released and then held down for SHELL_NAV
|
||||
|
||||
2017/01/22:
|
||||
* Made brackets toggle an OSL on the left capslock
|
||||
* Added SHELL_LAYER
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "action_code.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SHELL_LAYER 1
|
||||
#define SHELL_NAV 2
|
||||
#define KEY_NAV 3 // key navigation layer
|
||||
#define KEY_SEL 4 // key selection layer
|
||||
@ -37,41 +36,25 @@
|
||||
#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(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
|
||||
OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
|
||||
OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
|
||||
MO(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
MO(SHELL_NAV), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
|
||||
OSL(SHORTCUTS),OSM(MOD_LCTL), OSM(MOD_LALT),OSL(SYMBOL),MO(NUMBER),
|
||||
// thumb cluster
|
||||
MO(MOUSE), RCTL(KC_S),
|
||||
RCTL(KC_DEL),
|
||||
OSM(MOD_LSFT), 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),
|
||||
KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, OSM(MOD_LSFT),
|
||||
// lower keys - browser tab control
|
||||
RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W),
|
||||
// thumb cluster
|
||||
@ -82,31 +65,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden
|
||||
[SHELL_LAYER] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C),
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,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
|
||||
RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, 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
|
||||
),
|
||||
|
||||
// shell navigation layer
|
||||
[SHELL_NAV] = KEYMAP(
|
||||
@ -270,11 +228,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12), M(SWITCH_NDS),
|
||||
KC_TRNS, MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F),
|
||||
MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L),
|
||||
KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R),
|
||||
KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), KC_CAPSLOCK,
|
||||
MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X),
|
||||
MEH(KC_6), MEH(KC_7),
|
||||
MEH(KC_8),
|
||||
MEH(KC_9), TO(BASE), TO(SHELL_LAYER)
|
||||
MEH(KC_9), MEH(KC_Y), MEH(KC_Z)
|
||||
),
|
||||
|
||||
|
||||
@ -395,7 +353,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(END), T(ENTER), END);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
@ -415,13 +374,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
@ -1,14 +1,24 @@
|
||||
#include "gonnerd.h"
|
||||
|
||||
// Keymap layers
|
||||
#define __x__ KC_NO
|
||||
|
||||
// Keymap layers
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP_60( /* Base */
|
||||
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_BSPC,\
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS,\
|
||||
KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT, \
|
||||
KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \
|
||||
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL),
|
||||
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_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \
|
||||
),
|
||||
|
||||
[1] = KEYMAP_60( /* System layer to have access to RESET button */
|
||||
RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
@ -23,11 +23,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[BASE_LAYER] = KEYMAP_60(
|
||||
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_BSPC, \
|
||||
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(2), KC_RCTL \
|
||||
),
|
||||
|
||||
/* Layer 1: Function Layer
|
||||
@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[FUNCTION_LAYER] = KEYMAP_60(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||
__x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
|
||||
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
|
||||
KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
|
||||
__x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
|
||||
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
|
||||
KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
|
||||
),
|
||||
|
||||
/* Layer 2: System Layer
|
||||
@ -69,10 +69,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
enum function_id {
|
||||
ESC_GRV, // Makes Esc behave like `~ when pressed with the left GUI modifier. This is the "switch between windows of the same application" key combination in macOS
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(ESC_GRV),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t esc_grv_mask;
|
||||
switch (id) {
|
||||
case ESC_GRV:
|
||||
esc_grv_mask = get_mods() & MOD_BIT(KC_LGUI);
|
||||
if (record->event.pressed) {
|
||||
if (esc_grv_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (esc_grv_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,10 @@ It is possible to change the bootloader of the GON NerD with an ISP programmer.
|
||||
_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
|
||||
not work anymore. You will lose your warranty and official support from GON!_
|
||||
|
||||
## Reset button
|
||||
|
||||
To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins.
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/gonnerd 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.
|
||||
|
@ -10,12 +10,13 @@ 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 = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
AUDIO_ENABLE = no # 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.
|
||||
API_SYSEX_ENABLE = no
|
||||
FAUXCLICKY_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
@ -268,8 +268,8 @@ const uint32_t PROGMEM unicode_map[] = {
|
||||
|
||||
|
||||
// hybrid right-gui & scroll lock (mapped to Compose in OS)
|
||||
#undef KC_RCTL
|
||||
#define KC_RCTL MT(MOD_LCTL, KC_SLCK)
|
||||
#undef KC_RALT
|
||||
#define KC_RALT MT(MOD_RALT, KC_SLCK)
|
||||
|
||||
// keymaps
|
||||
|
||||
|
3
keyboards/planck/rev3/Makefile
Normal file
3
keyboards/planck/rev3/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
21
keyboards/tv44/keymaps/smt/Makefile
Normal file
21
keyboards/tv44/keymaps/smt/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = 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
|
36
keyboards/tv44/keymaps/smt/config.h
Normal file
36
keyboards/tv44/keymaps/smt/config.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/**
|
||||
*TV44 keymap definition macro
|
||||
*/
|
||||
#define KEYMAP_TV44( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
||||
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
|
||||
K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K40, K41, K42, K43, K44 \
|
||||
) { \
|
||||
{ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
|
||||
{ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
|
||||
{ K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
|
||||
{ K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, KC_NO, K44 } \
|
||||
}
|
||||
|
||||
/**
|
||||
*TV45 keymap definition macro (arrows layout)
|
||||
*/
|
||||
#define KEYMAP_TV45( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
||||
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
|
||||
K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
|
||||
K37, K38, K39, K40, K41, K42, K43, K44, K45 \
|
||||
) { \
|
||||
{ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
|
||||
{ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
|
||||
{ K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
|
||||
{ K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, K44, K45 } \
|
||||
}
|
||||
|
||||
#endif
|
BIN
keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png
Normal file
BIN
keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
232
keyboards/tv44/keymaps/smt/keymap.c
Normal file
232
keyboards/tv44/keymaps/smt/keymap.c
Normal file
@ -0,0 +1,232 @@
|
||||
#include "tv44.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
// Keycodes
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Custom macros
|
||||
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
||||
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
|
||||
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper
|
||||
#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
*
|
||||
* ,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
* |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
* | Ctrl/Esc | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / |Sft/Ent|
|
||||
* |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
* | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
|
||||
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP_TV45(
|
||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
|
||||
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
|
||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
|
||||
CTL_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, SFT_ENT ,
|
||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||
ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ),
|
||||
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
|
||||
|
||||
/* Colemak
|
||||
* ,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
* |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
* | Ctrl/Esc | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
* | Shift | Z | X | C | V | B | K | M | , | . | / |Sft/Ent|
|
||||
* |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
* | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
|
||||
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
*/
|
||||
[_COLEMAK] = KEYMAP_TV45(
|
||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
|
||||
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC ,
|
||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
|
||||
CTL_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, SFT_ENT ,
|
||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||
ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ),
|
||||
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
|
||||
|
||||
/* Dvorak
|
||||
* ,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
* |Hyper/Tab| ' | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
* | Ctrl/Esc | A | O | E | U | I | D | H | T | N | S | - |
|
||||
* |----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
* | Shift | ; | Q | J | K | X | B | M | W | V | Z |Sft/Ent|
|
||||
* |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
* | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
|
||||
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
*/
|
||||
[_DVORAK] = KEYMAP_TV45(
|
||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
|
||||
HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC ,
|
||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
|
||||
CTL_ESC , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS ,
|
||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||
KC_LSFT , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT ,
|
||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||
ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ),
|
||||
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
|
||||
|
||||
/* Lower
|
||||
* ,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
* | $ | 4 | 5 | 6 | . | + | * | 4 | 5 | 6 | . | PageUp |
|
||||
* |----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
* | = | 7 | 8 | 9 | 0 | - | / | 1 | 2 | 3 | Up |PageDn |
|
||||
* |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
* | Brite | | | Home | End | | Left | Down | Right |
|
||||
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP_TV45(
|
||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
|
||||
KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL ,
|
||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
|
||||
KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP ,
|
||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||
KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, KC_PGDN ,
|
||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||
BACKLIT , _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ),
|
||||
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
|
||||
|
||||
/* Raise
|
||||
* ,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | _ | ? | + | { | } | |
|
||||
* |----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
* | F7 | F8 | F9 | F10 | F11 | F12 | - | / | = | [ | ] | |
|
||||
* |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
* | Brite | | | Play | Next | | Mute | Vol- | Vol+ |
|
||||
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP_TV45(
|
||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
|
||||
KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
|
||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE ,
|
||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS ,
|
||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||
BACKLIT , _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ),
|
||||
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
* | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
* | | | | | | | | | |
|
||||
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP_TV45(
|
||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
|
||||
_______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
|
||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
|
||||
_______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ ,
|
||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||
_______ , _______ , _______ , _______ , _______ , _______ , _______, _______, _______ ),
|
||||
/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
126
keyboards/tv44/keymaps/smt/readme.md
Normal file
126
keyboards/tv44/keymaps/smt/readme.md
Normal file
@ -0,0 +1,126 @@
|
||||
# smt's TV44 keymap
|
||||
|
||||
This keymap is based on a combination of my Planck keymap and [jeebak's TV44 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/tv44/keymaps/jeebak). I removed the macros and TouchCursor/MouseCursor layers, because I'm just not ready for that level of mind-mapping.
|
||||
|
||||
I had been using something close to the default Minivan layout, but after spending a bit of time with the Planck and Preonic, I decided it would be better for me to try to standardize to some degree, where possible.
|
||||
|
||||
Also, it's worth noting that my Minivan is one with the "arrows" layout, which has a 45th key, so I had to define a new KEYMAP_TV45 macro in config.h. In spite of this, the 45-key Minivan is still technically considered a "TV44" as far as I know.
|
||||
|
||||

|
||||
|
||||
## Notable features (most of which can be found in my or jeebak's respective keymap file):
|
||||
|
||||
1. **Shift/Enter**
|
||||
|
||||
I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
|
||||
|
||||
Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome!
|
||||
|
||||
2. **Hyper/Tab**
|
||||
|
||||
This key modifies with "Hyper" (see [Brett Terpstra's post](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) on this) when held, and outputs the code for Tab when tapped. On the Mac, I use KeyboardMaestro to remap my hyper-keys to do a lot of crazy things.
|
||||
|
||||
3. **Ctrl/Escape**
|
||||
|
||||
I set up another mod-tap, this time for the Escape key that would act as a Control modifier when held.
|
||||
|
||||
4. **Alt/Backtick**
|
||||
|
||||
I don't currently have LEDs on most of my keyboards, and I certainly don't want LED controls on the base layer of a 40%.
|
||||
|
||||
So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for my use case, and it's consistent with where I place it in my Planck and Preonic keymaps.
|
||||
|
||||
I also like Alt in that position, so it works well as yet another mod-tap key.
|
||||
|
||||
|
||||
## Layers
|
||||
|
||||
### Qwerty
|
||||
|
||||
```
|
||||
,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
|Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
|---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
| Ctrl/Esc | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
|----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / |Sft/Ent|
|
||||
|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
|
||||
`-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
```
|
||||
|
||||
### Colemak
|
||||
|
||||
```
|
||||
,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
|Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
|---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
| Ctrl/Esc | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
|----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
| Shift | Z | X | C | V | B | K | M | , | . | / |Sft/Ent|
|
||||
|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
|
||||
`-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
```
|
||||
|
||||
### Dvorak
|
||||
|
||||
```
|
||||
,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
|Hyper/Tab| ' | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
|---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
| Ctrl/Esc | A | O | E | U | I | D | H | T | N | S | - |
|
||||
|----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
| Shift | ; | Q | J | K | X | B | M | W | V | Z |Sft/Ent|
|
||||
|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
|
||||
`-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
```
|
||||
|
||||
### Lower
|
||||
|
||||
This is where I put the number row, two numpad clusters, common arithmetic operators, and cursorkeys: Arrow cluster, Home/End, Page Up/Page Down. `0` and `$` are also placed on the left side for convenient access to beginning-of-line and end-of-line Vim commands. BRITE has been moved here from the base layer.
|
||||
|
||||
```
|
||||
,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
| $ | 4 | 5 | 6 | . | + | * | 4 | 5 | 6 | . | PageUp |
|
||||
|----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
| = | 7 | 8 | 9 | 0 | - | / | 1 | 2 | 3 | Up |PageDn |
|
||||
|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
| Brite | | | Home | End | | Left | Down | Right |
|
||||
`-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
```
|
||||
|
||||
### Raise
|
||||
|
||||
As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets helps me keep them straight. I've dropped basic media controls onto this layer as well.
|
||||
|
||||
```
|
||||
,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
|---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | _ | ? | + | { | } | | |
|
||||
|----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
| F7 | F8 | F9 | F10 | F11 | F12 | - | / | = | [ | ] | \ |
|
||||
|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
| Brite | | | Play | Next | | Mute | Vol- | Vol+ |
|
||||
`-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
```
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
|
||||
Utility layer. There isn't much here; it's mainly for swapping the default keymap between Qwerty and Dvorak, or putting the keyboard into flash mode via the Reset key.
|
||||
|
||||
```
|
||||
,---------+------+------+------+------+------+------+------+------+------+------+---------.
|
||||
| | Reset| | | | | | | | | | Del |
|
||||
|---------`------`------`------`------`------`------`------`------`------`------`---------|
|
||||
| | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
|----------`------`------`------`------`------`------`------`------`------`------`--------|
|
||||
| | | | | | | | | | | | |
|
||||
|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
|
||||
| | | | | | | | | |
|
||||
`-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
|
||||
```
|
68
quantum/fauxclicky.c
Normal file
68
quantum/fauxclicky.c
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright 2017 Priyadi Iman Nurcahyo
|
||||
|
||||
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 <avr/interrupt.h>
|
||||
#include <avr/io.h>
|
||||
#include <timer.h>
|
||||
#include <fauxclicky.h>
|
||||
#include <stdbool.h>
|
||||
#include <musical_notes.h>
|
||||
|
||||
__attribute__ ((weak))
|
||||
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, 2);
|
||||
__attribute__ ((weak))
|
||||
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A3, 2);
|
||||
__attribute__ ((weak))
|
||||
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, 2);
|
||||
|
||||
bool fauxclicky_enabled = true;
|
||||
uint16_t note_start = 0;
|
||||
bool note_playing = false;
|
||||
uint16_t note_period = 0;
|
||||
|
||||
void fauxclicky_init()
|
||||
{
|
||||
// Set port PC6 (OC3A and /OC4A) as output
|
||||
DDRC |= _BV(PORTC6);
|
||||
|
||||
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
|
||||
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
|
||||
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
|
||||
}
|
||||
|
||||
void fauxclicky_stop()
|
||||
{
|
||||
FAUXCLICKY_DISABLE_OUTPUT;
|
||||
note_playing = false;
|
||||
}
|
||||
|
||||
void fauxclicky_play(float note[2]) {
|
||||
if (!fauxclicky_enabled) return;
|
||||
if (note_playing) fauxclicky_stop();
|
||||
FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER));
|
||||
FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)) / 2);
|
||||
note_playing = true;
|
||||
note_period = (note[1] / 16) * (60 / (float)FAUXCLICKY_TEMPO) * 100; // check this
|
||||
note_start = timer_read();
|
||||
FAUXCLICKY_ENABLE_OUTPUT;
|
||||
}
|
||||
|
||||
void fauxclicky_check() {
|
||||
if (!note_playing) return;
|
||||
|
||||
if (timer_elapsed(note_start) > note_period) {
|
||||
fauxclicky_stop();
|
||||
}
|
||||
}
|
99
quantum/fauxclicky.h
Normal file
99
quantum/fauxclicky.h
Normal file
@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright 2017 Priyadi Iman Nurcahyo
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#error "AUDIO_ENABLE and FAUXCLICKY_ENABLE cannot be both enabled"
|
||||
#endif
|
||||
|
||||
#include "musical_notes.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
__attribute__ ((weak))
|
||||
float fauxclicky_pressed_note[2];
|
||||
__attribute__ ((weak))
|
||||
float fauxclicky_released_note[2];
|
||||
__attribute__ ((weak))
|
||||
float fauxclicky_beep_note[2];
|
||||
|
||||
bool fauxclicky_enabled;
|
||||
|
||||
//
|
||||
// tempo in BPM
|
||||
//
|
||||
|
||||
#ifndef FAUXCLICKY_TEMPO
|
||||
#define FAUXCLICKY_TEMPO TEMPO_DEFAULT
|
||||
#endif
|
||||
|
||||
// beep on press
|
||||
#define FAUXCLICKY_ACTION_PRESS fauxclicky_play(fauxclicky_pressed_note)
|
||||
|
||||
// beep on release
|
||||
#define FAUXCLICKY_ACTION_RELEASE fauxclicky_play(fauxclicky_released_note)
|
||||
|
||||
// general purpose beep
|
||||
#define FAUXCLICKY_BEEP fauxclicky_play(fauxclicky_beep_note)
|
||||
|
||||
// enable
|
||||
#define FAUXCLICKY_ON fauxclicky_enabled = true
|
||||
|
||||
// disable
|
||||
#define FAUXCLICKY_OFF do { \
|
||||
fauxclicky_enabled = false; \
|
||||
fauxclicky_stop(); \
|
||||
} while (0)
|
||||
|
||||
// toggle
|
||||
#define FAUXCLICKY_TOGGLE do { \
|
||||
if (fauxclicky_enabled) { \
|
||||
FAUXCLICKY_OFF; \
|
||||
} else { \
|
||||
FAUXCLICKY_ON; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
//
|
||||
// pin configuration
|
||||
//
|
||||
|
||||
#ifndef FAUXCLICKY_CPU_PRESCALER
|
||||
#define FAUXCLICKY_CPU_PRESCALER 8
|
||||
#endif
|
||||
|
||||
#ifndef FAUXCLICKY_ENABLE_OUTPUT
|
||||
#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1);
|
||||
#endif
|
||||
|
||||
#ifndef FAUXCLICKY_DISABLE_OUTPUT
|
||||
#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0));
|
||||
#endif
|
||||
|
||||
#ifndef FAUXCLICKY_TIMER_PERIOD
|
||||
#define FAUXCLICKY_TIMER_PERIOD ICR3
|
||||
#endif
|
||||
|
||||
#ifndef FAUXCLICKY_DUTY_CYCLE
|
||||
#define FAUXCLICKY_DUTY_CYCLE OCR3A
|
||||
#endif
|
||||
|
||||
//
|
||||
// definitions
|
||||
//
|
||||
|
||||
void fauxclicky_init(void);
|
||||
void fauxclicky_stop(void);
|
||||
void fauxclicky_play(float note[2]);
|
||||
void fauxclicky_check(void);
|
||||
|
@ -7,6 +7,10 @@
|
||||
#define TAPPING_TERM 200
|
||||
#endif
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
#include "fauxclicky.h"
|
||||
#endif
|
||||
|
||||
static void do_code16 (uint16_t code, void (*f) (uint8_t)) {
|
||||
switch (code) {
|
||||
case QK_MODS ... QK_MODS_MAX:
|
||||
@ -196,6 +200,26 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
case FC_TOG:
|
||||
if (record->event.pressed) {
|
||||
FAUXCLICKY_TOGGLE;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FC_ON:
|
||||
if (record->event.pressed) {
|
||||
FAUXCLICKY_ON;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FC_OFF:
|
||||
if (record->event.pressed) {
|
||||
FAUXCLICKY_OFF;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_TOG:
|
||||
if (record->event.pressed) {
|
||||
|
@ -86,6 +86,13 @@ enum quantum_keycodes {
|
||||
AU_OFF,
|
||||
AU_TOG,
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
// Faux clicky
|
||||
FC_ON,
|
||||
FC_OFF,
|
||||
FC_TOG,
|
||||
#endif
|
||||
|
||||
// Music mode on/off/toggle
|
||||
MU_ON,
|
||||
MU_OFF,
|
||||
|
@ -65,3 +65,4 @@ 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
|
||||
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
[](https://travis-ci.org/jackhumbert/qmk_firmware) [](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://travis-ci.org/jackhumbert/qmk_firmware) [](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
|
||||
|
||||
|
@ -33,6 +33,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "nodebug.h"
|
||||
#endif
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
#include <fauxclicky.h>
|
||||
#endif
|
||||
|
||||
void action_exec(keyevent_t event)
|
||||
{
|
||||
@ -41,6 +44,16 @@ void action_exec(keyevent_t event)
|
||||
dprint("EVENT: "); debug_event(event); dprintln();
|
||||
}
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
if (IS_PRESSED(event)) {
|
||||
FAUXCLICKY_ACTION_PRESS;
|
||||
}
|
||||
if (IS_RELEASED(event)) {
|
||||
FAUXCLICKY_ACTION_RELEASE;
|
||||
}
|
||||
fauxclicky_check();
|
||||
#endif
|
||||
|
||||
#ifdef ONEHAND_ENABLE
|
||||
if (!IS_NOEVENT(event)) {
|
||||
process_hand_swap(&event);
|
||||
|
@ -16,8 +16,14 @@
|
||||
*/
|
||||
uint32_t default_layer_state = 0;
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t default_layer_state_set_kb(uint32_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
static void default_layer_state_set(uint32_t state)
|
||||
{
|
||||
state = default_layer_state_set_kb(state);
|
||||
debug("default_layer_state: ");
|
||||
default_layer_debug(); debug(" to ");
|
||||
default_layer_state = state;
|
||||
@ -57,8 +63,14 @@ void default_layer_xor(uint32_t state)
|
||||
*/
|
||||
uint32_t layer_state = 0;
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
static void layer_state_set(uint32_t state)
|
||||
{
|
||||
state = layer_state_set_kb(state);
|
||||
dprint("layer_state: ");
|
||||
layer_debug(); dprint(" to ");
|
||||
layer_state = state;
|
||||
|
@ -29,6 +29,9 @@ extern uint32_t default_layer_state;
|
||||
void default_layer_debug(void);
|
||||
void default_layer_set(uint32_t state);
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t default_layer_state_set_kb(uint32_t state);
|
||||
|
||||
#ifndef NO_ACTION_LAYER
|
||||
/* bitwise operation */
|
||||
void default_layer_or(uint32_t state);
|
||||
@ -69,6 +72,8 @@ void layer_xor(uint32_t state);
|
||||
#define layer_xor(state)
|
||||
#define layer_debug()
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t layer_state_set_kb(uint32_t state);
|
||||
#endif
|
||||
|
||||
/* pressed actions cache */
|
||||
|
@ -51,6 +51,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# include "rgblight.h"
|
||||
#endif
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
# include "fauxclicky.h"
|
||||
#endif
|
||||
#ifdef SERIAL_LINK_ENABLE
|
||||
# include "serial_link/system/serial_link.h"
|
||||
#endif
|
||||
@ -108,6 +111,9 @@ void keyboard_init(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_init();
|
||||
#endif
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
fauxclicky_init();
|
||||
#endif
|
||||
#if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
|
||||
keymap_config.nkro = 1;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user