Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
b36f2609fe
2 changed files with 72 additions and 49 deletions
|
@ -70,54 +70,58 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool encoder_update_user(uint8_t index, bool clockwise)
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
{
|
if (get_mods() & MODS_ALT_MASK) {
|
||||||
if (get_mods() & MODS_ALT_MASK)
|
if (clockwise) {
|
||||||
{
|
tap_code(KC_TAB);
|
||||||
if (clockwise)
|
} else {
|
||||||
{
|
tap_code16(S(KC_TAB));
|
||||||
tap_code(KC_TAB);
|
}
|
||||||
}
|
} else if (get_mods() & MODS_CTRL_MASK) {
|
||||||
else
|
if (clockwise) {
|
||||||
{
|
tap_code(KC_TAB);
|
||||||
tap_code16(S(KC_TAB));
|
} else {
|
||||||
}
|
tap_code16(S(KC_TAB));
|
||||||
}
|
}
|
||||||
else if (get_mods() & MODS_CTRL_MASK)
|
} else if(IS_LAYER_ON(FNLAYER)) {
|
||||||
{
|
if (clockwise) {
|
||||||
if (clockwise)
|
tap_code(KC_MEDIA_NEXT_TRACK);
|
||||||
{
|
} else {
|
||||||
tap_code(KC_TAB);
|
tap_code(KC_MEDIA_PREV_TRACK);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||||
|
switch(get_highest_layer(layer_state)) {
|
||||||
|
// special handling per layer
|
||||||
|
case 0: //layer one
|
||||||
|
if (host_keyboard_led_state().caps_lock)
|
||||||
|
rgb_matrix_set_color_all(255,0,0);
|
||||||
|
else
|
||||||
|
rgb_matrix_set_color_all(0,255,56);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(i,0,0,0);
|
||||||
|
}
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 255) //esc
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(6, 0, 0, 255) //f1
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(8, 0, 0, 255) //q
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(14, 0, 0, 255) //w
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(20, 0, 0, 255) //e
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(15, 0, 0, 255) //s
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 0, 255) //f
|
||||||
|
RGB_MATRIX_INDICATOR_SET_COLOR(49, 0, 0, 255) //R_Alt
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
tap_code16(S(KC)_TAB));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(IS_LAYER_ON(FNLAYER))
|
|
||||||
{
|
|
||||||
if(clockwise)
|
|
||||||
{
|
|
||||||
tap_code(KC_MEDIA_NEXT_TRACK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tap_code(KC_MEDIA_PREV_TRACK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (clockwise)
|
|
||||||
{
|
|
||||||
tap_code(KC_VOLU);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tap_code(KC_VOLD);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
19
keyboards/gmmk/pro/ansi/keymaps/benschaeff/readme.md
Normal file
19
keyboards/gmmk/pro/ansi/keymaps/benschaeff/readme.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Description
|
||||||
|
Pretty simple keymap with a few handy tools on a 2nd layer and rotary encoder.
|
||||||
|
|
||||||
|
# Encoder
|
||||||
|
Holding tab and scrolling encoder will allow scrolling through applications, as if using alt + tab
|
||||||
|
Holding ctrl and scrolling encoder will allow scrolling through chrome tabs
|
||||||
|
FN + Encoder scroll is media next/prev
|
||||||
|
FN + Encoder press is media pause
|
||||||
|
default encoder behavior is volume up/down
|
||||||
|
|
||||||
|
# Function Layer
|
||||||
|
FN + \ is used to put keyboard into bootloader mode
|
||||||
|
FN + ESC is the same as alt F4, for closing applications
|
||||||
|
FN + F1 is to close current browser tab
|
||||||
|
FN + Q moves current application one monitor to the left
|
||||||
|
FN + W maximizes current application
|
||||||
|
FN + E moves current application one monitor to the right
|
||||||
|
FN + S minimizes current application
|
||||||
|
FN + F is used in junction with the "Popout tab" extension to chrome (https://chrome.google.com/webstore/detail/popout-tab/pcfcieidiaaobigemjnkclebhnmgfbco) to pop out current tab to its own window
|
Loading…
Reference in a new issue