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

Feature request: Auto Mouse Keys layer #1081

Open
wolfwood opened this issue May 27, 2024 · 2 comments · May be fixed by #1080
Open

Feature request: Auto Mouse Keys layer #1081

wolfwood opened this issue May 27, 2024 · 2 comments · May be fixed by #1080
Labels
enhancement New feature or request PRs welcome jtroo has no plans to work on this at present, but PRs are welcome

Comments

@wolfwood
Copy link
Contributor

wolfwood commented May 27, 2024

Is your feature request related to a problem? Please describe.

when I move the mouse cursor using my left hand on the trackpoint, I would like mouse buttons to appear under my right hand fingers on my laptop keyboard. after a timeout, I would like the keys to revert. the generalization of this is automousekeys layer switching.

previously, I've been using mannaharbour's automousekeys implementation with QMK-powered external keyboards.

Describe the solution you'd like.

My initial thought for an implementation was a defcfg feature flag that takes a layer name and a timeout. a very nice-to-have would be to also accept a list of layers upon which the automousekeys switching can activate. I might like to only have it on my base layer, but not on my navigation layer, for example.

however, I wasn't sure how to force layer switches, and especially how to return from one, with keyberon.

Describe alternatives you've considered.

I implemented a Proof of Concept in #1080. This takes an easier approach of injecting key press and release events for an unused key which the user is expected to map to a layer hold. For example:

(defsrc
  k l ;
  F24
)

(deflayer qwerty
  k l ;
  layer-while-held mouse
)

(deflayer mouse
  mlft mmid mrgt
  XX
)

The addition of a key that doesn't exist on the keyboard seems clunky, but it does provide a nice way to manage the per-layer configuration of the feature. I'm half convinced this is an OK way to handle it, but I think the initial solution is cleaner overall.

Additional context

I feel the layer switching needs to be a bit smarter to be fully useful.

In the QMK version I update the timestamp when mouse key events occur, as well. for this version I might like to ignore real mouse keys (if I'm using the physical buttons I don't need the layer switch) but update the timestamp when non-transparent key events occur on the mouse layer. not sure how to get that info.

For switching the mouse layer off, I would really like this to occur any time I press a transparent key on the layer, and I want to trigger the underlying key mapping as well. I think any press of an unmapped key would also ideally switch the mouse layer off as this is also a sign the user has resumed typing.

finally, since I also use homerow mods, I would like to try having hold behaviors on the mouse layer trigger a layer release as well.

@wolfwood wolfwood added the enhancement New feature or request label May 27, 2024
@jtroo
Copy link
Owner

jtroo commented May 27, 2024

Sounds like you might be able to achieve this today with some combination of:

@oblitzitate
Copy link

Is there a way to detect if a finger or fingers are on the touchpad (even when not moving)? If so, that would be great in addition to this functionality.

@jtroo jtroo linked a pull request Sep 15, 2024 that will close this issue
4 tasks
@jtroo jtroo added the PRs welcome jtroo has no plans to work on this at present, but PRs are welcome label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PRs welcome jtroo has no plans to work on this at present, but PRs are welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants