Skip to content
Advertisement

Kivy: Control + Backspace in TextInput to delete token

I’m trying to get my TextInput boxes to recognize a ctrl+backspace keystroke to backspace an entire token (like most modern programs).

So far, I have this:

JavaScript

I’m not sure how to detect the previous token from the cursor and delete it without interfering with the existing behavior of the do_backspace() method.

Fyi, I am still using Kivy 1.11.1 and Python 3.7.

Advertisement

Answer

Something like this might work:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement