Browse Source

Shift lights

pull/11366/head
jackokring 2 years ago
parent
commit
93f9c2f6f7
2 changed files with 26 additions and 16 deletions
  1. +18
    -8
      keyboards/dz60/keymaps/jacko_keys/keymap.c
  2. +8
    -8
      keyboards/dz60/keymaps/jacko_keys/readme.md

+ 18
- 8
keyboards/dz60/keymaps/jacko_keys/keymap.c View File

@ -141,7 +141,7 @@ const uint32_t PROGMEM unicode_map[] = {
[AU] = U' ', [AV] = U' ', [AW] = U' ',
[AX] = U' ', [AY] = U' ', [AZ] = U' '
//FILL IN AS REQUIRED
//132 bytes free => 33 Unicode characters free.
//60 bytes free => 15 Unicode characters free.
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -260,7 +260,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_60_ansi(
KC_ESC, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_LOCK, KC_HANJ, KC_DEL,
KC_TAB, KC_RO, KC_KANA, KC_JYEN, KC_HENK, KC_MHEN, KC_INT6, KC_INT7, KC_INT8, KC_INT9, KC_HAEN, KC_HOME, KC_END, KC_INS,
KC_NLCK, KC_WSCH, Z(INT), Z(DIF), KC_WFAV, Z(ROOT), KC_VOLD, KC_VOLU, Z(DEG), Z(PND), KC_PAUS, KC_PSCR, KC_ENT,
KC_SLCK, KC_WSCH, Z(INT), Z(DIF), KC_WFAV, Z(ROOT), KC_VOLD, KC_VOLU, Z(DEG), Z(PND), KC_PAUS, KC_PSCR, KC_ENT,
KC_LSFT, KC_LANG3,KC_LANG4,KC_LANG5,KC_LANG6,KC_LANG7,KC_LANG8,KC_LANG9,KC_ACL0, KC_ACL1, KC_ACL2, KC_RSFT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
@ -286,6 +286,14 @@ const rgblight_segment_t PROGMEM my_bqn[] = RGBLIGHT_LAYER_SEGMENTS(
{11, 2, HSV_BLUE}
);
const rgblight_segment_t PROGMEM my_losh[] = RGBLIGHT_LAYER_SEGMENTS(
{11, 2, HSV_MAGENTA}
);
const rgblight_segment_t PROGMEM my_hish[] = RGBLIGHT_LAYER_SEGMENTS(
{11, 2, HSV_CYAN}
);
const rgblight_segment_t PROGMEM my_scroll[] = RGBLIGHT_LAYER_SEGMENTS(
{15, 1, HSV_WHITE}
);
@ -296,6 +304,8 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
my_nav,
my_macro,
my_bqn,// Extended mode
my_losh,
my_hish,
my_scroll // Scroll lock
);
@ -305,11 +315,7 @@ void keyboard_post_init_user(void) {
}
void calc_layer(layer_state_t s, uint16_t light, uint16_t layers) {
bool t = false;
for(uint16_t i = layers; i < 11; i+=4) {
t |= layer_state_cmp(s, i);
}
if(t) rgblight_set_layer_state(light, t);
rgblight_set_layer_state(light, layer_state_cmp(s, layers));
}
layer_state_t layer_state_set_user(layer_state_t state) {
@ -318,12 +324,16 @@ layer_state_t layer_state_set_user(layer_state_t state) {
calc_layer(state, 2, 1);//NAV
calc_layer(state, 3, 2);//Macro
calc_layer(state, 4, 3);//BQN
rgblight_set_layer_state(5, layer_state_cmp(state, 4) || layer_state_cmp(state, 5) ||
layer_state_cmp(state, 6) || layer_state_cmp(state, 7));//LO Shift
rgblight_set_layer_state(6, layer_state_cmp(state, 8) || layer_state_cmp(state, 9) ||
layer_state_cmp(state, 10));//HI Shift
return state;
}
bool led_update_user(led_t led_state) {
// Caps lock etc
rgblight_set_layer_state(0, led_state.caps_lock);
rgblight_set_layer_state(5, led_state.scroll_lock);
rgblight_set_layer_state(7, led_state.scroll_lock);
return true;
}

+ 8
- 8
keyboards/dz60/keymaps/jacko_keys/readme.md View File

@ -21,7 +21,7 @@ The right `Win` key is for getting the application context menu.
* Right control exchanged with function shift key as always.
* This layer is the keyboard default and has few surprises. To access this layer the key combination `Fn`+Left `Ctrl` has been reserved. In macro mode the `Fn` key is sticky and so it may cause a little confusion.
### ANSI Shift Layer (`Fn` ANSI)
### ANSI Shift Layer (`Fn` ANSI MAGENTA Shift)
* Scroll lock placed on caps lock.
* Right `Alt`/`Win`/`Ctrl`/slash form cursor block.
* Backslash is insert.
@ -40,7 +40,7 @@ The right `Win` key is for getting the application context menu.
* Browser home key is O, search is A, favourites is F.
* Volume is up(J) and down(H).
### Control Shift Layer (Left Control on `Fn` Layer)
### Control Shift Layer (Left Control on `Fn` Layer CYAN Shift)
* Various control code literals and icongraphs plus cursor.
* Comma and period are page up/down.
* Semicolon is pause.
@ -48,10 +48,10 @@ The right `Win` key is for getting the application context menu.
* The `control_codes.md` contains more information about control codes.
## Navigation Layer (Complete GREEN Layer)
* Right `Alt`/`Win`/control/slash form cursor block.
* Right `Alt`/`Win`/`Ctrl`/slash form cursor block.
* Backslash enters a prefix to enter **BQN** characters. (The **BQN** Layer).
### Navigation Shift Layer (`Fn` Navigation)
### Navigation Shift Layer (`Fn` Navigation MAGENTA Shift)
* Scroll lock placed on caps lock.
* Backslash is insert.
* Backspace is delete.
@ -69,7 +69,7 @@ The right `Win` key is for getting the application context menu.
* Browser search is A, favourites is F.
* Volume is up(J) and down(H).
### Mouse Shift Layer (Left `Alt` on `Fn` Layer)
### Mouse Shift Layer (Left `Alt` on `Fn` Layer CYAN Shift)
* Right `Alt`/`Win`/`Ctrl`/slash form mouse movement block.
* Comma is left mouse button.
* Period is right mouse button.
@ -105,7 +105,7 @@ The right `Win` key is for getting the application context menu.
Space: ‿
```
### Unicode Shift Layer (`Fn` After \ **BQN** Prefix)
### Unicode Shift Layer (`Fn` After \ **BQN** Prefix MAGENTA Shift)
* Unicode selection on alphas.
* Numbers unchanged.
* Square brackets are home and end.
@ -129,7 +129,7 @@ The right `Win` key is for getting the application context menu.
* Right `Win` key is the right `Win` key and not the app context menu key as in other layers.
* Backspace is Left `Win` and Right `Win` combination sticky.
### Macro-board Shift Layer (`Fn` Macro-board)
### Macro-board Shift Layer (`Fn` Macro-board MAGENTA Shift)
* The right `Win` key is one shot sticky.
* Escape is a one shot sticky `Win`+`Alt` shift.
* Tab is a one shot sticky `Win`+`Ctrl`+`Alt`.
@ -138,7 +138,7 @@ The right `Win` key is for getting the application context menu.
* Backspace is a one shot sticky control `Alt` shift.
* `Fn` is still sticky and needs pressing to exit the layer shift.
### Special Shift Layer (Left `Win` on `Fn` Layer)
### Special Shift Layer (Left `Win` on `Fn` Layer CYAN Shift)
* `Fn` exits the special shift layer.
* P and equals is Korean modifiers.
* Minus is key lock for holding down a key until the held key is pressed again.


Loading…
Cancel
Save