Skip to content

Commit

Permalink
Fix encoding actions and add Lars keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
tompi committed Mar 31, 2023
1 parent a7f3742 commit 892afe5
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 4 deletions.
8 changes: 4 additions & 4 deletions keyboards/cheapino/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ static bool colABpressed = false;
static bool encoderPressed = false;

void clicked(void) {
tap_code(KC_MUTE);
tap_code(KC_MPLY);
}

void turned(bool clockwise) {
if (IS_LAYER_ON(6)) {
tap_code(LGUI(clockwise ? KC_DOWN : KC_UP));
tap_code(clockwise ? KC_VOLU : KC_VOLD);
} else if (IS_LAYER_ON(3)) {
tap_code(clockwise ? KC_TAB : LSFT(KC_TAB));
tap_code16(clockwise ? LCTL(KC_TAB) : LCTL(LSFT(KC_TAB)));
} else if (IS_LAYER_ON(5)) {
tap_code(clockwise ? KC_MS_WH_DOWN : KC_MS_WH_UP);
} else {
tap_code(clockwise ? KC_VOLU : KC_VOLD);
tap_code16(clockwise ? LGUI(KC_Y) : LGUI(KC_Z));
}
}

Expand Down
51 changes: 51 additions & 0 deletions keyboards/cheapino/keymaps/lars/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once
// Set the mouse settings to a comfortable speed/accuracy trade-off,
// assuming a screen refresh rate of 60 Htz or higher
// The default is 50. This makes the mouse ~3 times faster and more accurate
#define MOUSEKEY_INTERVAL 16
// The default is 20. Since we made the mouse about 3 times faster with the previous setting,
// give it more time to accelerate to max speed to retain precise control over short distances.
#define MOUSEKEY_TIME_TO_MAX 40
// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive
#define MOUSEKEY_DELAY 100
// It makes sense to use the same delay for the mouseweel
#define MOUSEKEY_WHEEL_DELAY 100
// The default is 100
#define MOUSEKEY_WHEEL_INTERVAL 50
// The default is 40
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100

// Pick good defaults for enabling homerow modifiers
#undef TAPPING_TERM
#define TAPPING_TERM 200
// #define PERMISSIVE_HOLD
#define IGNORE_MOD_TAP_INTERRUPT
#define TAPPING_FORCE_HOLD
//#define RETRO_TAPPING

// Underglow configuration
#ifdef RGBLIGHT_ENABLE
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

//#define UNICODE_SELECTED_MODES UC_MAC
125 changes: 125 additions & 0 deletions keyboards/cheapino/keymaps/lars/keymap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"version": 1,
"notes": "My awesome keymap",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "bastardkb/skeletyl",
"keymap": "default",
"layout": "LAYOUT_split_3x5_3",
"layers": [
[
"KC_Q",
"KC_W",
"KC_F",
"KC_P",
"KC_B",
"KC_J",
"KC_L",
"KC_U",
"KC_Y",
"KC_SCLN",
"KC_A",
"KC_R",
"KC_S",
"KC_T",
"KC_G",
"KC_M",
"KC_N",
"KC_E",
"KC_I",
"KC_O",
"LSFT_T(KC_Z)",
"LCTL_T(KC_X)",
"RALT_T(KC_C)",
"KC_D",
"KC_V",
"KC_K",
"KC_H",
"RALT_T(KC_COMM)",
"LCTL_T(KC_DOT)",
"LSFT_T(KC_SLSH)",
"TO(1)",
"KC_BSPC",
"KC_TAB",
"KC_DEL",
"KC_SPC",
"KC_ENT"
],
[
"KC_TRNS",
"KC_7",
"KC_8",
"KC_9",
"KC_TRNS",
"KC_QUOT",
"KC_MINS",
"KC_EQL",
"KC_ASTR",
"KC_CIRC",
"KC_TRNS",
"KC_4",
"KC_5",
"KC_6",
"KC_0",
"KC_TAB",
"KC_LPRN",
"KC_RPRN",
"KC_LBRC",
"KC_RBRC",
"KC_LSFT",
"KC_1",
"KC_2",
"KC_3",
"KC_TRNS",
"KC_PIPE",
"KC_GRV",
"KC_LALT",
"KC_LCTL",
"KC_RSFT",
"TO(2)",
"KC_BSPC",
"KC_TAB",
"KC_DEL",
"TO(0)",
"KC_ENT"
],
[
"KC_TRNS",
"KC_TRNS",
"KC_PGUP",
"KC_TRNS",
"KC_TRNS",
"ANY(UC(0xE6))",
"ANY(UC(0xF8))",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_LEFT",
"KC_UP",
"KC_DOWN",
"KC_RGHT",
"KC_TRNS",
"KC_TRNS",
"KC_LGUI",
"ANY(UC(0xE5))",
"LCTL(KC_LALT)",
"LCA(KC_LSFT)",
"KC_TRNS",
"KC_HOME",
"KC_PGDN",
"KC_END",
"KC_TRNS",
"KC_TRNS",
"KC_RBRC",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TAB",
"KC_DEL",
"TO(0)",
"KC_TRNS"
]
],
"author": "thomas.haukland@gmail.com"
}

0 comments on commit 892afe5

Please sign in to comment.