Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable mousekey accel #5043

Closed
wants to merge 7 commits into from

Conversation

zk-phi
Copy link
Contributor

@zk-phi zk-phi commented Feb 3, 2019

Description

This PR makes it possible to customize KC_ACL* behavior with #define s.

I have considered to add some keycodes like KC_ACL3, KC_ACL4, ... to add options, but adding #defines seems to be more flexible and backward-compatible.

Types of changes

  • Core
  • Bugfix
  • New Feature
  • Enhancement/Optimization
  • Keyboard (addition or update)
  • Keymap/Layout/Userspace (addition or update)
  • Documentation

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document. (https://docs.qmk.fm/#/contributing)
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

I have tried make all, but it failed with the following error:

Making 40percentclub/4x4 with keymap buswerks                                                          [ERRORS]
In file included from layouts/community/ortho_4x12/buswerks/keymap.c:1:0:
layouts/community/ortho_4x12/buswerks/keymap.c:81:13: error: 'xxxxxxx' undeclared here (not in a function)
             xxxxxxx, KC_LCTL, KC_LGUI, KC_LALT, LOWER  , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP  , KC_RGHT \
             ^
keyboards/40percentclub/4x4/4x4.h:44:7: note: in definition of macro 'LAYOUT_ortho_4x12'
     { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, ___, ___, ___, ___} \
       ^~~
layouts/community/ortho_4x12/buswerks/keymap.c:84:17: error: implicit declaration of function 'LAYOUT_planck_grid' [-Werror=implicit-function-declaration]
     [_ADJUST] = LAYOUT_planck_grid(
                 ^~~~~~~~~~~~~~~~~~

This also happens without my changes, so I could not verify that my changes actually pass the make all test.

* Add macros MOUSEKEY_ACCEL*_SPEED which defines how mousekey is accelerated with KC_ACL* keycodes
* Add documentation for MOUSEKEY_ACCEL*_SPEED to the feature_mouse_keys section
docs/feature_mouse_keys.md Outdated Show resolved Hide resolved
tmk_core/common/mousekey.c Outdated Show resolved Hide resolved
@zk-phi
Copy link
Contributor Author

zk-phi commented Feb 5, 2019

Thank you, it seems much more straightforward.
I've forgotten to make wheel scroll also respect the new macros, so I fixed it too.

@ezuk
Copy link
Contributor

ezuk commented Feb 5, 2019

this is exciting! Definitely wanna see this one merged up.

@skullydazed
Copy link
Member

Looks like there's a couple conflicts here now. As soon as you get those cleaned up we can merge this.

Thanks for your contribution!

@zk-phi
Copy link
Contributor Author

zk-phi commented May 14, 2019

It seems that the MK_3_SPEED PR, merged before this PR, implements a part of feature which I've wanted to achieve with this PR:

feature customizable KC_ACL_* behavior customizable delta / interval supports acceleration
MK_3_SPEED yes * yes no
this PR yes * no yes

So I'm thinking of making another PR, which adds acceleration support to the MK_3_SPEED instead (of going separate ways).

@drashna
Copy link
Member

drashna commented Jul 30, 2019

This has some merge conflicts now.

@zk-phi
Copy link
Contributor Author

zk-phi commented Jul 30, 2019

The PR #2246, which this PR conflicts with, implements a similar feature in a different way. While both two PRs have pros. and cons. to each other, I have decided to merge them up to benefit from both these two features at the same time (instead of going separate ways further).

Then I have posted another PR #6062, which covers both two ways to configure mousekey acceleration. Therefore, this PR (#5043) may be closed without merging, once it's convinced that the PR #6062 is better way to go.

I'm sorry for posting confusing PRs.

@stale
Copy link

stale bot commented Nov 20, 2019

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.

@stale
Copy link

stale bot commented Dec 20, 2019

Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.

@stale stale bot closed this Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants