You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qmk_firmware/keyboards/minidox/keymaps/tomb0y/keymap.c

145 lines
6.8 KiB

#include "minidox.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
#define _WM 0
#define _DK 1
#define _FUN 2
#define _DK_ACT 0
#define _DK_REL 1
#define _KC_COMS 2
#define _KC_CENT 3
#define DK_ACT M(_DK_ACT) // activate dead key layer
#define DK_REL M(_DK_REL) // release dead key layer
#define KC_COMS M(_KC_COMS) // comma + space
#define KC_CENT M(_KC_CENT) // comma + enter
#define KC_ENOP ALT_T(KC_ENT) // press for enter, hold for option
#define KC_BSCM GUI_T(KC_BSPC) // press for backspace, hold for command
#define KC_CTES CTL_T(KC_ESC) // press for escape, hold for control
#define KC_SHTB SFT_T(KC_TAB) // press for tab, hold for shift
#define KC_SPFN LT(_FUN, KC_SPC) // press for space, hold for function layer (aka spacefn)
#define KC_OPTB RALT(KC_TAB) // option + tab
#define KC_CCSP RGUI(RCTL(KC_P)) // control + command + p
#define KC_CSTB S(RCTL(KC_TAB)) // shift + control + tab
#define KC_C_TB RCTL(KC_TAB) // control + tab
#define KC_C_LF RCTL(KC_LEFT) // control + left
#define KC_C_RT RCTL(KC_RGHT) // control + right
#define KC_BRUP KC_F15 // brightness up on osx
#define KC_BRDN KC_F14 // brightness down on osx
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base layer - workman
*
* ,----------------------------------. ,----------------------------------.
* | q | d | r | w | b | | j | f | u | p | ; |
* |------+------+------+------+------| |------+------+------+------+------|
* | a | s | h | t | g | | y | n | e | o | i |
* |------+------+------+------+------| |------+------+------+------+------|
* | z | x | m | c | v | | k | l | dead | . | / |
* `----------------------------------' `----------------------------------'
* ,--------------------. ,---------------------.
* | tab | esc | enter| |bckspc| space| tab |
* | shift | ctrl | alt | | gui | fn | shift |
* `-------+------+ | | |------+-------.
* `------' `------'
*/
Pull in Upstream (#1) * Various tweaks for some Input:Club build processes * change KEYMAP to LAYOUT for all new keyboards made using this script * Add support for rev3 of the Atom47 (#2672) * Added support for rev3 of the Atom47 * Updated Atom47 readme's * Fix redefine error on rev2 and add maartenwut's keymap * Fix redefine error on LEdiodes keymap * Add Nyquist keymap (#2692) * nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr * Adds Phantom TKL support (#2696) * Add an info.json to phantom keyboard * Add layouts - KEYMAP_WINKEYLESS - KEYMAP_7BIT - KEYMAP_ISO - KEYMAP_ISO_WINKEYLESS * Add key_counts * Add 2 missing F-Row keys * Add TKC1800 info.json Created an info.json for the tkc1800. * Clueboard 60 info.json - adds - LAYOUT_60_ansi - LAYOUT_60_iso - KEYMAP_AEK - KEYMAP - LAYOUT_60_ansi_split_bs_rshift * Add the Speedo keyboard * Fix KC60 info.json file (#2707) * change KEYMAP to LAYOUT in all the KC60 files * Redo the info.json file * Small fixes to TKC1800 - adjust F-row to use 0.25 spacing - split left shift - add key_count * Fix some Configurator Warnings regarding LAYOUT vs KEYMAP (#2708) * change diverge 3 KC_KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for handwired arrow pad * change M10A to LAYOUT for m10-a * Change KC_KEYMAP to LAYOUT_kc and KEYMAP to LAYOUT for mf68 * change KC_KEYMAP to LAYOUT for nano * Refactor to LAYOUT * refactor to LAYOUT-ansi and LAYOUT_iso for s65 * LAYOUT conversions for lfkkeyboards * missed a few renames * mini1800 for lfkeyobards support of LAYOUT * Improve state/chord handling and clean up namespace Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false. * Pull information from config.h and rules.mk (#2711) * Pull information from config.h and rules.mk * Readd the kbd75 maintainer * Remove obsolete info.json entries (#2712) * Clean up some long-standing errors when populating the API (#2715) * More Configurator Warning Fixes (#2716) * mf68_ble did not have the correct .c and .h files * Fix JC65 KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for s60_x * Convert KEYMAP to LAYOUT for lets_split boards * Convert KEYMAP to LAYOUT * more fixes to keymap for iris * convert KEYMAP to LAYOUT for levinson keyboard * change losinggeneration's KEYMAP to LAYOUT * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for nyquist * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for viterbi * convert KEYMAP to LAYOUT * convert KEYMAP and its subsidiries to the LAYOUT standard * convert KEYMAP and its subsidiries to the new LAYOUT standard * Normacos keymap for let's split keyboard (#2691) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * hhkb jp personal keymap (#2698) * Add JJ40 Cockpit personal keymap (#2713) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Add readme for "major" keyboards to eliminate more QMK Configurator errors (#2718) * add readme to ktype keyboard * add readme to m10a * add readme to mini1800 * add readme to parent directory
7 years ago
[_WM] = LAYOUT( \
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, \
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, \
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DK_ACT, KC_DOT, KC_SLSH, \
KC_SHTB, KC_CTES, KC_ENOP, KC_BSCM, KC_SPFN, KC_SHTB \
),
/* Dead key layer
*
* ,----------------------------------. ,----------------------------------.
* | % | & | ? | + | @ | | $ | _ | [ | ] | ! |
* |------+------+------+------+------| |------+------+------+------+------|
* | # | ( | = | 0 | { | | } | 1 | * | ) | - |
* |------+------+------+------+------| |------+------+------+------+------|
* | 6 | 7 | 8 | 9 | | | | \ | 2 | 3 | 4 | 5 |
* `----------------------------------' `----------------------------------'
* ,--------------------. ,---------------------.
* | tab | esc | comma| |bckspc| comma| tab |
* | shift | ctrl |+enter| | gui |+space| shift |
* `-------+------+ | | |------+-------.
* `------' `------'
*/
Pull in Upstream (#1) * Various tweaks for some Input:Club build processes * change KEYMAP to LAYOUT for all new keyboards made using this script * Add support for rev3 of the Atom47 (#2672) * Added support for rev3 of the Atom47 * Updated Atom47 readme's * Fix redefine error on rev2 and add maartenwut's keymap * Fix redefine error on LEdiodes keymap * Add Nyquist keymap (#2692) * nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr * Adds Phantom TKL support (#2696) * Add an info.json to phantom keyboard * Add layouts - KEYMAP_WINKEYLESS - KEYMAP_7BIT - KEYMAP_ISO - KEYMAP_ISO_WINKEYLESS * Add key_counts * Add 2 missing F-Row keys * Add TKC1800 info.json Created an info.json for the tkc1800. * Clueboard 60 info.json - adds - LAYOUT_60_ansi - LAYOUT_60_iso - KEYMAP_AEK - KEYMAP - LAYOUT_60_ansi_split_bs_rshift * Add the Speedo keyboard * Fix KC60 info.json file (#2707) * change KEYMAP to LAYOUT in all the KC60 files * Redo the info.json file * Small fixes to TKC1800 - adjust F-row to use 0.25 spacing - split left shift - add key_count * Fix some Configurator Warnings regarding LAYOUT vs KEYMAP (#2708) * change diverge 3 KC_KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for handwired arrow pad * change M10A to LAYOUT for m10-a * Change KC_KEYMAP to LAYOUT_kc and KEYMAP to LAYOUT for mf68 * change KC_KEYMAP to LAYOUT for nano * Refactor to LAYOUT * refactor to LAYOUT-ansi and LAYOUT_iso for s65 * LAYOUT conversions for lfkkeyboards * missed a few renames * mini1800 for lfkeyobards support of LAYOUT * Improve state/chord handling and clean up namespace Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false. * Pull information from config.h and rules.mk (#2711) * Pull information from config.h and rules.mk * Readd the kbd75 maintainer * Remove obsolete info.json entries (#2712) * Clean up some long-standing errors when populating the API (#2715) * More Configurator Warning Fixes (#2716) * mf68_ble did not have the correct .c and .h files * Fix JC65 KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for s60_x * Convert KEYMAP to LAYOUT for lets_split boards * Convert KEYMAP to LAYOUT * more fixes to keymap for iris * convert KEYMAP to LAYOUT for levinson keyboard * change losinggeneration's KEYMAP to LAYOUT * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for nyquist * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for viterbi * convert KEYMAP to LAYOUT * convert KEYMAP and its subsidiries to the LAYOUT standard * convert KEYMAP and its subsidiries to the new LAYOUT standard * Normacos keymap for let's split keyboard (#2691) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * hhkb jp personal keymap (#2698) * Add JJ40 Cockpit personal keymap (#2713) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Add readme for "major" keyboards to eliminate more QMK Configurator errors (#2718) * add readme to ktype keyboard * add readme to m10a * add readme to mini1800 * add readme to parent directory
7 years ago
[_DK] = LAYOUT( \
KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, \
KC_HASH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, \
KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, DK_REL, KC_4, KC_5, \
KC_SHTB, KC_CTES, KC_CENT, KC_BSCM, KC_COMS, KC_SHTB \
),
/* Function layer
*
* ,----------------------------------. ,---------------------------------.
* | | del | | | | | mute | vol- | vol+ | p | |
* |------+------+------+------+------| |------+------+------+------+------|
* | ` | end | pgup | pgdn | home | | | | | | ' |
* |------+------+------+------+------| |------+------+------+------+------|
* | | || | | | | br- | , | br+ | ^ |
* `----------------------------------' `----------------------------------'
* ,--------------------. ,---------------------.
* | tab | | enter| |bckspc| | tab |
* | shift | | alt | | gui | | shift |
* `-------+------+ | | |------+-------.
* `------' `------'
*/
Pull in Upstream (#1) * Various tweaks for some Input:Club build processes * change KEYMAP to LAYOUT for all new keyboards made using this script * Add support for rev3 of the Atom47 (#2672) * Added support for rev3 of the Atom47 * Updated Atom47 readme's * Fix redefine error on rev2 and add maartenwut's keymap * Fix redefine error on LEdiodes keymap * Add Nyquist keymap (#2692) * nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr * Adds Phantom TKL support (#2696) * Add an info.json to phantom keyboard * Add layouts - KEYMAP_WINKEYLESS - KEYMAP_7BIT - KEYMAP_ISO - KEYMAP_ISO_WINKEYLESS * Add key_counts * Add 2 missing F-Row keys * Add TKC1800 info.json Created an info.json for the tkc1800. * Clueboard 60 info.json - adds - LAYOUT_60_ansi - LAYOUT_60_iso - KEYMAP_AEK - KEYMAP - LAYOUT_60_ansi_split_bs_rshift * Add the Speedo keyboard * Fix KC60 info.json file (#2707) * change KEYMAP to LAYOUT in all the KC60 files * Redo the info.json file * Small fixes to TKC1800 - adjust F-row to use 0.25 spacing - split left shift - add key_count * Fix some Configurator Warnings regarding LAYOUT vs KEYMAP (#2708) * change diverge 3 KC_KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for handwired arrow pad * change M10A to LAYOUT for m10-a * Change KC_KEYMAP to LAYOUT_kc and KEYMAP to LAYOUT for mf68 * change KC_KEYMAP to LAYOUT for nano * Refactor to LAYOUT * refactor to LAYOUT-ansi and LAYOUT_iso for s65 * LAYOUT conversions for lfkkeyboards * missed a few renames * mini1800 for lfkeyobards support of LAYOUT * Improve state/chord handling and clean up namespace Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false. * Pull information from config.h and rules.mk (#2711) * Pull information from config.h and rules.mk * Readd the kbd75 maintainer * Remove obsolete info.json entries (#2712) * Clean up some long-standing errors when populating the API (#2715) * More Configurator Warning Fixes (#2716) * mf68_ble did not have the correct .c and .h files * Fix JC65 KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for s60_x * Convert KEYMAP to LAYOUT for lets_split boards * Convert KEYMAP to LAYOUT * more fixes to keymap for iris * convert KEYMAP to LAYOUT for levinson keyboard * change losinggeneration's KEYMAP to LAYOUT * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for nyquist * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for viterbi * convert KEYMAP to LAYOUT * convert KEYMAP and its subsidiries to the LAYOUT standard * convert KEYMAP and its subsidiries to the new LAYOUT standard * Normacos keymap for let's split keyboard (#2691) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * hhkb jp personal keymap (#2698) * Add JJ40 Cockpit personal keymap (#2713) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Add readme for "major" keyboards to eliminate more QMK Configurator errors (#2718) * add readme to ktype keyboard * add readme to m10a * add readme to mini1800 * add readme to parent directory
7 years ago
[_FUN] = LAYOUT( \
XXXXXXX, KC_DEL, KC_C_LF, KC_C_RT, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, KC_CCSP, XXXXXXX, \
KC_GRV, KC_END, KC_PGUP, KC_PGDN, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, \
KC_OPTB, XXXXXXX, KC_CSTB, KC_C_TB, XXXXXXX, XXXXXXX, KC_BRDN, KC_COMM, KC_BRUP, KC_CIRC, \
KC_SHTB, XXXXXXX, KC_ENOP, KC_BSCM, _______, KC_SHTB \
)
};
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
case _KC_COMS:
if (record->event.pressed) {
return MACRO(T(COMM), T(SPC), END); // comma + space
}
break;
case _KC_CENT:
if (record->event.pressed) {
return MACRO(T(COMM), T(ENT), END); // comma + enter
}
break;
case _DK_ACT:
if (record->event.pressed) {
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || keyboard_report->mods & MOD_BIT(KC_RSFT)) { // act as comma when shift is pressed (eg <)
register_code(KC_COMM);
} else { // activate oneshot dead key layer otherwise
layer_on(_DK);
set_oneshot_layer(_DK, ONESHOT_START);
}
} else { // make sure to deactive dead key layer on key release
clear_oneshot_layer_state(ONESHOT_PRESSED);
unregister_code(KC_COMM);
}
break;
case _DK_REL:
if (record->event.pressed) { // act as 3 on keypress
register_code(KC_3);
} else { // make sure to deactive dead key layer on key release
clear_oneshot_layer_state(ONESHOT_PRESSED);
unregister_code(KC_3);
}
break;
}
return MACRO_NONE;
};