Skip to content

Commit

Permalink
[qmk#5]
Browse files Browse the repository at this point in the history
enlarge code:
* enlarge keymap.c file with the following content:
    * IMPLEMENTING keycaps matrices for the following layouts:
        * GHKN: 0: Default layer,
        * SYMB: 1: Symbols layer,
        * NMBR: 2: Numbers layer,
    * IMPLEMENTING backlight levels for all the layers (layer_state_set_user),
    * IMPLEMENTING ‘matrix_init_user’ for initialise breathing and backlight status.

❌
  • Loading branch information
manolodeinternet committed Feb 9, 2019
1 parent b452eed commit c902abd
Showing 1 changed file with 227 additions and 2 deletions.
229 changes: 227 additions & 2 deletions keyboards/40percentclub/gherkin/keymaps/30_layout/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ void J_ACUT_finished (qk_tap_dance_state_t *state, void *user_data) {
J_ACUTtap_state.state = cur_dance(state);
switch (J_ACUTtap_state.state) {
case SINGLE_TAP: register_code(KC_J); break;
case SINGLE_HOLD: register_code(KC_RGUI); break;
case SINGLE_HOLD: register_code(KC_LGUI); break;

case DOUBLE_TAP: disable_capslock_before_accents_function(); // caps_lock will not affect accent
acute_finished_function();
Expand All @@ -965,7 +965,7 @@ void J_ACUT_finished (qk_tap_dance_state_t *state, void *user_data) {
void J_ACUT_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (J_ACUTtap_state.state) {
case SINGLE_TAP: unregister_code(KC_J); break;
case SINGLE_HOLD: unregister_code(KC_RGUI); break;
case SINGLE_HOLD: unregister_code(KC_LGUI); break;

case DOUBLE_TAP: acute_reset_function();
enable_capslock_after_accents_function();
Expand Down Expand Up @@ -2041,6 +2041,123 @@ qk_tap_dance_action_t tap_dance_actions[] = {



// 🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵




const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// * | | | | | || | | | | |
/* Keymap GHKN 0: gherkin default layer
* ,----------------------------------.,----------------------------------.
* | | | | | || | | | | |
* | ▪︎ Q | W | E | R | T || Y | U | I | O | P |
* |▪︎▪︎ Tab| | | APPS | || |U_DIAE|I_CIRC| | |
* | SUSR | MOUS | | RESET| || | APPS | | | SUSR |
* |------+------+------+------+------||------+------+------+------+------|
* | | | | | || | | | | |
* | ▪︎ A | S | D | F | G || H | J | K | L | Space|
* |▪︎▪︎ Cap| | |F_CAPS| || |J_ACUT| | | |
* | LSft | LCtl | LAlt | LGui | SYMB || SYMB | LGui | LAlt | LCtl | LSft |
* |------+------+------+------+------||------+------+------+------+------|
* | | | | | || | | | | |
* | Z | X | C | V | B || N | M | ▪︎ ESC| | Enter|
* | | | | | ||N_TILD| |▪︎▪︎Acut| ❌ | |
* |L_XTND| PVIM | FNCT | XFNC | NMBR || NMBR | XFNC | FNCT | |R_XTND|
* '----------------------------------''----------------------------------'
*/

[GHKN] = LAYOUT_ortho_3x10( // layer 0 : default layer
// LSFT_T(KC_A) = MT(MOD_LSFT, KC_A)
//,-----------------+---------------+---------------+---------------+----------------++---------------+---------------+-----------------+-------------+-------------------.
TD(Q_SUSR), TD(W_MOUS), LT(FNCT, KC_E), TD(R_APPS), KC_T, KC_Y, TD(U_APPS), TD(I_CIRC), KC_O, TD(P_SUSR),
//|-----------------|---------------|---------------+---------------+----------------||---------------|---------------+-----------------+-------------+-------------------|
TD(A_CAPS), LCTL_T(KC_S), LALT_T(KC_D), TD(F_CAPS), LT(SYMB, KC_G), LT(SYMB, KC_H), TD(J_ACUT), LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SPC),
//|-----------------|---------------|---------------+---------------+----------------||---------------|---------------+-----------------+-------------+-------------------|
LT(L_XTND, KC_Z), LT(PVIM, KC_X), LT(FNCT, KC_C), LT(XFNC, KC_V), TD(B_NMBR), TD(N_NMBR), LT(XFNC, KC_M), LT(FNCT, KC_ESC), LT(PVIM, KC_BSPC), LT(R_XTND, KC_ENT)
//|-----------------+---------------+---------------+---------------+----------------++---------------+---------------+-----------------+-------------+-------------------.
), // END OF GHKN 0
// 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴




// 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴




/* Keymap SYMB 2: symbols Layer
* ,----------------------------------.,----------------------------------.
* | | | | | || | | | | |
* | ` | ~ | = | _ | % || \ ^ | ( | ) | * | / |
* | | | | | || | | | | |
* |------+------+------+------+------||------+------+------+------+------|
* | | | | | || | | | | |
* | ' " | @ | + | - | $ €|| | | { | } | : | ; |
* | | | | | || | | | | |
* |------+------+------+------+------||------+------+------+------+------|
* | | | | | || | | | | |
* | ! ¡ | ? ¿ | < | > | # || & | [ | ] | , | . |
* | | | | | || | | | | |
* `----------------------------------'`----------------------------------'
*/


//[FIXME]

/*
⁉️ ~ ⁉️ _ % \ ( ) * /
' @ + ⁉️ $ | { } : ⁉️
! ? < > # & ⁉️ ⁉️ , .
*/

// SYMBOLS
[SYMB] = LAYOUT_ortho_3x10( // layer 2: symbols layer
/// 🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞🐞
// IMPLEMENTAR LOS 3 TAPDANCE PARA TILDE, EQUAL & BACKSLASH PARA INCLUIR A AT, HASH, CIRCUNFLEX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

//,------------+---------------+---------------+---------------+------------------++---------------+---------------+-------------+-------------+---------------.
KC_GRAVE, KC_TILD, KC_EQL, KC_UNDS, KC_PERC, TD(BSL_CI), KC_LPRN, KC_RPRN, KC_ASTR, KC_SLSH,
//|------------|---------------|---------------+---------------+------------------||---------------|---------------+-------------+-------------+---------------|
TD(QUOT_D), KC_AT, KC_PLUS, KC_MINS, TD(DO_EUR), KC_PIPE, KC_LCBR, KC_RCBR, KC_COLN, KC_SCLN,
//|------------|---------------|---------------+---------------+------------------||---------------|---------------+-------------+-------------+---------------|
TD(EXCLAM), TD(QUESTI), KC_LABK, KC_RABK, KC_HASH, KC_AMPR, KC_LBRC, KC_RBRC, KC_COMM, KC_DOT
//,------------+---------------+---------------+---------------+------------------++---------------+---------------+-------------+-------------+---------------.
// EURO: http://www.fileformat.info/info/unicode/char/search.htm?q=euro&preview=entity
), // END OF SYMB 2


// 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴


/* Keymap NMBR 1: numbers layer
* ,----------------------------------.,----------------------------------.
* | | | | | || | | | | |
* | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 |
* | | | | | || | | | | |
* |------+------+------+------+------||------+------+------+------+------|
* | | ❌ | | | || | | | | |
* | SPACE|DELETE| | = | $ / €|| - | 4 | 5 | 6 | + |
* | 000 | 00 | 0 | | || | | | | |
* |------+------+------+------+------||------+------+------+------+------|
* | | | | | || | | | | |
* | ENTER| ❌ | TAB | , | . || / | 1 | 2 | 3 | * |
* | | | | | || | | | | |
* `----------------------------------'`----------------------------------'
*/

[NMBR] = LAYOUT_ortho_3x10( // layer 1 : numbers layer
// LSFT_T(KC_A) = MT(MOD_LSFT, KC_A)
//,------------+---------------+---------------+---------------+------------------++---------------+---------------+-------------+-------------+---------------.
KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0,
//|------------|---------------|---------------+---------------+------------------||---------------|---------------+-------------+-------------+---------------|
TD(TRIP_0), TD(DOUB_0), KC_P0, KC_PEQL, TD(DO_EUR), KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PPLS,
//|------------|---------------|---------------+---------------+------------------||---------------|---------------+-------------+-------------+---------------|
KC_PENT, KC_BSPC, KC_TAB, KC_COMM, TD(DONMBR), TD(SLNMBR), KC_P1, KC_P2, KC_P3, KC_PAST
//,------------+---------------+---------------+---------------+------------------++---------------+---------------+-------------+-------------+---------------.
), // END OF NMBR 1



Expand All @@ -2053,6 +2170,9 @@ qk_tap_dance_action_t tap_dance_actions[] = {



};





Expand All @@ -2065,6 +2185,111 @@ qk_tap_dance_action_t tap_dance_actions[] = {



// 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】 END 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】
// 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】 END 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】
// 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】 END 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】
// 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】 END 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】
// 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】 END 【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】【🔴】


uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
/*
case GHKN: // 0
backlight_level(BL_GHKN);
break;
*/
case NMBR: // 1
backlight_level(BL_NMBR);
break;
case SYMB: // 2
backlight_level(BL_SYMB);
break;
case FNCT: // 3
backlight_level(BL_FNCT);
break;
case XFNC: // 4
backlight_level(BL_XFNC);
break;
case L_XTND: // 5
backlight_level(BL_XTND);
break;
case R_XTND: // 6
backlight_level(BL_XTND);
break;
case APPS: // 7
backlight_level(BL_APPS);
break;
// case M_AP: // 8
// backlight_level(BL_M_AP);
// break;
case SUSR: // 8
backlight_level(BL_M_AP);
break;

//

case PVIM: // 9
backlight_level(BL_PVIM);
break;
case DVIM: // 10
backlight_level(BL_DVIM);
break;
case SVIM: // 11
backlight_level(BL_SVIM);
break;
case XVIM: // 12
backlight_level(BL_VIM); //V
break;
case ZVIM: // 13
backlight_level(BL_VIM); //V
break;
case AVIM: // 14
backlight_level(BL_VIM); //V
break;
case MOUS: // 15
backlight_level(BL_MOUS);
break;
// case SUSR: // 16
// backlight_level(BL_SUSR);
// break;

// FAKE 17

// case BLIT: // 18
// backlight_level(BL_1);
// break;
// default: // for any other layers, or the default layer
// backlight_level(BL_MIN);
// break;
}
return state;
};








void matrix_init_user(void) {


breathing_disable();

backlight_level(GHKN);

// set_unicode_input_mode(UC_OSX); // REPLACE UC_XXXX with UC_OSX - the Unicode Input Mode for your OS. See table below.
};











Expand Down

0 comments on commit c902abd

Please sign in to comment.