example_keyboards
Chris Browne 8 years ago
commit 4f1cb9fd5e

3
.gitignore vendored

@ -30,4 +30,5 @@ CMakeLists.txt
.browse.VC.db*
*.stackdump
util/Win_Check_Output.txt
.vscode
.vscode
.stfolder

@ -21,8 +21,9 @@ RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
ENV keyboard=ergodox
ENV subproject=ez
ENV keymap=default
VOLUME /qmk
WORKDIR /qmk
CMD make clean ; make keyboard=${keyboard} keymap=${keymap}
CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}

@ -32,7 +32,9 @@ ABS_ROOT_MAKEFILE := $(abspath $(ROOT_MAKEFILE))
ABS_STARTING_DIR := $(dir $(ABS_STARTING_MAKEFILE))
ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE))
STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR))
TEST_DIR := $(ROOT_DIR)/.build/test
BUILD_DIR := $(ROOT_DIR)/.build
TEST_DIR := $(BUILD_DIR)/test
ERROR_FILE := $(BUILD_DIR)/error_occured
MAKEFILE_INCLUDED=yes
@ -460,8 +462,21 @@ endef
include $(ROOT_DIR)/message.mk
RUN_COMMAND = \
$(COMMAND_$(SILENT_MODE)_$(COMMAND))
# The empty line is important here, as it will force a new shell to be created for each command
# Otherwise the command line will become too long with a lot of keyboards and keymaps
define RUN_COMMAND
+error_occured=0;\
$(COMMAND_$(SILENT_MODE)_$(COMMAND))\
if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
endef
define RUN_TEST
+error_occured=0;\
$($(TEST)_COMMAND))\
if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
endef
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
@ -481,17 +496,17 @@ $(SUBPROJECTS): %: %-allkm
*) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
esac \
done
rm -f $(ERROR_FILE) > /dev/null 2>&1
$(eval $(call PARSE_RULE,$@))
$(eval $(call SET_SILENT_MODE))
# Run all the commands in the same shell, notice the + at the first line
# it has to be there to allow parallel execution of the submake
# This always tries to compile everything, even if error occurs in the middle
# But we return the error code at the end, to trigger travis failures
+error_occured=0; \
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
$(foreach TEST,$(TESTS),$($(TEST)_COMMAND)) \
if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
$(foreach TEST,$(TESTS),$(RUN_TEST))
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
# All should compile everything
.PHONY: all

@ -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;
};

@ -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;
};

@ -11,7 +11,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* | = | 1 | 2 | 3 | 4 | 5 |Ctrl- | | Ctrl+| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS),
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC),
@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_HOME,
KC_SPC,KC_LEAD,KC_END,
// right hand
KC_RGHT, KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS,
LCTL(KC_EQL), 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,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT),
MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,

@ -4,6 +4,10 @@ This is my personal layout which I use to test out ideas which may or may not ma
Changelog:
## Nov 1, 2016:
* Adds dedicated text zooming keys in inner corners
## May 24, 2016:
* Implements Leader key example

@ -36,21 +36,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS,
CTL_T(KC_ESC), 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),
KC_FN1, KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
MO(SYMB), KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_HOME,
KC_END,
KC_SPC, KC_LGUI, KC_FN2,
KC_SPC,KC_LGUI,MO(MDIA),
// right hand
KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB),
KC_PGUP, CTL_T(KC_ESC),
KC_PGUP, CTL_T(KC_ESC),
KC_PGDN,
KC_FN1, KC_TAB, KC_ENT
MO(SYMB),KC_TAB, KC_ENT
),
/* Keymap 1: Symbol Layer
*

@ -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;
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

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)

@ -1,36 +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_ */
#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_ */

@ -1,324 +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;
}
};
#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;
}
};

@ -1,113 +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.
<!-- -*- 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.

@ -35,19 +35,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------------------------------------+
* | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | |
* |-----------------------------------------------------------------------------------------+
* | | Vol-| Vol+| Mute| | | | | Home| PgUp| Left |Right| |
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| |
* |-----------------------------------------------------------------------------------------+
* | | Prev| Play| Next| | | | | End |PgDwn| Down| | |
* | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | |
* +-----------------------------------------------------------------------------------------+
* | | | | | |
* | | | | Stop | |
* `----------------------------------------------------------------´
*/
[FN] = KEYMAP(
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS
),
/* MOUSE Layer

@ -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
```

@ -100,3 +100,16 @@ half to a computer by USB the keyboard will use QWERTY and Colemak when the
right half is connected.
Notes on Using Pro Micro 3.3V
-----------------------------
Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
the frequency on the 3.3V board.
Also, if the slave board is producing weird characters in certain columns,
update the following line in `matrix.c` to the following:
```
// _delay_us(30); // without this wait read unstable value.
_delay_us(300); // without this wait read unstable value.
```

@ -109,15 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F21 | F22 | F23 | F24 | | | Lock | | | | |
* | | F21 | F22 | F23 | F24 | | | Power| | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | Prev | Mute | Play | Next | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_FUNC] = {
{RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(LALT(KC_VOLU))},
{XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(LALT(KC_VOLD))},
{_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, S(LCTL(KC_POWER)), XXXXXXX, XXXXXXX, XXXXXXX, _______},
{RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU},
{XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD},
{_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER, XXXXXXX, XXXXXXX, XXXXXXX, _______},
{_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______}
}

@ -5,24 +5,24 @@
#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;
// 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 _WORKMAN 2
#define _PUNC 9
#define _NUM 10
#define _FUNC 11
#define _EMOJI 12
#define _ADJUST 16
enum layers {
_QWERTY,
_COLEMAK,
_WORKMAN,
_PUNC,
_NUM,
_FUNC,
_EMOJI,
_GUI,
};
enum planck_keycodes {
// layouts
@ -35,6 +35,7 @@ enum planck_keycodes {
NUM,
FUNC,
EMOJI,
GUI,
// os switchers
LINUX,
@ -43,10 +44,12 @@ enum planck_keycodes {
};
// Fillers to make layering clearer
#define _______ KC_TRNS
#define XXXXXXX KC_NO
// unicode map
enum unicode_name {
GRIN, // grinning face 😊
TJOY, // tears of joy 😂
@ -147,6 +150,18 @@ const uint32_t PROGMEM unicode_map[] = {
[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] = {
@ -189,11 +204,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Workman
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O |Enter |
* | Esc | A | S | H | T | G | Y | N | E | O | I |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
* | Shift| Z | X | M | C | V | K | K | , | . | / |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
* `-----------------------------------------------------------------------------------'
@ -207,56 +222,56 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Punc
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ` | | | | | | | | _ | + | { | } | " |
* | | | \ | - | = | < | > | ( | ) | ' | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | \ | - | = | [ | ] | ' |
* | | | | | _ | + | { | } | [ | ] | " | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | < | > | |
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_PUNC] = {
{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_GRV, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO},
{_______, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT},
{_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, KC_LABK, KC_RABK, _______}
{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 |
* | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | @ | A | B | C | [ | ] | 4 | 5 | 6 | : |Enter |
* | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | D | E | F | & | # | 1 | 2 | 3 | | |
* | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | x | | | | 0 | , | . | | |
* | | | | x | | | 0 | , | . | + | - |
* `-----------------------------------------------------------------------------------'
*/
[_NUM] = {
{_______, 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_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_COLN, KC_BSLS},
{_______, _______, S(KC_D), S(KC_E), S(KC_F), KC_AMPR, KC_HASH, KC_1, KC_2, KC_3, _______, _______},
{_______, _______, KC_X, _______, _______, KC_SPC, KC_SPC, KC_0, KC_COMM,KC_KP_DOT,_______, _______}
{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 | Bksp |
* | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | F5 | F6 | F7 | F8 | | | Left | Down | Right| PgDn | |
* | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F9 | F10 | F11 | F12 | | | | Home | End | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | |Print |
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_FUNC] = {
{_______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_BSPC},
{_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______},
{_______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_HOME, KC_END, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,KC_PSCREEN}
{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
@ -274,27 +289,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{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(TONGU),X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)}
{ X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)}
},
/* Adjust
/* GUI
* ,-----------------------------------------------------------------------------------.
* | | |Linux | Win | OSX | | |Qwerty|Colemk|Workmm| | |
* | | 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|
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{_______, _______, LINUX, WIN, OSX, _______, _______, QWERTY, COLEMAK, WORKMAN, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
[_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}
},
};
@ -304,6 +318,10 @@ 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) {
@ -312,6 +330,9 @@ void persistant_default_layer_set(uint16_t 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) {
@ -343,20 +364,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case PUNC:
if (record->event.pressed) {
layer_on(_PUNC);
update_tri_layer(_PUNC, _EMOJI, _ADJUST);
update_tri_layer(_PUNC, _EMOJI, _GUI);
} else {
layer_off(_PUNC);
update_tri_layer(_PUNC, _EMOJI, _ADJUST);
update_tri_layer(_PUNC, _EMOJI, _GUI);
}
return false;
break;
case EMOJI:
if (record->event.pressed) {
layer_on(_EMOJI);
update_tri_layer(_PUNC, _EMOJI, _ADJUST);
update_tri_layer(_PUNC, _EMOJI, _GUI);
} else {
layer_off(_EMOJI);
update_tri_layer(_PUNC, _EMOJI, _ADJUST);
update_tri_layer(_PUNC, _EMOJI, _GUI);
}
return false;
break;
@ -378,14 +399,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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_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;
}

@ -1 +1,11 @@
# Priyadi's Planck Layout
# 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)

@ -4,5 +4,6 @@
#include "../../config.h"
#define FORCE_NKRO 1
#define PREVENT_STUCK_MODIFIERS
#endif

@ -13,13 +13,18 @@
#define _QWERTY 0
#define _LOWER 3
#define _RAISE 4
#define _MQWERTY 5
#define _MLOWER 8
#define _MRAISE 9
#define _ADJUST 16
enum preonic_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
BACKLIT
MQWERTY,
MLOWER,
MRAISE
};
// Fillers to make layering more clear
@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| < | Z | X | C | V | B | N | M | . | , | - |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | Alt |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
* | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = {
@ -46,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
{KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
{KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
{KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
@ -59,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | |VolDwn| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | |Bspc | | | | | |
* | | | | | | |Bspc | | |PgDn |PgUp | |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = {
@ -67,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
{_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
{_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______}
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______}
},
/* Raise
@ -76,11 +81,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | |Mouse^| | | | |ScrlUp| | | ^ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | " |
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | > | | | | | | |ScrlDown| : | ; | _ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | |Bspc | | | | | | |
* | | | | | |Bspc | | | | PgDn | PgUp | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
@ -88,7 +93,70 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
{_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
{_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______}
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______}
},
/* Mac Qwerty
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Å |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| < | Z | X | C | V | B | N | M | . | , | - |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_MQWERTY] = {
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC},
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
{KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
{KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Mac Lower
* ,-----------------------------------------------------------------------------------.
* | | @ | £ | $ | | | { | [ | ] | } | \ | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | | |VolUp | | | ~ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | |LastS |PauseP|NextS | | * |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | |VolDwn| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | |Bspc | | |PgDn |PgUp | |
* `-----------------------------------------------------------------------------------'
*/
[_MLOWER] = {
{_______, NO_AT, NO_PND, NO_DLR, _______, _______, LSFT(LALT(KC_8)), NO_LBRC, NO_RBRC, LSFT(LALT(KC_9)), LSFT(LALT(KC_7)), KC_DEL},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
{_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
{_______, NO_LBRC, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______}
},
/* Mac Raise
* ,-----------------------------------------------------------------------------------.
* | ! | " | # | ¤ | % | & | / | ( | ) | = | ? | Ins |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | |Mouse^| | | | |ScrlUp| | | ^ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | > | | | | | | |ScrlDown| : | ; | _ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | |Bspc | | | | PgDn | PgUp | |
* `-----------------------------------------------------------------------------------'
*/
[_MRAISE] = {
{LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS},
{_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
{_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
{_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______}
},
/* Adjust (Lower + Raise)
@ -97,18 +165,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Reset| | | | | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | | | | | |Rsft |
* | | | | | | | | | | | |Rshift|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |MusOn |MusOff| | | | | | | | | Reset|
* | |MusOn |MusOff| | | | |NrmMode|MacMode| | | Reset|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
{_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT},
{_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET },
{_______, MU_ON, MU_OFF, _______, _______, _______, _______, TO(0), TO(5), _______, _______, RESET },
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
@ -117,14 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef AUDIO_ENABLE
float tone_startup[][2] = {
{NOTE_B5, 20},
{NOTE_B6, 8},
{NOTE_DS6, 20},
{NOTE_B6, 8}
{NOTE_D5, 8},
{NOTE_E6, 8},
{NOTE_D6, 8},
{NOTE_E5, 8}
};
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
@ -139,9 +205,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
@ -166,14 +229,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
case BACKLIT:
case MQWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_MQWERTY);
}
return false;
break;
case MLOWER:
if (record->event.pressed) {
layer_on(_MLOWER);
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
} else {
layer_off(_MLOWER);
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
}
return false;
break;
case MRAISE:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
layer_on(_MRAISE);
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
} else {
unregister_code(KC_RSFT);
layer_off(_MRAISE);
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
}
return false;
break;

@ -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

@ -42,6 +42,11 @@ void unicode_input_start (void) {
register_code(KC_PPLS);
unregister_code(KC_PPLS);
break;
case UC_WINC:
register_code(KC_RALT);
unregister_code(KC_RALT);
register_code(KC_U);
unregister_code(KC_U);
}
wait_ms(UNICODE_TYPE_DELAY);
}
@ -83,22 +88,42 @@ __attribute__((weak))
const uint32_t PROGMEM unicode_map[] = {
};
// 5 digit max because of linux limitation
void register_hex32(uint32_t hex) {
for(int i = 4; i >= 0; i--) {
uint8_t onzerostart = 1;
for(int i = 7; i >= 0; i--) {
if (i <= 3) {
onzerostart = 0;
}
uint8_t digit = ((hex >> (i*4)) & 0xF);
register_code(hex_to_keycode(digit));
unregister_code(hex_to_keycode(digit));
if (digit == 0) {
if (onzerostart == 0) {
register_code(hex_to_keycode(digit));
unregister_code(hex_to_keycode(digit));
}
} else {
register_code(hex_to_keycode(digit));
unregister_code(hex_to_keycode(digit));
onzerostart = 0;
}
}
}
__attribute__((weak))
void unicode_map_input_error() {}
bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
const uint32_t* map = unicode_map;
uint16_t index = keycode & 0x7FF;
unicode_input_start();
register_hex32(pgm_read_dword_far(&map[index]));
unicode_input_finish();
uint32_t code = pgm_read_dword_far(&map[index]);
if ((code > 0xFFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) {
// when character is out of range supported by the OS
unicode_map_input_error();
} else {
unicode_input_start();
register_hex32(code);
unicode_input_finish();
}
}
return true;
}

@ -3,10 +3,11 @@
#include "quantum.h"
#define UC_OSX 0
#define UC_LNX 1
#define UC_WIN 2
#define UC_BSD 3
#define UC_OSX 0 // Mac OS X
#define UC_LNX 1 // Linux
#define UC_WIN 2 // Windows 'HexNumpad'
#define UC_BSD 3 // BSD (not implemented)
#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose
#ifndef UNICODE_TYPE_DELAY
#define UNICODE_TYPE_DELAY 10

@ -326,8 +326,14 @@ This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only
`UNICODEMAP_ENABLE`
This allows sending unicode symbols using `X(<unicode>)` in your keymap. Codes
up to 0xFFFFF are supported, including emojis. But you need to maintain a
separate mapping table in your keymap file.
up to 0xFFFFFFFF are supported, including emojis. You will need to maintain
a separate mapping table in your keymap file.
Known limitations:
- Under Mac OS, only codes up to 0xFFFF are supported.
- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now).
Characters out of range supported by the OS will be ignored.
`BLUETOOTH_ENABLE`
@ -900,7 +906,7 @@ In `quantum/keymap_extras/`, you'll see various language files - these work the
## Unicode support
You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout, see [this article](http://www.poynton.com/notes/misc/mac-unicode-hex-input.html) to learn more) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
## Backlight Breathing

Loading…
Cancel
Save