Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions kbduplexmatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,21 @@ func (d *Device) AddDuplexMatrixKeyboard(colPins, rowPins []machine.Pin, keys []
rowPins[r].Configure(machine.PinConfig{Mode: machine.PinInputPullup})
}

keydef := make([][]Keycode, LayerCount)
for l := 0; l < len(keydef); l++ {
keydef[l] = make([]Keycode, len(state))
}
for l := 0; l < len(keys); l++ {
for kc := 0; kc < len(keys[l]); kc++ {
keydef[l][kc] = keys[l][kc]
}
}

k := &DuplexMatrixKeyboard{
Col: colPins,
Row: rowPins,
State: state,
Keys: keys,
Keys: keydef,
callback: func(layer, index int, state State) {},
}

Expand Down Expand Up @@ -129,7 +139,7 @@ func (d *DuplexMatrixKeyboard) Get() []State {
}

func (d *DuplexMatrixKeyboard) Key(layer, index int) Keycode {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return 0
}
if index >= len(d.Keys[layer]) {
Expand All @@ -139,7 +149,7 @@ func (d *DuplexMatrixKeyboard) Key(layer, index int) Keycode {
}

func (d *DuplexMatrixKeyboard) SetKeycode(layer, index int, key Keycode) {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return
}
if index >= len(d.Keys[layer]) {
Expand All @@ -148,6 +158,10 @@ func (d *DuplexMatrixKeyboard) SetKeycode(layer, index int, key Keycode) {
d.Keys[layer][index] = key
}

func (d *DuplexMatrixKeyboard) GetKeyCount() int {
return len(d.State)
}

func (d *DuplexMatrixKeyboard) Init() error {
return nil
}
20 changes: 17 additions & 3 deletions kbgpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ func (d *Device) AddGpioKeyboard(pins []machine.Pin, keys [][]Keycode, opt ...Op
f(&o)
}

keydef := make([][]Keycode, LayerCount)
for l := 0; l < len(keydef); l++ {
keydef[l] = make([]Keycode, len(state))
}
for l := 0; l < len(keys); l++ {
for kc := 0; kc < len(keys[l]); kc++ {
keydef[l][kc] = keys[l][kc]
}
}

k := &GpioKeyboard{
Col: pins,
State: state,
Keys: keys,
Keys: keydef,
options: o,
callback: func(layer, index int, state State) {},
}
Expand Down Expand Up @@ -85,7 +95,7 @@ func (d *GpioKeyboard) Get() []State {
}

func (d *GpioKeyboard) Key(layer, index int) Keycode {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return 0
}
if index >= len(d.Keys[layer]) {
Expand All @@ -95,7 +105,7 @@ func (d *GpioKeyboard) Key(layer, index int) Keycode {
}

func (d *GpioKeyboard) SetKeycode(layer, index int, key Keycode) {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return
}
if index >= len(d.Keys[layer]) {
Expand All @@ -104,6 +114,10 @@ func (d *GpioKeyboard) SetKeycode(layer, index int, key Keycode) {
d.Keys[layer][index] = key
}

func (d *GpioKeyboard) GetKeyCount() int {
return len(d.State)
}

func (d *GpioKeyboard) Init() error {
return nil
}
20 changes: 17 additions & 3 deletions kbmatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,21 @@ func (d *Device) AddMatrixKeyboard(colPins, rowPins []machine.Pin, keys [][]Keyc
f(&o)
}

keydef := make([][]Keycode, LayerCount)
for l := 0; l < len(keydef); l++ {
keydef[l] = make([]Keycode, len(state))
}
for l := 0; l < len(keys); l++ {
for kc := 0; kc < len(keys[l]); kc++ {
keydef[l][kc] = keys[l][kc]
}
}

k := &MatrixKeyboard{
Col: colPins,
Row: rowPins,
State: state,
Keys: keys,
Keys: keydef,
options: o,
callback: func(layer, index int, state State) {},
}
Expand Down Expand Up @@ -108,7 +118,7 @@ func (d *MatrixKeyboard) Get() []State {
}

func (d *MatrixKeyboard) Key(layer, index int) Keycode {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return 0
}
if index >= len(d.Keys[layer]) {
Expand All @@ -118,7 +128,7 @@ func (d *MatrixKeyboard) Key(layer, index int) Keycode {
}

func (d *MatrixKeyboard) SetKeycode(layer, index int, key Keycode) {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return
}
if index >= len(d.Keys[layer]) {
Expand All @@ -127,6 +137,10 @@ func (d *MatrixKeyboard) SetKeycode(layer, index int, key Keycode) {
d.Keys[layer][index] = key
}

func (d *MatrixKeyboard) GetKeyCount() int {
return len(d.State)
}

func (d *MatrixKeyboard) Init() error {
return nil
}
20 changes: 17 additions & 3 deletions kbrotary.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,19 @@ func (d *Device) AddRotaryKeyboard(rotA, rotB machine.Pin, keys [][]Keycode) *Ro
enc := rotary_encoder.New(rotA, rotB)
enc.Configure()

keydef := make([][]Keycode, LayerCount)
for l := 0; l < len(keydef); l++ {
keydef[l] = make([]Keycode, len(state))
}
for l := 0; l < len(keys); l++ {
for kc := 0; kc < len(keys[l]); kc++ {
keydef[l][kc] = keys[l][kc]
}
}

k := &RotaryKeyboard{
State: state,
Keys: keys,
Keys: keydef,
callback: func(layer, index int, state State) {},

enc: enc,
Expand Down Expand Up @@ -86,7 +96,7 @@ func (d *RotaryKeyboard) Get() []State {
}

func (d *RotaryKeyboard) Key(layer, index int) Keycode {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return 0
}
if index >= len(d.Keys[layer]) {
Expand All @@ -96,7 +106,7 @@ func (d *RotaryKeyboard) Key(layer, index int) Keycode {
}

func (d *RotaryKeyboard) SetKeycode(layer, index int, key Keycode) {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return
}
if index >= len(d.Keys[layer]) {
Expand All @@ -105,6 +115,10 @@ func (d *RotaryKeyboard) SetKeycode(layer, index int, key Keycode) {
d.Keys[layer][index] = key
}

func (d *RotaryKeyboard) GetKeyCount() int {
return len(d.State)
}

func (d *RotaryKeyboard) Init() error {
return nil
}
20 changes: 17 additions & 3 deletions kbsquaredmatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@ func (d *Device) AddSquaredMatrixKeyboard(pins []machine.Pin, keys [][]Keycode)
pins[i].Configure(machine.PinConfig{Mode: machine.PinInputPullup})
}

keydef := make([][]Keycode, LayerCount)
for l := 0; l < len(keydef); l++ {
keydef[l] = make([]Keycode, len(state))
}
for l := 0; l < len(keys); l++ {
for kc := 0; kc < len(keys[l]); kc++ {
keydef[l][kc] = keys[l][kc]
}
}

k := &SquaredMatrixKeyboard{
Pins: pins,
State: state,
Keys: keys,
Keys: keydef,
callback: func(layer, index int, state State) {},
}

Expand Down Expand Up @@ -93,7 +103,7 @@ func (d *SquaredMatrixKeyboard) Get() []State {
}

func (d *SquaredMatrixKeyboard) Key(layer, index int) Keycode {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return 0
}
if index >= len(d.Keys[layer]) {
Expand All @@ -103,7 +113,7 @@ func (d *SquaredMatrixKeyboard) Key(layer, index int) Keycode {
}

func (d *SquaredMatrixKeyboard) SetKeycode(layer, index int, key Keycode) {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return
}
if index >= len(d.Keys[layer]) {
Expand All @@ -112,6 +122,10 @@ func (d *SquaredMatrixKeyboard) SetKeycode(layer, index int, key Keycode) {
d.Keys[layer][index] = key
}

func (d *SquaredMatrixKeyboard) GetKeyCount() int {
return len(d.State)
}

func (d *SquaredMatrixKeyboard) Init() error {
return nil
}
20 changes: 17 additions & 3 deletions kbuart.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,19 @@ type UartKeyboard struct {
func (d *Device) AddUartKeyboard(size int, uart *machine.UART, keys [][]Keycode) *UartKeyboard {
state := make([]State, size)

keydef := make([][]Keycode, LayerCount)
for l := 0; l < len(keydef); l++ {
keydef[l] = make([]Keycode, len(state))
}
for l := 0; l < len(keys); l++ {
for kc := 0; kc < len(keys[l]); kc++ {
keydef[l][kc] = keys[l][kc]
}
}

k := &UartKeyboard{
State: state,
Keys: keys,
Keys: keydef,
callback: func(layer, index int, state State) {},
uart: uart,
buf: make([]byte, 0, 3),
Expand Down Expand Up @@ -99,7 +109,7 @@ func (d *UartKeyboard) Get() []State {
}

func (d *UartKeyboard) Key(layer, index int) Keycode {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return 0
}
if index >= len(d.Keys[layer]) {
Expand All @@ -109,7 +119,7 @@ func (d *UartKeyboard) Key(layer, index int) Keycode {
}

func (d *UartKeyboard) SetKeycode(layer, index int, key Keycode) {
if layer >= len(d.Keys) {
if layer >= LayerCount {
return
}
if index >= len(d.Keys[layer]) {
Expand All @@ -118,6 +128,10 @@ func (d *UartKeyboard) SetKeycode(layer, index int, key Keycode) {
d.Keys[layer][index] = key
}

func (d *UartKeyboard) GetKeyCount() int {
return len(d.State)
}

func (d *UartKeyboard) Init() error {
for d.uart.Buffered() > 0 {
d.uart.ReadByte()
Expand Down
14 changes: 13 additions & 1 deletion keyboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type KBer interface {
Get() []State
Key(layer, index int) Keycode
SetKeycode(layer, index int, key Keycode)
GetKeyCount() int
Init() error
}

Expand Down Expand Up @@ -86,7 +87,7 @@ func (d *Device) Init() error {
// TODO: Allow change to match keyboard
layers := LayerCount
keyboards := len(d.kb)
keys := MaxKeyCount
keys := d.GetMaxKeyCount()

// TODO: refactor
rbuf := make([]byte, 4+layers*keyboards*keys*2)
Expand Down Expand Up @@ -115,6 +116,17 @@ func (d *Device) Init() error {
return nil
}

func (d *Device) GetMaxKeyCount() int {
cnt := 0
for _, k := range d.kb {
if cnt < k.GetKeyCount() {
cnt = k.GetKeyCount()
}
}

return cnt
}

func (d *Device) Tick() error {
pressToRelease := []Keycode{}

Expand Down
2 changes: 1 addition & 1 deletion targets/fric10key/def.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import keyboard "github.com/sago35/tinygo-keyboard"

func loadKeyboardDef() {
keyboard.KeyboardDef = []byte{
0x5D, 0x00, 0x00, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,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, 0xC4, 0x15, 0xB5, 0xDA, 0xBD, 0x51, 0xD3, 0xD3, 0x83, 0xD5, 0x07, 0x9D, 0xD4, 0x34, 0xCE, 0xFC, 0x2B, 0xF2, 0x0C, 0xEB, 0x2B, 0xC1, 0x74, 0x82, 0x16, 0x0B, 0xB9, 0xC8, 0x8F, 0xE0, 0xE7, 0x59, 0xF8, 0xF5, 0xDE, 0xA1, 0xF1, 0xEA, 0x73, 0x6E, 0x08, 0x07, 0x50, 0x53, 0xEC, 0x4A, 0xAF, 0x75, 0xB6, 0xAC, 0xBD, 0x7B, 0xEA, 0xAE, 0xA8, 0x2C, 0x3A, 0x65, 0xB3, 0x2E, 0xEB, 0x9C, 0x46, 0x62, 0xB5, 0xB5, 0x46, 0x11, 0x84, 0x21, 0x25, 0x4A, 0x79, 0x51, 0xF0, 0xED, 0xCA, 0x38, 0xFD, 0x09, 0xF1, 0x25, 0x4D, 0x53, 0x00, 0x60, 0xEE, 0xB5, 0x1A, 0x95, 0x54, 0x27, 0xE0, 0x75, 0xBC, 0xFE, 0x76, 0x55, 0xC0,
}
}
2 changes: 1 addition & 1 deletion targets/fric10key/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tinygo-fric10key",
"vendorId": "0x2e8a",
"productId": "0x000a",
"matrix": {"rows": 1, "cols": 252},
"matrix": {"rows": 1, "cols": 28},
"layouts": {
"keymap": [
["0,0","0,1","0,2","0,3"],
Expand Down
2 changes: 1 addition & 1 deletion targets/gopher-badge/def.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import keyboard "github.com/sago35/tinygo-keyboard"

func loadKeyboardDef() {
keyboard.KeyboardDef = []byte{
0x5D, 0x00, 0x00, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x3D, 0x82, 0x80, 0x19, 0x1B, 0x9A, 0xE8, 0xB8, 0xA7, 0x6E, 0x26, 0x77, 0x5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, 0x26, 0x77, 0x5D, 0x26, 0xFB, 0x93, 0xC2, 0xE2, 0xE7, 0x46, 0x70, 0xF9, 0x60, 0x5C, 0x07, 0xC2, 0xA9, 0x58, 0xA5, 0x66, 0xC7, 0x7D, 0x60, 0x57, 0x18, 0x78, 0x77, 0xC3, 0xE1, 0x5B, 0xA0, 0xF4, 0xCE, 0x79, 0x11, 0xAD, 0x43, 0xE7, 0x77, 0xD8, 0xB9, 0x75, 0x65, 0x86, 0x7E, 0x47, 0x81, 0x17, 0x2B, 0xFF, 0xC4, 0x29, 0x05, 0x53, 0x3B, 0xC6, 0xD0, 0xA7, 0x9B, 0x33, 0x92, 0x6B, 0x73, 0xFF, 0x25, 0xA5, 0xDA, 0xAE, 0xD0, 0xC9, 0xD4, 0xC7, 0xF6, 0x41, 0x8A, 0x4D, 0xF7, 0x2E, 0x3C, 0x2C, 0x68, 0x62, 0x83, 0x4D, 0xD1, 0x86, 0x10, 0xAD, 0x39, 0x08, 0x4C, 0x9E, 0x55, 0x5F, 0xCB, 0x7F, 0x3D, 0x1B, 0x69, 0xEA, 0x47, 0xAD, 0x50, 0x7B, 0xD4, 0xE4, 0x7B, 0x36, 0xBE, 0x6E, 0x16, 0xF1, 0xF9, 0x8E, 0x7A, 0xDF, 0xC5, 0x6A, 0x27, 0xC9, 0x27, 0x13, 0x70, 0x96, 0x56, 0x57, 0xC6, 0x0E, 0x22, 0xE7, 0x7B, 0x14, 0x35, 0x31, 0x8F, 0x02, 0xAA, 0xBF, 0x66, 0xEC, 0x2B, 0x30, 0x62, 0x01, 0x11, 0xCA, 0xEF, 0xE0, 0xDB, 0x2B, 0x67, 0xAF, 0x83, 0xFA, 0x53, 0xC8, 0xFF, 0xF8, 0x7E, 0xFD, 0xA0,
}
}
2 changes: 1 addition & 1 deletion targets/gopher-badge/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tinygo-gopher-badge",
"vendorId": "0x2E8A",
"productId": "0x0003",
"matrix": {"rows": 1, "cols": 252},
"matrix": {"rows": 1, "cols": 6},
"layouts": {
"keymap": [
[{"x":1}, "0,3"],
Expand Down
2 changes: 1 addition & 1 deletion targets/macropad-rp2040/def.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import keyboard "github.com/sago35/tinygo-keyboard"

func loadKeyboardDef() {
keyboard.KeyboardDef = []byte{
0x5D, 0x00, 0x00, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x3D, 0x82, 0x80, 0x19, 0x1B, 0x9A, 0xE8, 0xB8, 0xA7, 0x6E, 0x26, 0x77, 0x5D, 0x26, 0xFB, 0x93, 0xC2, 0xE2, 0xE7, 0x46, 0x70, 0xE8, 0xFA, 0x0C, 0x64, 0x93, 0x9C, 0xC2, 0xDD, 0x9E, 0xCC, 0x8A, 0x2C, 0xCE, 0x38, 0xD5, 0xF7, 0x4C, 0x50, 0xF7, 0xA5, 0x0A, 0x17, 0xAF, 0x81, 0x7A, 0xC6, 0x9C, 0x17, 0x1C, 0xEF, 0x6B, 0x37, 0xDE, 0x3D, 0xEC, 0x13, 0x36, 0xE5, 0x37, 0x05, 0x1D, 0x6C, 0xEF, 0x52, 0xED, 0x27, 0xD4, 0xA3, 0x3E, 0x71, 0x36, 0x32, 0x6F, 0x10, 0x61, 0x34, 0x94, 0x6B, 0x39, 0x16, 0xCA, 0x0B, 0x3D, 0xE2, 0x70, 0x5A, 0x08, 0xBA, 0x0C, 0x0D, 0x6A, 0x80, 0xA7, 0xF0, 0x21, 0xC8, 0xEC, 0xC5, 0xFD, 0x32, 0x99, 0x4F, 0x1D, 0x74, 0x52, 0x92, 0x22, 0x23, 0x1A, 0xA4, 0x95, 0xF7, 0x5A, 0xCC, 0x8B, 0x4B, 0xD7, 0x00, 0x22, 0xE7, 0x0C, 0x3F, 0x34, 0x4D, 0xA6, 0xD4, 0x00, 0x92, 0x7F, 0x1E, 0x53, 0x47, 0x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 0x6E, 0x10, 0x07, 0xF1, 0x0D, 0x06, 0x04, 0x42, 0x83, 0x32, 0xBC, 0x73, 0xC0, 0xD4, 0xD7, 0xCF, 0x76, 0x10, 0x2D, 0xEF, 0xBD, 0x12, 0x47, 0x4B, 0x8F, 0x6F, 0x8A, 0xB1, 0x14, 0x99, 0x73, 0x3A, 0x2C, 0x0E, 0x07, 0xC1, 0x96, 0x63, 0x25, 0x57, 0x97, 0x1E, 0xDF, 0x82, 0x29, 0x2F, 0x78, 0xFF, 0xA9, 0x17, 0x28, 0xE9, 0x08, 0x3F, 0x8E, 0x4B, 0xA0, 0xB4, 0x97, 0x48, 0x6F, 0x1A, 0x2D, 0x93, 0x62, 0x15, 0x0E, 0x5A, 0xD6, 0x4E, 0xFD, 0x79, 0xDC, 0xAC, 0x1F, 0x53, 0x11, 0xE3, 0x62, 0x37, 0xD4, 0x4B, 0x9F, 0xAB, 0x12, 0x40, 0x98, 0x0C, 0xFE, 0xA0, 0xE8, 0xCB,
}
}
2 changes: 1 addition & 1 deletion targets/macropad-rp2040/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tinygo-macropad-rp2040",
"vendorId": "0x239A",
"productId": "0x8107",
"matrix": {"rows": 2, "cols": 252},
"matrix": {"rows": 2, "cols": 12},
"layouts": {
"keymap": [
[{"x":2, "w":0.5}, "1,0", {"w":0.5}, "1,1"],
Expand Down
Loading