Skip to content

Commit b037870

Browse files
Remap load-last-description keybinding from Ctrl+L to Ctrl+R
Ctrl+L conflicts with tmux, so use Ctrl+R instead.
1 parent fa47f8e commit b037870

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ internal/
6767
- Microsoft Graph integration uses OAuth2 device code flow; tokens cached in `~/.config/clockr/msgraph_tokens.json` with auto-refresh; requires Azure AD app with `Calendars.Read` delegated permission; config via `[calendar.graph]` or `MSGRAPH_CLIENT_ID`/`MSGRAPH_TENANT_ID` env vars
6868
- GitHub integration (`--github` flag) fetches commits/PRs from user-selected repos; token resolved via `gh auth token``GITHUB_TOKEN` env → config; repos saved to config after first picker selection
6969
- `--from`/`--to` flags accept `YYYY-MM-DD` or natural language dates (e.g., `monday`, `last friday`, `today`) via `tj/go-naturaldate`; bare weekday names default to past direction
70-
- `--repeat` flag (and Ctrl+L in TUI) reuses the last description without re-typing
70+
- `--repeat` flag (and Ctrl+R in TUI) reuses the last description without re-typing
7171
- `--prompt-file` flag writes the AI prompt to `~/.config/clockr/tmp/clockr_prompt.md` and clipboard instead of calling the AI API; if running in tmux, auto-injects into an adjacent Claude Code pane; waits for user to press Enter after the response is written to `~/.config/clockr/tmp/clockr_response.json`
7272
- Scheduler notifications show a platform-aware dialog (Log Now / Snooze / Next Timer); snooze durations configured via `snooze_options` in `[notifications]`; `enabled = false` skips the dialog
7373
- All runtime files (config, DB, PID, tokens, temp prompt/response) are stored under `~/.config/clockr/`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ clockr log --same
9797
clockr log --repeat
9898
```
9999

100-
Pre-fills the TUI with your last description. You can also press `Ctrl+L` inside the TUI to load it.
100+
Pre-fills the TUI with your last description. You can also press `Ctrl+R` inside the TUI to load it.
101101

102102
### Log a date range (batch mode)
103103

@@ -220,7 +220,7 @@ clockr status
220220
| `clockr stop` | Stop the running scheduler |
221221
| `clockr log` | Log a time entry interactively |
222222
| `clockr log --same` | Repeat last entry for current interval |
223-
| `clockr log --repeat` | Pre-fill TUI with last description (also Ctrl+L) |
223+
| `clockr log --repeat` | Pre-fill TUI with last description (also Ctrl+R) |
224224
| `clockr log --from DATE --to DATE` | Batch log a date range (supports natural language dates) |
225225
| `clockr log --github` | Include GitHub commit/PR context (combinable with other flags) |
226226
| `clockr log --prompt-file` | Write prompt to file/clipboard instead of calling the AI API |

internal/tui/input.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ type inputModel struct {
1010
timeInfo string
1111
width int
1212
height int
13-
lastInput string // previous description available via Ctrl+L
14-
loadedLastMsg bool // true after Ctrl+L was used (for transient feedback)
13+
lastInput string // previous description available via Ctrl+R
14+
loadedLastMsg bool // true after Ctrl+R was used (for transient feedback)
1515
}
1616

1717
func newInputModel(timeInfo string) inputModel {
@@ -44,7 +44,7 @@ func (m inputModel) Update(msg tea.Msg) (inputModel, tea.Cmd) {
4444
return m, nil
4545
}
4646
if keyMsg, ok := msg.(tea.KeyMsg); ok {
47-
if keyMsg.String() == "ctrl+l" && m.lastInput != "" {
47+
if keyMsg.String() == "ctrl+r" && m.lastInput != "" {
4848
m.textarea.SetValue(m.lastInput)
4949
m.loadedLastMsg = true
5050
return m, nil
@@ -60,7 +60,7 @@ func (m inputModel) View() string {
6060
timeLabel := subtitleStyle.Render(m.timeInfo)
6161
helpParts := "Enter: submit • Ctrl+C: cancel"
6262
if m.lastInput != "" {
63-
helpParts += " • Ctrl+L: load last description"
63+
helpParts += " • Ctrl+R: load last description"
6464
}
6565
help := helpStyle.Render(helpParts)
6666

0 commit comments

Comments
 (0)