Summary
This is my main mousing setup. The main idea is that base layer 7890 keys are bound to mouse buttons, so the trackball module + 7890 keys act as a full-value thumb trackball.
features:
button | action | bound action |
---|---|---|
7 | tap / hold | left button |
8 | tap | middle button tap |
hold + 7 | rocking gesture: switches browser tab to left | |
hold + mousing | scrolling | |
hold + 9 | rocking gesture: switches browser tab to right | |
hold + 0 | close tab | |
… | ploopy (external qmk-powered trackball) interoperability via numLock. | |
9 | tap / hold | right button |
0 | tap | new tab |
7+9, 9+7 | actual middle button hold |
Details of the setup:
Base layer:
Mouse layer:
Macros:
// $onInit
setVar middleBtnTimeout 50
// QtMouseLeftR
ifShortcut timeoutIn $middleBtnTimeout 9 final holdKey mouseBtnMiddle
holdKey mouseBtnLeft
// QtMouseMiddle
ifNotNumLockOn tapKey numLock
holdLayer mouse
tapKey numLock
ifNotPlaytime 300 tapKey mouseBtnMiddle
// QtMouseRightR
ifShortcut timeoutIn $middleBtnTimeout 7 final holdKey mouseBtnMiddle
holdKey mouseBtnRight
// QtTabNew
tapKey LC-t
// QtTabClose
tapKey LC-w
Sidenotes
Ploopy / NumLock
My Ploopy trackball is programmed so that if num lock is on, it scrolls, otherwise it moves cursor. Furthermore, the middle button macro taps numLock on press and then again on release, so both UHK and the Ploopy trackball scroll when 8 is held, and control cursor otherwise.
Numbers
Clearly, this setup strips me of the ability to use numbers the normal way. But that is okay, my numbers are bound in homerow on fn layer (activated by right space):
-R / -L suffix
I have my ploopy on the right side of my UHK. For this reason, I also have similar macros (with -L instead of -R suffix) bound on 1234 keys.