Skip to content

Commit f95995e

Browse files
committed
improve code quality
1 parent 8a183db commit f95995e

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ qmk flash -kb totem -km default -bl uf2-split-right
2525
## Visualization
2626

2727
The graphic below is generated with [keymap-drawer](https://github.com/caksoylar/keymap-drawer).
28+
Not documented in this graphic are combos and [Caps Word](https://docs.qmk.fm/features/caps_word).
2829

2930
![Visualization of the layout](keymap.svg)

keymaps/default/keymap.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,39 +63,35 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
6363
send_string("~/");
6464
return false;
6565
case SEL_LINE:
66-
if (record->event.pressed) {
67-
tap_code(KC_HOME);
68-
tap_code16(LSFT(KC_END));
69-
}
66+
tap_code(KC_HOME);
67+
tap_code16(LSFT(KC_END));
7068
return false;
7169
case COPY_ALL:
72-
if (record->event.pressed) {
73-
tap_code16(LCTL(KC_A));
74-
tap_code16(LCTL(KC_C));
75-
}
70+
tap_code16(LCTL(KC_A));
71+
tap_code16(LCTL(KC_C));
7672
return false;
7773

7874
// Workaround for mod tap with non basic keycodes
7975
case RSFT_T(KC_RPRN):
80-
if (record->tap.count && record->event.pressed) {
76+
if (record->tap.count) {
8177
tap_code16(KC_RPRN);
8278
return false;
8379
}
8480
break;
8581
case LCTL_T(KC_LPRN):
86-
if (record->tap.count && record->event.pressed) {
82+
if (record->tap.count) {
8783
tap_code16(KC_LPRN);
8884
return false;
8985
}
9086
break;
9187
case LALT_T(KC_AMPR):
92-
if (record->tap.count && record->event.pressed) {
88+
if (record->tap.count) {
9389
tap_code16(KC_AMPR);
9490
return false;
9591
}
9692
break;
9793
case LGUI_T(KC_PIPE):
98-
if (record->tap.count && record->event.pressed) {
94+
if (record->tap.count) {
9995
tap_code16(KC_PIPE);
10096
return false;
10197
}

0 commit comments

Comments
 (0)