~ruther/qmk_firmware

ref: c2a81d8fd4d1b90cb0f2af8d6b97b51ec1fb5806 qmk_firmware/keyboards/tweetydabird/lbs4/keymaps/default/keymap.c -rw-r--r-- 664 bytes
c2a81d8f — Joel Challis Revert "fix 60_hhkb ASCII diagram (#21813)" (#21869) 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2022 Markus Knutsson (@TweetyDaBird)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

// Defines names for use in layer keycodes and the keymap
enum layer_names {
    _BASE,
    _RGB
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* Base */
    [_BASE] = LAYOUT(
        KC_MPLY,
		TO(_RGB),	KC_MSEL,	
		KC_MPRV,	KC_MNXT
    ),
    [_RGB] = LAYOUT(
        KC_MPLY,
		TO(_BASE),	RGB_VAI,	
		RGB_TOG,	RGB_VAD
    )
};

bool encoder_update_user(uint8_t index, bool clockwise) {
    if (index == 0) {
		if (clockwise) {
			tap_code(KC_VOLU);
		} else {
			tap_code(KC_VOLD);
		}        
	} 
	return true;
};
Do not follow this link