Skip to content

Commit eeecbe6

Browse files
committed
Update ./targets/sgkey2
1 parent 5841a86 commit eeecbe6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

targets/sgkey2/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
keyboard "github.com/sago35/tinygo-keyboard"
1212
"github.com/sago35/tinygo-keyboard/ble"
1313
"github.com/sago35/tinygo-keyboard/keycodes/jp"
14+
"tinygo.org/x/bluetooth"
1415
)
1516

1617
func main() {
@@ -57,6 +58,20 @@ func run() error {
5758
fmt.Printf("mk: %d %d %d %d\n", layer, row, col, state)
5859
})
5960

61+
d.AddBleSplitKeyboard(0x12, bluetooth.DefaultAdapter, "xiao-kb01-0.1.0", [][]keyboard.Keycode{
62+
{
63+
jp.KeyA, jp.KeyB, jp.KeyC, jp.KeyD,
64+
jp.KeyE, jp.KeyF, jp.KeyG, jp.KeyH,
65+
jp.KeyI, jp.KeyJ, jp.KeyK, jp.KeyL,
66+
67+
jp.KeyMediaVolumeDec, jp.KeyMediaVolumeInc,
68+
69+
jp.WheelDown, jp.WheelUp,
70+
71+
jp.MouseLeft, jp.MouseRight,
72+
},
73+
})
74+
6075
bk := ble.NewKeyboard(usb.Product)
6176
err := bk.Connect()
6277
if err != nil {

0 commit comments

Comments
 (0)