mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-21 07:02:01 +00:00
updates as per @sigprof review plus reformat
This commit is contained in:
parent
e2145f02d3
commit
5c0485da8d
@ -17,12 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
enum layer_names {
|
enum layer_names { _QW = 0, _LWR, _RSE, _ADJ };
|
||||||
_QW = 0,
|
|
||||||
_LWR,
|
|
||||||
_RSE,
|
|
||||||
_ADJ
|
|
||||||
};
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case (TT(_LWR)):
|
case (TT(_LWR)):
|
||||||
if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
|
if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
|
||||||
@ -95,7 +89,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
break;
|
break;
|
||||||
case (TT(_RSE)):
|
case (TT(_RSE)):
|
||||||
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
|
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
|
||||||
toggle_rse = toggle_rse ? false : true;
|
toggle_rse = !layer_state_is(_RSE);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
break;
|
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) {
|
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LWR, _RSE, _ADJ); }
|
||||||
return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user