[Keyboard] Little Big Scroll (#264)
* lbs 4 initial * LBS 4 Completed firmware * LBS 6 Completed Firmware * Cleanup LBS4 * Cleanup LBS6 * fixed keymap * Update readme.md * LBS 6 modified to info.json * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update config.h * Added default QMK keymaps
This commit is contained in:
35
keyboards/tweetydabird/lbs4/keymaps/default/keymap.c
Normal file
35
keyboards/tweetydabird/lbs4/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,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;
|
||||
};
|
||||
Reference in New Issue
Block a user