Skip to content

Commit ff8db17

Browse files
authored
The imgui adapter can deal with both variations of the char event (and minor-bump) (#772)
* The imgui adapter can deal with both variations of the char event * also minor bump
1 parent b497817 commit ff8db17

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ Possible sections in each release:
1717
* Security: in case of vulnerabilities.
1818

1919

20+
## [v0.28.1] - 14-11-2025
21+
22+
Fixed:
23+
24+
* The imgui adapter can deal with both variations of the char event by @almarklein in https://github.com/pygfx/wgpu-py/pull/772
25+
26+
2027
## [v0.28.0] - 10-11-2025
2128

2229
We moved the implementation of the contexts to `rendercanvas` and made `GPUCanvasContext` lighter (and more low-level).

wgpu/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# This is the base version number, to be bumped before each release.
2424
# The build system detects this definition when building a distribution.
25-
__version__ = "0.28.0"
25+
__version__ = "0.28.1"
2626

2727
# Set this to your library name
2828
project_name = "wgpu"

wgpu/utils/imgui/imgui_renderer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ def _on_wheel(self, event):
229229
event["stop_propagation"] = True
230230

231231
def _on_char_input(self, event):
232-
self._backend.io.add_input_characters_utf8(event["char_str"])
232+
# There is an inconsistency in the keys of the char event between different rendercanvas backends.
233+
# For the time being, we just consume both keys.
234+
text = event.get("data", "") or event.get("char_str", "") or ""
235+
self._backend.io.add_input_characters_utf8(text)
233236

234237
if self._backend.io.want_text_input:
235238
event["stop_propagation"] = True

0 commit comments

Comments
 (0)