Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An auto mouse layer implementation for the ploopy nano 2.

Notifications You must be signed in to change notification settings

DesyncTheThird/auto-mouse-layer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

An initial implementation of trackball auto-layering that does not rely on host-side software. State is communicated via scroll and num locks -- num lock for trackball-to-keyboard, and scroll lock for keyboard-to-trackball.

Usage

  1. Add TB_LOFF, TB_TOGG, and SCROLL to your custom keycodes.
  2. Add a layer _TRACKBALL with your mousekeys on it.
  3. Add a process_trackball call to the housekeeping task function.
  4. Add a process_trackball_keys call to the record processing function.
  • TB_LOFF disables the auto-layer as a fallback if it gets stuck;
  • TB_TOGG disables the use of the locking states as communication;
  • and SCROLL is a drag scroll key, but on the keyboard side.

KB_M is an example of a key that acts as a tap-hold drag scroll key that you can put on your base layer so that you can hold the scroll key before moving the trackball and the auto-layer activates.

Caveats

The Scroll Lock and Num Lock keys don't set the locking states while control is held since these combinations are interpreted as Pause and Break. This is bypassable on the keyboard side by temporarily releasing control while toggling the lock states, but if you hold control on the keyboard first, there is no way to release it on the trackball side.

However, the caps lock state is unaffected by control, so we can replace the send signal with caps lock. Since we aren't typing while using the trackball, this should be safe, but this will mean that any other caps lock usage in your keyboard keymap will have to add additional logic to disable the auto-layering while caps lock is being used for its normal purpose.

See my corne keymap for an example of this. I've since moved to a raw HID setup since I don't move my trackball around, so I don't need it to be portable, and so that I can implement more control signals, like a volume control mode.

Also, if anyone wants to implement a hilarious time-division multiplexing scheme to encode all the signals into a single lock key, please let me know.

About

An auto mouse layer implementation for the ploopy nano 2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages