Skip to content

Commit daa3cee

Browse files
authored
fix backspace print (#22)
1 parent 20dba5f commit daa3cee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

keyboard.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def on_keybutton_clicked(self, _: Gtk.Button, text: str):
165165
return
166166

167167
cursor_position: int = self.textarea.get_position()
168+
if text == BACKSPACE and cursor_position == 0:
169+
return
168170
if text == BACKSPACE and cursor_position != 0:
169171
buff: Gtk.EntryBuffer = self.textarea.get_buffer()
170172
buff.delete_text(cursor_position - 1, 1)

0 commit comments

Comments
 (0)