diff --git a/v2/internal/frontend/desktop/linux/keys.go b/v2/internal/frontend/desktop/linux/keys.go index 36486ea7b..1c095fea9 100644 --- a/v2/internal/frontend/desktop/linux/keys.go +++ b/v2/internal/frontend/desktop/linux/keys.go @@ -81,7 +81,8 @@ func parseKey(key string) C.guint { return result } // Check for unknown namedkeys - if len(key) > 1 { + // Check if we only have a single character + if len(key) != 1 { return C.guint(0) } keyval := rune(key[0]) diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index f08a679da..2d3b441e7 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Avoid app crashing when the Linux GTK key is empty by @aminya in [PR](https://github.com/wailsapp/wails/pull/2672) + ## [v2.5.1] - 2023-05-16 ### Breaking Changes