only allow first entry on generator

main
Minizbot2012 3 years ago
parent a9661fdeee
commit 695cfe50f2
No known key found for this signature in database
GPG Key ID: 977C8ADE12361917

File diff suppressed because one or more lines are too long

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

Loading…
Cancel
Save