python-3.x - 如何修复 Kivy 的 TextInput 在使用非英文字符后不注册退格?
问题描述
我正在使用 Kivy 2.0.0 版,并且正在尝试制作一个学习外语的应用程序。但是,当我在 TextInput 对象中输入外来字符时,退格功能停止工作。
(问题的图像)
带有中文和重音字符的框不允许我用退格键删除,除非通过突出显示明确选择了一个文本块。
TextInput 对象的声明如下:
index = len(self.card_editor.faces)
self.card_editor.faces.append(TextInput())
self.card_editor.faces[index].font_name = "ArialUnicode"
self.card_editor.faces[index].hint_text = f"Face {index + 1}"
self.card_editor.faces[index].multiline = False
我正在使用一种支持所有 UNICODE 字符的字体,并且在使用英文字符时删除作品而不突出显示。我怎样才能让它正常删除外来字符呢?
解决方案
推荐阅读
- apache-spark - Spark-HBase - GCP 模板 (3/3) - 缺少库?
- c++ - 通过全球 Internet 连接 (C/C++) 的 TCP/IP 连接
- java - 带有 OneToMany JoinColumn 的休眠插入表
- angular - 带有选择的Angular10表 - 选中时显示扩展行
- visual-studio-code - 如何运行 Visual Studio Code 扩展?
- haskell - 返回 Haskell 中列表的第一个元素
- python - 对字符串中的数字求和,但如果它以负号开头怎么办?
- pulumi - 如何保护特定 Pulumi 堆栈中的资源不被删除
- powershell - 如何解决 PowerShell Set-ADUser 错误
- selenium - Raspbian 上的 Chromium 浏览器版本 83