summaryrefslogtreecommitdiff
path: root/keyboards/atreus62
diff options
context:
space:
mode:
authorjprmesh <mrachhh@gmail.com>2017-03-15 13:43:16 -0700
committerJonas Rogers <jprmesh@gmail.com>2017-06-17 21:18:58 -0400
commitf9eb11a674f71ab2669f87442e1e99354f46d3be (patch)
tree25052cb8c974d8a1f4b01903550a2977d9fa5eb2 /keyboards/atreus62
parentbb99d7117c24ba0ef5fa80a166c2ab46d0b1f250 (diff)
Atreus52- Fixed Qwerty Dvorak switch
Diffstat (limited to 'keyboards/atreus62')
-rw-r--r--keyboards/atreus62/keymaps/atreus52/keymap.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c
index 65440e6a2c..7e856066e7 100644
--- a/keyboards/atreus62/keymaps/atreus52/keymap.c
+++ b/keyboards/atreus62/keymaps/atreus52/keymap.c
@@ -62,23 +62,19 @@ static uint8_t qw_dv_swap_state = 0;
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
if (keycode == KC_LGUI) {
if (record->event.pressed)
- qw_dv_swap_state |= B00000001;
+ qw_dv_swap_state |= 0b00000001;
else
- qw_dv_swap_state &= ~(B00000001);
+ qw_dv_swap_state &= ~(0b00000001);
}
if (keycode == KC_LCTL) {
if (record->event.pressed)
- qw_dv_swap_state |= B00000010;
+ qw_dv_swap_state |= 0b00000010;
else
- qw_dv_swap_state &= ~(B00000010);
+ qw_dv_swap_state &= ~(0b00000010);
}
- if (qw_dv_swap_state == B00000011) {
- uint8_t layer = biton32(layer_state);
- if (layer == QW)
- TO(DV);
- else if (layer == DV)
- TO(QW);
- return true;
+ if (qw_dv_swap_state == 0b00000011) {
+ layer_invert(DV);
}
+ return true;
}