diff --git a/genkeys.go b/genkeys.go index 5c9bd81d8..7f6caf1eb 100644 --- a/genkeys.go +++ b/genkeys.go @@ -462,7 +462,7 @@ func init() { } } -const ebitenKeysTmpl = `{{.License}} +const ebitengineKeysTmpl = `{{.License}} {{.DoNotEdit}} @@ -767,27 +767,27 @@ func main() { // Follow the standard comment rule (https://golang.org/s/generatedcode). doNotEdit := "// Code generated by genkeys.go using 'go generate'. DO NOT EDIT." - ebitenKeyNames := []string{} - ebitenKeyNamesWithoutOld := []string{} - ebitenKeyNamesWithoutMods := []string{} + ebitengineKeyNames := []string{} + ebitengineKeyNamesWithoutOld := []string{} + ebitengineKeyNamesWithoutMods := []string{} uiKeyNames := []string{} for name := range uiKeyNameToJSKey { uiKeyNames = append(uiKeyNames, name) - ebitenKeyNames = append(ebitenKeyNames, name) - ebitenKeyNamesWithoutOld = append(ebitenKeyNamesWithoutOld, name) - ebitenKeyNamesWithoutMods = append(ebitenKeyNamesWithoutMods, name) + ebitengineKeyNames = append(ebitengineKeyNames, name) + ebitengineKeyNamesWithoutOld = append(ebitengineKeyNamesWithoutOld, name) + ebitengineKeyNamesWithoutMods = append(ebitengineKeyNamesWithoutMods, name) } for old := range oldEbitengineKeyNameToUIKeyName { - ebitenKeyNames = append(ebitenKeyNames, old) + ebitengineKeyNames = append(ebitengineKeyNames, old) } // Keys for modifiers - ebitenKeyNames = append(ebitenKeyNames, "Alt", "Control", "Shift", "Meta") - ebitenKeyNamesWithoutOld = append(ebitenKeyNamesWithoutOld, "Alt", "Control", "Shift", "Meta") + ebitengineKeyNames = append(ebitengineKeyNames, "Alt", "Control", "Shift", "Meta") + ebitengineKeyNamesWithoutOld = append(ebitengineKeyNamesWithoutOld, "Alt", "Control", "Shift", "Meta") - sort.Slice(ebitenKeyNames, keyNamesLess(ebitenKeyNames)) - sort.Slice(ebitenKeyNamesWithoutOld, keyNamesLess(ebitenKeyNamesWithoutOld)) - sort.Slice(ebitenKeyNamesWithoutMods, keyNamesLess(ebitenKeyNamesWithoutMods)) + sort.Slice(ebitengineKeyNames, keyNamesLess(ebitengineKeyNames)) + sort.Slice(ebitengineKeyNamesWithoutOld, keyNamesLess(ebitengineKeyNamesWithoutOld)) + sort.Slice(ebitengineKeyNamesWithoutMods, keyNamesLess(ebitengineKeyNamesWithoutMods)) sort.Slice(uiKeyNames, keyNamesLess(uiKeyNames)) // TODO: Add this line for event package (#926). @@ -800,7 +800,7 @@ func main() { filepath.Join("internal", "ui", "keys_glfw.go"): uiGLFWKeysTmpl, filepath.Join("internal", "ui", "keys_mobile.go"): uiMobileKeysTmpl, filepath.Join("internal", "ui", "keys_js.go"): uiJSKeysTmpl, - filepath.Join("keys.go"): ebitenKeysTmpl, + filepath.Join("keys.go"): ebitengineKeysTmpl, filepath.Join("mobile", "ebitenmobileview", "keys_android.go"): mobileAndroidKeysTmpl, } { f, err := os.Create(path) @@ -854,9 +854,9 @@ func main() { BuildTag: buildTag, UIKeyNameToJSKey: uiKeyNameToJSKey, EdgeKeyCodeToName: edgeKeyCodeToName, - EbitengineKeyNames: ebitenKeyNames, - EbitengineKeyNamesWithoutOld: ebitenKeyNamesWithoutOld, - EbitengineKeyNamesWithoutMods: ebitenKeyNamesWithoutMods, + EbitengineKeyNames: ebitengineKeyNames, + EbitengineKeyNamesWithoutOld: ebitengineKeyNamesWithoutOld, + EbitengineKeyNamesWithoutMods: ebitengineKeyNamesWithoutMods, GLFWKeyNameToGLFWKey: glfwKeyNameToGLFWKey, UIKeyNames: uiKeyNames, UIKeyNameToGLFWKeyName: uiKeyNameToGLFWKeyName,