only allow first entry on generator

Minizbot2012 3 years ago
parent cc9366160c
commit 0896f3a8de

File diff suppressed because one or more lines are too long

@ -58,11 +58,21 @@ func main() {
Mac: uint16(M), Mac: uint16(M),
Code: string(bar[6]), Code: string(bar[6]),
} }
KeyMaps.Usb[uint16(U)] = Keys if _, ok := KeyMaps.Usb[uint16(U)]; !ok {
KeyMaps.Evdev[uint16(E)] = Keys KeyMaps.Usb[uint16(U)] = Keys
KeyMaps.Xkb[uint16(X)] = Keys }
KeyMaps.Win[uint16(W)] = Keys if _, ok := KeyMaps.Evdev[uint16(E)]; !ok {
KeyMaps.Mac[uint16(M)] = Keys KeyMaps.Evdev[uint16(E)] = Keys
}
if _, ok := KeyMaps.Xkb[uint16(X)]; !ok {
KeyMaps.Xkb[uint16(X)] = Keys
}
if _, ok := KeyMaps.Win[uint16(W)]; !ok {
KeyMaps.Win[uint16(W)] = Keys
}
if _, ok := KeyMaps.Mac[uint16(M)]; !ok {
KeyMaps.Mac[uint16(M)] = Keys
}
KeyMaps.Code[string(bar[6])] = Keys KeyMaps.Code[string(bar[6])] = Keys
Arr = append(Arr, Keys) Arr = append(Arr, Keys)
} }

Loading…
Cancel
Save