[Keymap] Drashna updates for 0.20.0 (#19960)

This commit is contained in:
Drashna Jaelre
2023-02-28 11:14:48 -08:00
committed by GitHub
parent 05631b276d
commit 051401175d
34 changed files with 459 additions and 346 deletions

View File

@@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "pointing.h"
#include "math.h"
static uint16_t mouse_debounce_timer = 0;
bool enable_acceleration = false;
@@ -38,8 +39,10 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
oled_timer_reset();
#endif
if (enable_acceleration) {
x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
x = (mouse_xy_report_t)(x > 0 ? pow(4, x) / 2 + x : -pow(4, abs(x)) / 2 + x);
y = (mouse_xy_report_t)(y > 0 ? pow(5, y) / 2 + y : -pow(5, abs(y)) / 2 + y);
// x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
// y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
}
mouse_report.x = x;
mouse_report.y = y;
@@ -81,9 +84,7 @@ bool is_mouse_record_user(uint16_t keycode, keyrecord_t* record) {
switch (keycode) {
# if defined(KEYBOARD_ploopy)
case DPI_CONFIG:
# elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES)
case QK_KB ... QK_KB_MAX:
# elif (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES))
# elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES) || (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES))
case QK_KB ... QK_KB_MAX:
# endif
case KC_ACCEL:

View File

@@ -0,0 +1,6 @@
// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define POINTING_DEVICE_MODES_ENABLE