updates as per @sigprof review plus reformat

This commit is contained in:
Alin M Elena 2021-03-29 22:34:38 +01:00
parent e2145f02d3
commit 5c0485da8d

View File

@ -17,12 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
enum layer_names {
_QW = 0,
_LWR,
_RSE,
_ADJ
};
enum layer_names { _QW = 0, _LWR, _RSE, _ADJ };
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -84,7 +79,6 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case (TT(_LWR)):
if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
@ -95,7 +89,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case (TT(_RSE)):
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
toggle_rse = toggle_rse ? false : true;
toggle_rse = !layer_state_is(_RSE);
}
return true;
break;
@ -104,6 +98,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
}
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LWR, _RSE, _ADJ); }