summaryrefslogtreecommitdiffstats
path: root/keyboards/bastardkb/charybdis/4x6/keymaps/via
diff options
context:
space:
mode:
authorCharly Delay <0xcharly@users.noreply.github.com>2022-07-25 18:11:28 +0900
committerGitHub <noreply@github.com>2022-07-25 10:11:28 +0100
commit50a12c06b9c3dd4bda1fbe6dac1f692fade2d4d1 (patch)
tree5864026dbbb2c2b35cfdff17a668d448738995a9 /keyboards/bastardkb/charybdis/4x6/keymaps/via
parent336df3297e2853dca189e084057f59169ded5195 (diff)
[keyboard] bastardkb: restructure folder hierarchy (#16778)
* bastardkb: restructure folder hierarchy ahead of supporting other adapters/mcus Upcoming support for the following (adapter, mcu) pairs will be submitted in follow-up PRs: - `v2/elitec` - `v2/stemcell` - `blackpill` This PR contains the following changes: - Move previous implementation to an inner `v1/elitec` folder - Move keyboard USB IDs and strings to data driven - Update headers to update maintainers list - Run `qmk format-c` * bastardkb/charybdis: remove broken acceleration implementation * bastardkb/charybdis: fix debug output * bastardkb: add support for BastardKb the `v2/elitec` (adapter, mcu) pair * bastardkb: add Blackpill support * bastardkb/charybdis/3x5: add `bstiq` keymap * bastardkb/charybdis: add fake LEDs to the configuration For the Charybdis 3x5 (respectively 4x6), the LED config now simulates 36 (respectively 58) LEDs instead of the actual 35 (respectively 56) to prevent confusion when testing LEDs during assembly when handedness is not set correctly. Those fake LEDs are bound to the physical bottom-left corner. * bastardkbk/charybdis/readme.md: update build commands Merge pull request #5 from Nathancooke7/update_charybdis_readme_v2_shield. * bastardkb/charybdis: fix Via keymap with blackpill * bastardkb/charybdis: add 3x6 configuration * bastardkb/charybdis: remove unnecessary files * bastardkb/charybdis: remove obsolete code * bastardkb/charybdis/3x6: add Via keymap * bastardkb: add support for Splinky (RP2040) board * bastardkb: initial configuration for the Splinky (SPI not working yet) * bastardkb/charybdis/3x5/v2/splinky: tentative change to enable trackball * bastardkb/charybdis/3x5/v2/splinky: fix SCK, MISO, MOSI pins * bastardkb/charybdis/3x5/v2/splinky: fix SCK, MISO, MOSI pins * bastardkb/charybdis/4x6/v2/splinky: add SPI configuration and enable trackball * bastardkb/charybdis/3x6: add splinky config * bastardkb/*/v2/splinky: update drivers to `vendor` * bastardkb/dilemma: add new board * bastardkb/charybdis: fix infinite loop in `layer_state_set_user(…)` in the `via` keymaps * bastardkb/dilemma: add `bstiq` keymap * bastardkb: specify blackpill boards * bastardkb/charybdis: fix blackpill-specific define syntax * bastardkb: remove `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` which are no longer valid options * bastardkb: fix `QK_BOOT` keycodes * bastardkb/dilemma: fix mouse direction on X axis * bastardkb/charybdis/3x6: adjust CS * bastardkb/dilemma: adjust trackpad configuration * charybdis: fix `PWM33XX_CS_PIN` defines This is a follow-up of https://github.com/qmk/qmk_firmware/pull/17613. * bastardkb: remove Vial mentions from `bstiq` keymaps * Cleanup unnecessary comments Co-authored-by: Nathan <nathan.cooke@compass.com> Co-authored-by: Charly Delay <0xcharly@codesink.dev>
Diffstat (limited to 'keyboards/bastardkb/charybdis/4x6/keymaps/via')
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h13
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c37
2 files changed, 25 insertions, 25 deletions
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h b/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h
index 75eb2240f3..c31e39261e 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h
@@ -19,7 +19,7 @@
#ifdef VIA_ENABLE
/* VIA configuration. */
# define DYNAMIC_KEYMAP_LAYER_COUNT 4
-#endif // VIA_ENABLE
+#endif // VIA_ENABLE
/* Disable unused features. */
#define NO_ACTION_ONESHOT
@@ -33,21 +33,16 @@
* See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term
*/
# define TAPPING_TERM 200
-#endif // TAPPING_TERM
+#endif // TAPPING_TERM
/* Charybdis-specific features. */
#ifdef POINTING_DEVICE_ENABLE
-// Enable pointer acceleration, which increases the speed by ~2x for large
-// displacement, while maintaining 1x speed for slow movements.
-// - `CHARYBDIS_POINTER_ACCELERATION_FACTOR`
-# define CHARYBDIS_POINTER_ACCELERATION_ENABLE
-
// Automatically enable the pointer layer when moving the trackball. See also:
// - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS`
// - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD`
// #define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
-#endif // POINTING_DEVICE_ENABLE
+#endif // POINTING_DEVICE_ENABLE
/* RGB Matrix. */
@@ -69,4 +64,4 @@
# define RGB_MATRIX_STARTUP_SAT 255
# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL
-#endif // RGB_MATRIX_ENABLE
+#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c
index cf24fea3c0..8c55855af1 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c
@@ -18,7 +18,7 @@
#ifdef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
# include "timer.h"
-#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
+#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
enum charybdis_keymap_layers {
LAYER_BASE = 0,
@@ -35,18 +35,25 @@ static uint16_t auto_pointer_layer_timer = 0;
# ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS
# define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS 1000
-# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS
+# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS
# ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD
# define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD 8
-# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD
-#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
+# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD
+#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
#define LOWER MO(LAYER_LOWER)
#define RAISE MO(LAYER_RAISE)
#define PT_Z LT(LAYER_POINTER, KC_Z)
#define PT_SLSH LT(LAYER_POINTER, KC_SLSH)
+#ifndef POINTING_DEVICE_ENABLE
+# define DRGSCRL KC_NO
+# define DPI_MOD KC_NO
+# define S_D_MOD KC_NO
+# define SNIPING KC_NO
+#endif // !POINTING_DEVICE_ENABLE
+
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = LAYOUT_charybdis_4x6(
@@ -102,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤
XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, XXXXXXX,
// ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤
- XXXXXXX, _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, XXXXXXX,
+ XXXXXXX, _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, XXXXXXX,
// ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯
KC_BTN2, KC_BTN1, KC_BTN3, KC_BTN3, KC_BTN1,
XXXXXXX, KC_BTN2, KC_BTN2
@@ -120,33 +127,31 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
# ifdef RGB_MATRIX_ENABLE
rgb_matrix_mode_noeeprom(RGB_MATRIX_NONE);
rgb_matrix_sethsv_noeeprom(HSV_GREEN);
-# endif // RGB_MATRIX_ENABLE
+# endif // RGB_MATRIX_ENABLE
}
auto_pointer_layer_timer = timer_read();
}
return mouse_report;
}
-void matrix_scan_kb(void) {
+void matrix_scan_user(void) {
if (auto_pointer_layer_timer != 0 && TIMER_DIFF_16(timer_read(), auto_pointer_layer_timer) >= CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS) {
auto_pointer_layer_timer = 0;
layer_off(LAYER_POINTER);
# ifdef RGB_MATRIX_ENABLE
rgb_matrix_mode_noeeprom(RGB_MATRIX_STARTUP_MODE);
-# endif // RGB_MATRIX_ENABLE
+# endif // RGB_MATRIX_ENABLE
}
- matrix_scan_user();
}
-# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
+# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE
# ifdef CHARYBDIS_AUTO_SNIPING_ON_LAYER
-layer_state_t layer_state_set_kb(layer_state_t state) {
- state = layer_state_set_user(state);
+layer_state_t layer_state_set_user(layer_state_t state) {
charybdis_set_pointer_sniping_enabled(layer_state_cmp(state, CHARYBDIS_AUTO_SNIPING_ON_LAYER));
return state;
}
-# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER
-#endif // POINTING_DEVICE_ENABLE
+# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER
+#endif // POINTING_DEVICE_ENABLE
#ifdef RGB_MATRIX_ENABLE
// Forward-declare this helper function since it is defined in rgb_matrix.c.
@@ -158,9 +163,9 @@ void shutdown_user(void) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED);
rgb_matrix_update_pwm_buffers();
-#endif // RGB_MATRIX_ENABLE
+#endif // RGB_MATRIX_ENABLE
}