rdbende / tkcode

Use Chlorophyll instead
https://github.com/rdbende/chlorophyll
MIT License
19 stars 3 forks source link

_tkinter.TclError: bad event type or keysym "KP_Insert" #3

Closed whmsft closed 3 years ago

whmsft commented 3 years ago

When using CodeEditor this error occurs:

Traceback (most recent call last):
  File "main.py", line 33, in <module>
    code_editor = CodeEditor(tab_1, width=40, height=10, language="c++",
  File "E:\Programming\Python38-32\lib\site-packages\tkcode\codeeditor.py", line 36, in __init__
    self.bind("<KP_Insert>", self.change_cursor_mode)
  File "E:\Programming\Python38-32\lib\tkinter\__init__.py", line 1392, in bind
    return self._bind(('bind', self._w), sequence, func, add)
  File "E:\Programming\Python38-32\lib\tkinter\__init__.py", line 1346, in _bind
    self.tk.call(what + (sequence, cmd))
_tkinter.TclError: bad event type or keysym "KP_Insert"
rdbende commented 3 years ago

Thanks for reporting this, I didn't thought of those who have a smaller keyboard and don't have a keypad. 😕️ I'll fix it anon.

rdbende commented 3 years ago

Hopefully fixed now. I can't test, because I have a keypad insert key, but it should work.

whmsft commented 3 years ago

yep now it works..