removed handling of old scroll/pointing toggle

This commit is contained in:
Björn Bösel
2022-06-03 23:11:18 +02:00
committed by Kyle Brown
parent f44c1a8c20
commit 5bf33056bf
2 changed files with 37 additions and 32 deletions

View File

@@ -13,26 +13,26 @@ from kmk.modules.pimoroni_trackball import Trackball, TrackballMode
import busio as io
i2c = io.I2C(scl=board.D3, sda=board.D2)
trackball = Trackball(i2c, mode=TrackballMode.MOUSE_MODE)
trackball = Trackball(i2c)
keyboard.modules.append(trackball)
```
Module will also work when you cannot use `busio` and do `import bitbangio as io` instead.
### Key inputs
If you have used this thing on a mobile device, you will know it excels at cursor movement. You can get the same for any of your Layer:
### Key inputs, other handler combinations
If you have used this thing on a mobile device, you will know it excels at cursor movement
```python
from kmk.modules.pimoroni_trackball import Trackball, TrackballMode, PointingHandler, KeyHandler
from kmk.modules.pimoroni_trackball import Trackball, TrackballMode, PointingHandler, KeyHandler, ScrollHandler
trackball = Trackball(i2c, mode=TrackballMode.MOUSE_MODE, handlers=[
# act like an encoder, input arrow keys
KeyHandler(KC.UP, KC.RIGHT, KC.DOWN, KC.LEFT, KC.ENTER),
# on layer 1 and above use the default pointing behavior
PointingHandler()
PointingHandler(),
ScrollHandler()
])
# now you can use these KeyCodes: