Skip to content

Commit

Permalink
All Neu variations supported in one map
Browse files Browse the repository at this point in the history
Integrated all Hands Down Nue variations as layers in one keymap: Neu, Bronze (Neu-hx), Silver (Neu-nx), Platinum (Neu-lx), Gold (Neu-tx)
Removed files now redundant after integration of all Neu variations.
Made default layer selection persistent.
Updated combos to (mostly) support all HD Variations
AdaptiveKeys for all Variations.
Integrated SemanticKeys for Mac/Win independence (& persistent)
Finished LingerKeys implementation (Qu, ({[""]})
Tidied up process_record_user. (saved some space)
  • Loading branch information
moutis authored Oct 20, 2021
1 parent 55f75cc commit 6680ba0
Show file tree
Hide file tree
Showing 10 changed files with 835 additions and 67 deletions.
19 changes: 12 additions & 7 deletions config.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#pragma once

#ifndef NO_DEBUG
#define NO_DEBUG
#endif // !NO_DEBUG
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
#define NO_PRINT
#endif // !NO_PRINT

// Set the mouse settings to a comfortable speed/accuracy trade-off,
// assuming a screen refresh rate of 60 Htz or higher
// The default is 50. This makes the mouse ~3 times faster and more accurate
// This enables Link Time Optimization, saving a significant amount of space. Because the Macro and Function features are incompatible with Link Time Optimization, disable those features in config.h:

#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

// The Leader key allows to flexibly assign macros to key sequences.
#ifdef LEADER_ENABLE
Expand Down Expand Up @@ -57,14 +64,12 @@
#define TAPPING_TERM 170 // TAP VS HOLD timing in milliseconds

// Pick good defaults for enabling homerow modifiers
// Allows media codes to properly register in macros and rotary encoder code
#define TAP_CODE_DELAY 5
#define TAP_HOLD_CAPS_DELAY 0
#define PERMISSIVE_HOLD
#define BILATERAL_COMBINATIONS
//#define BILATERAL_COMBINATIONS
#define IGNORE_MOD_TAP_INTERRUPT

#define ADAPTIVE_TERM TAPPING_TERM/2 // default time between keystrokes allowed for adaptives
#ifdef COMBO_ENABLE
#ifdef COMBO_COUNT
#undef COMBO_COUNT
Expand All @@ -85,6 +90,6 @@
#define ADAPTIVE_TERM COMBO_HOLD // use COMBO_HOLD time as a standard threshold (same recation time)
#endif

#define LINGER_TIME TAPPING_TERM * 1.3 // how long to hold before a time-depentant behavior begins
#define LINGER_TIME TAPPING_TERM * 1.2 // how long to hold before a time-depentant behavior begins
#define STATE_RESET_TIME LINGER_TIME * 4 // how long to leave a state active before resetting

32 changes: 29 additions & 3 deletions moutis.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ void keyboard_post_init_user(void) {
OSIndex = 0;
}


eeconfig_read_default_layer(); // get the default layer from eeprom.

#ifdef OLED_DRIVER_ENABLE
oled_clear();
if (user_config.osIsWindows) {
Expand All @@ -57,6 +58,21 @@ void keyboard_post_init_user(void) {
#endif
}

uint32_t layer_state_set_user(uint32_t layer_state) {

/*
Someday, when OLED is omportant again, rewrite to
display Host Keyboard Layer Status using a table of layer names
*/


#ifdef OLED_DRIVER_ENABLE
oled_set_cursor(0, 0);
oled_write_P (layer_name[get_highest_layer(layer_state)]);
}
#endif
return layer_state;
}


#include "moutis_semantickeys.c" // anything could send a semantic, so…first
Expand All @@ -70,7 +86,7 @@ void keyboard_post_init_user(void) {
#endif

#ifdef COMBO_ENABLE
#include "moutis_COMBO_hd_bronze_sk.c"
#include "moutis_COMBO_hd_neu_sk.c"
#endif

#include "moutis_casemods.c"
Expand All @@ -82,13 +98,23 @@ void keyboard_post_init_user(void) {
#include "moutis_MATRIX.c"

#ifdef KEY_OVERRIDE_ENABLE
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE);
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, LT(L_LANG_NUM,KC_BSPC), KC_DELETE);
const key_override_t ques_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_QUES, KC_EXLM);
const key_override_t hash_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_HASH, KC_AT);
const key_override_t dot_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_DOT, KC_COLN);
const key_override_t comm_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_COMM, KC_SCLN);
const key_override_t slsh_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_SLSH, KC_ASTR);
const key_override_t bsls_key_override = ko_make_basic(MOD_MASK_ALT, KC_SLSH, KC_BSLS);

// This globally defines all key overrides to be used
const key_override_t **key_overrides = (const key_override_t *[]){
&delete_key_override,
&ques_key_override,
&hash_key_override,
&dot_key_override,
&comm_key_override,
&slsh_key_override,
&bsls_key_override,
NULL // Null terminate the array of overrides!
};
#endif
Expand Down
31 changes: 23 additions & 8 deletions moutis.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern rgblight_config_t rgblight_config;


void matrix_scan_user_process_combo(void);

// this borrowed from Thomas Bart
typedef union {
uint32_t raw;
Expand All @@ -40,13 +41,17 @@ typedef union {


enum my_layers {
L_HANDSDOWN,
L_QWERTY,
L_PUNCT,
L_FN,
L_MEDIA_NAV,
L_LANG_NUM,
L_DIACR
L_HANDSDOWN,
L_HDSILVER,
L_HDPLATINUM,
L_HDGOLD,
L_HDNEU,
L_PUNCT,
L_FN,
L_NAV,
L_LANG_NUM,
L_SYMBOLS,
L_MEDIA_KBD
};

enum my_keycodes {
Expand Down Expand Up @@ -80,9 +85,19 @@ enum my_layers {
SK_ZOOMOUT, // ZOOM OUT
SK_ZOOMRST, // ZOOM RESET
SK_SECT, // §
SK_ENYE, // ñ/Ñ ENYE
SemKeys_COUNT, // end of non-glyph SemKeys
HD_HASH, // Do we need our own unshifted shift symbols
HD_DQUO, // to avoid the QMK 14.1 bug on not-split boards?
HD_L_Bronze,
HD_L_Silver,
HD_L_Platinum,
HD_L_Gold,
HD_L_Neu,



/* Eventually…these should be handled as SemKeys
/* Eventually…these should be handled as SemKeys?
HD_aumlt,
HD_amacr,
HD_aacut,
Expand Down
Loading

0 comments on commit 6680ba0

Please sign in to comment.