Dhertz' keymaps (#3094)

* Port my keymap to QMK

* Add Percent Canoe keyboard

* Fix row of nonus backslash

* Update info.json to be correct for canoe

* fix alignment

* Use qmk shortcuts rather than tmk functions

* Move over first macro

* Move rest of macros over

* clean up unused functions

* Move files to userspace for HHKB

* Add keymaps for hhkb

* Change LAYOUT_ISO to LAYOUT_iso

* Remove bootloader key in info.json

* Remove tilde remap from Karabiner

* Add country_iso_alpha2_code to macros

* Add my keymap for canoe

* Add layer colour indicator

* Fix bad rebase

* Fix naming of keymap from rebase

* Add GRV to function layer

* Fix keymap to use new LAYOUT_JP

* Update keymaps to use process_record_*

rather than action functions

* Update hhkb imports to be just what is needed

* Update whitefox to use LAYOUT macro instead of KEYMAP

* Remove redundant imports from user definition

* Move TAPPING_TERM to config.h

* Use layer change events to change RGB LED colour

* temp

* Fix layer switching to iPad on HHKB

* Fix Canoe pictures
This commit is contained in:
Dan Hertz 2018-06-02 16:50:01 +01:00 committed by Drashna Jaelre
parent 2196dc9f86
commit d8478351d7
16 changed files with 396 additions and 16 deletions

View file

@ -0,0 +1,62 @@
#include QMK_KEYBOARD_H
#include "dhertz.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
* ,---------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Del|
* |---------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|Hom|
* |------------------------------------------------------` |---|
* |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| |End|
* |---------------------------------------------------------------|
* |Shif| #| Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD|
* |---------------------------------------------------------------|
* |NcCtl| Alt| CTab| LyrSpc | CGv| Alt|Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[0] = LAYOUT_iso(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
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_HOME,
SRCH_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_END,
KC_LSFT, HSH_TLD, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
NC_CTL, KC_LALT, CMD_TAB_CMD, LYR_SPC, CMD_GRV_CMD, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT
),
/* Layer 1: Special
* ,---------------------------------------------------------------.
* | §| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Iso|
* |---------------------------------------------------------------|
* | | | | | | | | | | | | | | | |
* |------------------------------------------------------` |---|
* | | | | | | | | | |CSL| | | `| | |
* |---------------------------------------------------------------|
* | | `| | |CAC| | | | | | | | |PgU| |
* |---------------------------------------------------------------|
* | | | | | | |Hom|PgD|End|
* `---------------------------------------------------------------'
*/
[1] = LAYOUT_iso(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F10, KC_F11, KC_TRNS, ISO_COUNTRY_CODE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CMD_SFT_L, KC_TRNS, KC_TRNS, KC_NUBS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_NUBS, KC_TRNS, KC_TRNS, CMD_ALT_C, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END
),
};
void matrix_init_keymap(void) {
rgblight_enable_noeeprom();
rgblight_sethsv_teal();
}
uint32_t layer_state_set_keymap(uint32_t state) {
switch (biton32(state)) {
case 1:
rgblight_sethsv_noeeprom_magenta();
break;
default: // for any other layers, or the default layer
rgblight_sethsv_noeeprom_cyan();
break;
}
return state;
}

View file

@ -0,0 +1 @@
#define USB_MAX_POWER_CONSUMPTION 100

View file

@ -0,0 +1,84 @@
#include QMK_KEYBOARD_H
#include "keymap.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
* ,-----------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Del|Bsp|
* |-----------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter |
* |------------------------------------------------------` |
* |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| |
* |-----------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| `|Up |Shi|
* |-----------------------------------------------------------|
* |NCt|| #|Alt|CmT|CmT| LyrSpc |CGv|Iso|Gui|CSL||Rig|Dow|Lef|
* `-----------------------------------------------------------'
*/
[0] = LAYOUT_JP(
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_DEL,KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,
SRCH_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT, KC_SLSH,KC_NUBS, KC_UP, KC_RSFT,
NC_CTL, HSH_TLD,KC_LALT,CMD_TAB_CMD,CMD_TAB_CMD, LT(2, KC_SPC) , CMD_GRV_CMD, ISO_COUNTRY_CODE,KC_RGUI, CMD_SFT_L, KC_LEFT,KC_DOWN,KC_RGHT
),
/* Layer 1: iPad mode (Fixed)
* ,-----------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |-----------------------------------------------------------|
* | | | | | | | | | | | | | | |
* |------------------------------------------------------` |
* |CmdSpc| | | | | | | | | | | | | |
* |-----------------------------------------------------------|
* | | | | | | | | | | | | | | |
* |-----------------------------------------------------------|
* | || ~| |CAD| | |CmH| | | || | | |
* `-----------------------------------------------------------'
*/
[1] = LAYOUT_JP(
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,
CMD_SPC,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_D,KC_TRNS, KC_TRNS ,CMD_H,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS
),
/* Layer 2: HHKB mode (Space)
* ,-----------------------------------------------------------.
* |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
* |-----------------------------------------------------------|
* |Caps |DL0|DL1| | | | | |Psc|Slk|Pus|Up | | |
* |------------------------------------------------------` |
* | |VoD|VoU|Mut| | | |Bsp|Del|CSL|Lef|Rig| | |
* |-----------------------------------------------------------|
* | | | |CAC| | | | | | |Dow| |PgU| |
* |-----------------------------------------------------------|
* | || ~| | | | | | | | ||Hom|PgD|End|
* `-----------------------------------------------------------'
*/
[2] = LAYOUT_JP(
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, DF(0), DF(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,KC_TRNS,
KC_TRNS, KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_TRNS,KC_BSPC, KC_DEL,CMD_SFT_L,KC_LEFT,KC_RGHT,KC_TRNS,KC_PENT,
KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_C,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DOWN,KC_TRNS,KC_PGUP,KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN, KC_END
),
};
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case CMD_SPC:
mod_or_mod_with_macro(record, KC_LGUI, " ");
break;
case CMD_H:
mod_or_mod_with_macro(record, KC_RGUI, "H");
break;
case CMD_ALT_D:
mod_or_mod_with_macro(record, KC_LGUI, SS_LALT("D"));
break;
default:
return true;
}
return false;
}

View file

@ -0,0 +1,7 @@
#include "dhertz.h"
enum dhertz_keycodes {
CMD_SPC = NEW_SAFE_RANGE,
CMD_H,
CMD_ALT_D,
};

View file

@ -0,0 +1,2 @@
OPT_DEFS += -DHHKB_JP

View file

@ -30,14 +30,14 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[0] = KEYMAP( \
[0] = LAYOUT( \
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_GRV, KC_INS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \
),
[1] = KEYMAP( \
[1] = LAYOUT( \
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_MUTE,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, KC_TRNS,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_VOLU,\

View file

@ -0,0 +1,58 @@
/*
Copyright 2015 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/>.
*/
#include QMK_KEYBOARD_H
#include "dhertz.h"
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
* ,---------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Del|
* |---------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|PgU|
* |------------------------------------------------------` |---|
* |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| |PgD|
* |---------------------------------------------------------------|
* |Shif| #| Z| X| C| V| B| N| M| ,| .| /|Shift |Up |Hom|
* |---------------------------------------------------------------|
* |NcCtl| Alt| CTab| LyrSpc |CGv|Iso|CSL|Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[0] = LAYOUT_iso( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
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_PGUP,\
SRCH_CTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, KC_PGDN,\
KC_LSFT,HSH_TLD,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_HOME,\
NC_CTL, KC_LALT,CMD_TAB_CMD, LYR_SPC, CMD_GRV_CMD,ISO_COUNTRY_CODE,CMD_SFT_L, KC_LEFT,KC_DOWN,KC_RGHT \
),
/* Layer 1: HHKB mode (Space)
* ,---------------------------------------------------------------.
* | §| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Backsp|Ins|
* |---------------------------------------------------------------|
* |Caps | | | | | | | |Psc|Slk|Pus| Up| | |Del|
* |------------------------------------------------------` |---|
* | |VoD|VoU|Mut| | | |Bsp|Del|CSL|Lef|Rig| `| |PgU|
* |---------------------------------------------------------------|
* | | `| | |CAC| | | | | | |Dow| |PgU|PgD|
* |---------------------------------------------------------------|
* | | | | | | | |Hom|PgD|End|
* `---------------------------------------------------------------'
*/
[1] = LAYOUT_iso( \
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_INS, \
KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,BL_INC, KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_TRNS,KC_PAUS, KC_UP, KC_DEL, \
KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,BL_TOGG,KC_TRNS,KC_BSPC,KC_DEL, CMD_SFT_L,KC_LEFT,KC_RGHT,KC_NUBS, KC_PENT,KC_PGUP,\
KC_TRNS,KC_NUBS,KC_TRNS,KC_TRNS,CMD_ALT_C, BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DOWN,KC_TRNS,KC_TRNS, KC_PGUP,KC_PGDN,\
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \
),
};

View file

@ -30,7 +30,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP( \
[_QWERTY] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
LT(_FUNC,KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
@ -50,7 +50,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[_WORKMAN] = KEYMAP( \
[_WORKMAN] = LAYOUT( \
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_GRV, KC_PSCR, \
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
LT(_FUNC,KC_CAPS),KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
@ -70,7 +70,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[_DVORAK] = KEYMAP( \
[_DVORAK] = LAYOUT( \
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_GRV, KC_PSCR, \
KC_TAB, KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,KC_EQL, KC_BSPC, KC_DEL, \
LT(_FUNC,KC_CAPS),KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,KC_NUHS,KC_ENT, KC_PGUP,\
@ -90,7 +90,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP( \
[_COLEMAK] = LAYOUT( \
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_GRV, KC_PSCR, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
LT(_FUNC,KC_CAPS),KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
@ -110,7 +110,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `---------------------------------------------------------------'
*/
[_FUNC] = KEYMAP( \
[_FUNC] = LAYOUT( \
RESET, 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_WH_D,KC_BTN2,KC_MS_U,KC_BTN1,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\
_______,KC_WH_U,KC_MS_L,KC_MS_D,KC_MS_R,AG_NORM,AG_SWAP,QWERTY, WORKMAN,DVORAK, COLEMAK,_______,_______,_______, _______,\

View file

@ -30,7 +30,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Gui |Alt | Space |Alt |Ctrl| |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[0] = KEYMAP( \
[0] = LAYOUT( \
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL,KC_NO,KC_BSPC,KC_INS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, KC_BSLS, KC_DEL, \
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, KC_PGUP,\
@ -50,7 +50,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | |hom|pdn|end|
* `---------------------------------------------------------------'
*/
[1] = KEYMAP( \
[1] = LAYOUT( \
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_MUTE,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,BL_TOGG,KC_TRNS,KC_TRNS,BL_INC, KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, KC_TRNS,\
KC_TRNS,KC_TRNS,KC_TRNS,BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_VOLU,\

View file

@ -38,14 +38,14 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Alt|Fn0 |Gui | Space |Gui |Alt | | |Lef|Dow|Rght|
* `----------------------------------------------------------------'
*/
[0] = KEYMAP( \
[0] = LAYOUT( \
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_GRV, KC_PSCR,\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
KC_LSFT,XXXXXXX,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
KC_LALT,KC_FN0,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT, XXXXXXX, KC_LEFT,KC_DOWN,KC_RGHT \
),
[1] = KEYMAP( \
[1] = LAYOUT( \
_______,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_MPRV,KC_MNXT,KC_VOLU,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ , BL_TOGG ,\
_______,KC_MPLY,KC_MSTP,KC_VOLD,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, BL_INC,\

View file

@ -30,21 +30,21 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
[0] = KEYMAP( \
[0] = LAYOUT( \
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_GRV, KC_MUTE,\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
KC_FN0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN1, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \
),
[1] = KEYMAP( \
[1] = LAYOUT( \
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_TRNS,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DEL , KC_INS ,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_VOLU,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_PGUP,KC_VOLD,\
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \
),
[2] = KEYMAP( \
[2] = LAYOUT( \
KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \
KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \
KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\

View file

@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* `---------------------------------------------------------------'
*/
#define KEYMAP( \
#define LAYOUT( \
K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \
K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \
K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \
@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
/* Keymap for truefox layout */
#define KEYMAP_TRUEFOX( \
#define LAYOUT_truefox( \
K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \
K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \
K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \
@ -70,4 +70,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ K80, K81, K82, K83, K84, K85, K86, KC_NO } \
}
/* ISO WhiteFox
* ,---------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Ins|
* |---------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|Del|
* |------------------------------------------------------` |---|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| \| |PgU|
* |---------------------------------------------------------------|
* |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD|
* |---------------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig|
* `---------------------------------------------------------------'
*/
#define LAYOUT_iso( \
K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \
K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K33, \
K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \
K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \
K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, KC_NO, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
{ K80, K81, K82, K83, K84, K85, K86, KC_NO } \
}
#endif

9
users/dhertz/config.h Normal file
View file

@ -0,0 +1,9 @@
#ifndef USERSPACE_CONFIG_H
#define USERSPACE_CONFIG_H
#ifdef TAPPING_TERM
#undef TAPPING_TERM
#endif // TAPPING_TERM
#define TAPPING_TERM 200
#endif // !USERSPACE_CONFIG_H

101
users/dhertz/dhertz.c Normal file
View file

@ -0,0 +1,101 @@
#include "dhertz.h"
// Add reconfigurable functions here, for keymap customization
// This allows for a global, userspace functions, and continued
// customization of the keymap. Use _keymap instead of _user
// functions in the keymaps
__attribute__ ((weak))
void matrix_init_keymap(void) {}
__attribute__ ((weak))
void matrix_scan_keymap(void) {}
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__ ((weak))
uint32_t layer_state_set_keymap (uint32_t state) {
return state;
}
__attribute__ ((weak))
void led_set_keymap(uint8_t usb_led) {}
__attribute__ ((weak))
void action_function_keymap(keyrecord_t *record, uint8_t id, uint8_t opt) {}
// Call user matrix init, then call the keymap's init function
void matrix_init_user(void) {
matrix_init_keymap();
}
// No global matrix scan code, so just run keymap's matix
// scan function
void matrix_scan_user(void) {
matrix_scan_keymap();
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case CMD_TAB_CMD:
mod_or_mod_with_macro(record, KC_LGUI, SS_TAP(X_TAB));
return false;
case CMD_GRV_CMD:
mod_or_mod_with_macro(record, KC_RGUI, SS_TAP(X_GRAVE));
return false;
}
if (record->event.pressed) {
switch(keycode) {
case HSH_TLD:
if (get_mods()&(MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT))) {
SEND_STRING(SS_TAP(X_NONUS_BSLASH));
} else {
SEND_STRING(SS_LALT("3"));
}
break;
case CTRL_A:
SEND_STRING(SS_LCTRL("a"));
break;
case CMD_ALT_C:
SEND_STRING(SS_LGUI(SS_LALT("c")));
break;
case CMD_SFT_L:
SEND_STRING(SS_LGUI("L"));
break;
case ISO_COUNTRY_CODE:
SEND_STRING("country_iso_alpha2_code");
break;
default:
return process_record_keymap(keycode, record);
}
return false;
}
return process_record_keymap(keycode, record);
}
static uint16_t sunds_timer;
void mod_or_mod_with_macro(keyrecord_t *record, uint16_t kc_mod, char* macro) {
if (record->event.pressed) {
sunds_timer = timer_read();
register_code(kc_mod);
} else {
if (timer_elapsed(sunds_timer) < TAPPING_TERM) {
send_string(macro);
}
unregister_code(kc_mod);
}
}
// Runs state check and changes underglow color and animation
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
uint32_t layer_state_set_user (uint32_t state) {
return layer_state_set_keymap (state);
}
void led_set_user(uint8_t usb_led) {
led_set_keymap(usb_led);
}

23
users/dhertz/dhertz.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef USERSPACE
#define USERSPACE
#include "quantum.h"
#define SRCH_CTL CTL_T(KC_F19)
#define LYR_SPC LT(1, KC_SPC)
#define NC_CTL CTL_T(KC_F18)
enum custom_keycodes {
HSH_TLD = SAFE_RANGE,
CTRL_A,
CMD_ALT_C,
CMD_SFT_L,
ISO_COUNTRY_CODE,
CMD_TAB_CMD,
CMD_GRV_CMD,
NEW_SAFE_RANGE,
};
void mod_or_mod_with_macro(keyrecord_t *record, uint16_t kc_mod, char* cmd_or_macro);
#endif

1
users/dhertz/rules.mk Normal file
View file

@ -0,0 +1 @@
SRC += dhertz.c