Skip to content

Commit

Permalink
feat: add make backspace key work
Browse files Browse the repository at this point in the history
  • Loading branch information
IJustDev committed Oct 5, 2021
1 parent 7511565 commit 9da3096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_input(self, prefix: str = "") -> Optional[str]:
key = ord(key)
if key == 10: # return
break
elif key == 127: # del
elif key == 127 or key == 8: # del
if buff:
buff = buff[:-1]
elif key in (7, 27): # (^G, <esc>) cancel
Expand Down

0 comments on commit 9da3096

Please sign in to comment.