Skip to content

Commit

Permalink
Added q as a shortcut for zooming to this quarter (almarklein#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tagirijus committed Apr 12, 2024
1 parent 5a33a3b commit 31e4e7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions timetagger/app/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ def open(self, callback=None):
presets.children[0].innerHTML += " <span class='keyhint'>d</span>"
presets.children[1].innerHTML += " <span class='keyhint'>w</span>"
presets.children[2].innerHTML += " <span class='keyhint'>m</span>"
presets.children[3].innerHTML += " <span class='keyhint'>q</span>"

for i in range(presets.children.length):
but = presets.children[i]
Expand Down Expand Up @@ -3765,6 +3766,7 @@ def open(self, callback=None):
"D": "Select today",
"W": "Select this week",
"M": "Select this month",
"Q": "Select this quarter",
"Y": "Select this year",
"↑/PageUp": "Step back in time",
"↓/PageDown": "Step forward in time",
Expand Down
2 changes: 2 additions & 0 deletions timetagger/app/front.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,8 @@ def _on_key(self, e):
self._handle_button_press("nav_snap_now1W")
elif e.key.lower() == "m":
self._handle_button_press("nav_snap_now1M")
elif e.key.lower() == "q":
self._handle_button_press("nav_snap_now3M")
elif e.key.lower() == "y":
self._handle_button_press("nav_snap_now1Y")
elif e.key.lower() == "t":
Expand Down

0 comments on commit 31e4e7d

Please sign in to comment.