Skip to content

Commit

Permalink
Add upper and fix lower.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfmanstout committed Mar 2, 2024
1 parent 54e4b1a commit 8b65b03
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gaze_ocr_talon.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@
"delete": "delete_with_whitespace",
"chuck": "delete_with_whitespace",
"cap": "capitalize",
"no cap": "uncapitalize",
"no caps": "uncapitalize",
"lower": "lowercase",
"no cap": "lowercase",
"no caps": "lowercase",
"upper": "uppercase",
# Note: the following are not defined by default in knausj.
"bold": "bold",
"italic": "italic",
Expand Down Expand Up @@ -519,9 +520,15 @@ def perform_ocr_action_generator(
elif ocr_action == "capitalize":
text = actions.edit.selected_text()
actions.insert(text[0].capitalize() + text[1:] if text else "")
elif ocr_action == "uncapitalize":
text = actions.edit.selected_text()
actions.insert(text[0].lower() + text[1:] if text else "")
elif ocr_action == "lowercase":
text = actions.edit.selected_text()
actions.insert(text.lower())
elif ocr_action == "uppercase":
text = actions.edit.selected_text()
actions.insert(text.upper())
elif ocr_action == "bold":
actions.user.bold()
elif ocr_action == "italic":
Expand Down

0 comments on commit 8b65b03

Please sign in to comment.