diff --git a/genkeys.go b/genkeys.go index 67e6f3dc6..5b5330664 100644 --- a/genkeys.go +++ b/genkeys.go @@ -651,7 +651,7 @@ var androidKeyToDriverKey = map[int]driver.Key{ } ` -const mobileGBuildKeysTmpl = `{{.License}} +const uidriverMobileKeysTmpl = `{{.License}} {{.DoNotEdit}} @@ -791,7 +791,7 @@ func main() { filepath.Join("internal", "driver", "keys.go"): driverKeysTmpl, filepath.Join("internal", "glfw", "keys.go"): glfwKeysTmpl, filepath.Join("internal", "uidriver", "glfw", "keys.go"): uidriverGlfwKeysTmpl, - filepath.Join("internal", "uidriver", "mobile", "keys.go"): mobileGBuildKeysTmpl, + filepath.Join("internal", "uidriver", "mobile", "keys.go"): uidriverMobileKeysTmpl, filepath.Join("internal", "uidriver", "js", "keys_js.go"): uidriverJsKeysTmpl, filepath.Join("keys.go"): ebitenKeysTmpl, filepath.Join("mobile", "ebitenmobileview", "keys_android.go"): mobileAndroidKeysTmpl, @@ -817,6 +817,9 @@ func main() { case filepath.Join("internal", "glfw", "keys.go"): buildTag = "//go:build !js" + "\n// +build !js" + case filepath.Join("internal", "uidriver", "mobile", "keys.go"): + buildTag = "//go:build android || ios" + + "\n// +build android ios" case filepath.Join("internal", "uidriver", "glfw", "keys.go"): buildTag = "//go:build !android && !js && !ios" + "\n// +build !android,!js,!ios" diff --git a/internal/uidriver/mobile/keys.go b/internal/uidriver/mobile/keys.go index 43b797d27..b26e32b4e 100644 --- a/internal/uidriver/mobile/keys.go +++ b/internal/uidriver/mobile/keys.go @@ -14,6 +14,9 @@ // Code generated by genkeys.go using 'go generate'. DO NOT EDIT. +//go:build android || ios +// +build android ios + package mobile import ( diff --git a/keys.go b/keys.go index 5d5e5e952..aca29bc0f 100644 --- a/keys.go +++ b/keys.go @@ -23,7 +23,7 @@ import ( ) // A Key represents a keyboard key. -// These keys represent pysical keys of US keyboard layout. +// These keys represent pysical keys of US keyboard. // For example, KeyQ represents Q key on US keyboards and ' (quote) key on Dvorak keyboards. type Key int