Skip to content

Commit 6d04195

Browse files
authored
refactor: Extract keybindings configuration to separate file (#438)
Keybindings have been moved from `.infer/config.yaml` to a dedicated `.infer/keybindings.yaml` file. The main config struct now hides keybindings from YAML serialization, a new service handles loading/saving, `infer init` seeds the new file, and environment variable processing was relocated to config loading. Closes #435
1 parent 85c6e0a commit 6d04195

17 files changed

Lines changed: 716 additions & 814 deletions

File tree

.infer/config.yaml

Lines changed: 1 addition & 224 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ tools:
5656
- .infer/shortcuts/
5757
- .infer/agents.yaml
5858
- .infer/mcp.yaml
59+
- .infer/keybindings.yaml
5960
- .git/
6061
- '*.env'
6162
bash:
@@ -329,230 +330,6 @@ conversation:
329330
interval: 0
330331
chat:
331332
theme: tokyo-night
332-
keybindings:
333-
enabled: false
334-
bindings:
335-
chat_enter_key_handler:
336-
keys:
337-
- enter
338-
description: send message or insert newline
339-
category: chat
340-
enabled: true
341-
clipboard_copy_text:
342-
keys:
343-
- ctrl+shift+c
344-
description: copy text
345-
category: clipboard
346-
enabled: true
347-
clipboard_paste_text:
348-
keys:
349-
- ctrl+v
350-
description: paste text
351-
category: clipboard
352-
enabled: true
353-
display_toggle_raw_format:
354-
keys:
355-
- ctrl+r
356-
description: toggle raw/rendered markdown
357-
category: display
358-
enabled: true
359-
display_toggle_thinking:
360-
keys:
361-
- ctrl+k
362-
description: expand/collapse thinking blocks
363-
category: display
364-
enabled: true
365-
display_toggle_todo_box:
366-
keys:
367-
- ctrl+t
368-
description: toggle todo list
369-
category: display
370-
enabled: true
371-
global_cancel:
372-
keys:
373-
- esc
374-
description: cancel current operation
375-
category: global
376-
enabled: true
377-
global_quit:
378-
keys:
379-
- ctrl+c
380-
description: exit application
381-
category: global
382-
enabled: true
383-
help_toggle_help:
384-
keys:
385-
- '?'
386-
description: toggle help when input is empty
387-
category: help
388-
enabled: true
389-
mode_cycle_agent_mode:
390-
keys:
391-
- shift+tab
392-
description: cycle agent mode (Standard/Plan/Auto-Accept)
393-
category: mode
394-
enabled: true
395-
navigation_go_back_in_time:
396-
keys:
397-
- esc,esc
398-
description: go back in time to previous message (double ESC)
399-
category: navigation
400-
enabled: true
401-
navigation_page_down:
402-
keys:
403-
- pgdn
404-
- page_down
405-
description: page down
406-
category: navigation
407-
enabled: true
408-
navigation_page_up:
409-
keys:
410-
- pgup
411-
- page_up
412-
description: page up
413-
category: navigation
414-
enabled: true
415-
navigation_scroll_down_half_page:
416-
keys:
417-
- shift+down
418-
description: scroll down half page
419-
category: navigation
420-
enabled: true
421-
navigation_scroll_to_bottom:
422-
keys:
423-
- end
424-
description: scroll to bottom
425-
category: navigation
426-
enabled: true
427-
navigation_scroll_to_top:
428-
keys:
429-
- home
430-
description: scroll to top
431-
category: navigation
432-
enabled: true
433-
navigation_scroll_up_half_page:
434-
keys:
435-
- shift+up
436-
description: scroll up half page
437-
category: navigation
438-
enabled: true
439-
plan_approval_plan_approval_accept:
440-
keys:
441-
- enter
442-
- "y"
443-
description: accept plan
444-
category: plan_approval
445-
enabled: true
446-
plan_approval_plan_approval_accept_and_auto_approve:
447-
keys:
448-
- a
449-
description: accept plan and enable auto-approve mode
450-
category: plan_approval
451-
enabled: true
452-
plan_approval_plan_approval_left:
453-
keys:
454-
- left
455-
- h
456-
description: move selection left
457-
category: plan_approval
458-
enabled: true
459-
plan_approval_plan_approval_reject:
460-
keys:
461-
- "n"
462-
description: reject plan
463-
category: plan_approval
464-
enabled: true
465-
plan_approval_plan_approval_right:
466-
keys:
467-
- right
468-
- l
469-
description: move selection right
470-
category: plan_approval
471-
enabled: true
472-
selection_toggle_mouse_mode:
473-
keys:
474-
- ctrl+s
475-
description: toggle mouse scrolling/text selection
476-
category: selection
477-
enabled: true
478-
text_editing_backspace:
479-
keys:
480-
- backspace
481-
description: delete character
482-
category: text_editing
483-
enabled: true
484-
text_editing_delete_to_beginning:
485-
keys:
486-
- ctrl+u
487-
description: delete to beginning of line
488-
category: text_editing
489-
enabled: true
490-
text_editing_delete_word_backward:
491-
keys:
492-
- ctrl+w
493-
description: delete word backward
494-
category: text_editing
495-
enabled: true
496-
text_editing_history_down:
497-
keys:
498-
- down
499-
description: navigate to next message in history
500-
category: text_editing
501-
enabled: true
502-
text_editing_history_up:
503-
keys:
504-
- up
505-
description: navigate to previous message in history
506-
category: text_editing
507-
enabled: true
508-
text_editing_insert_newline_alt:
509-
keys:
510-
- alt+enter
511-
description: insert newline
512-
category: text_editing
513-
enabled: true
514-
text_editing_insert_newline_ctrl:
515-
keys:
516-
- ctrl+j
517-
description: insert newline
518-
category: text_editing
519-
enabled: true
520-
text_editing_move_cursor_left:
521-
keys:
522-
- left
523-
description: move cursor left
524-
category: text_editing
525-
enabled: true
526-
text_editing_move_cursor_right:
527-
keys:
528-
- right
529-
description: move cursor right
530-
category: text_editing
531-
enabled: true
532-
text_editing_move_to_beginning:
533-
keys:
534-
- ctrl+a
535-
description: move cursor to beginning
536-
category: text_editing
537-
enabled: true
538-
text_editing_move_to_end:
539-
keys:
540-
- ctrl+e
541-
description: move cursor to end
542-
category: text_editing
543-
enabled: true
544-
tools_background_shell:
545-
keys:
546-
- ctrl+b
547-
description: move running bash command to background
548-
category: tools
549-
enabled: true
550-
tools_toggle_tool_expansion:
551-
keys:
552-
- ctrl+o
553-
description: expand/collapse tool results
554-
category: tools
555-
enabled: true
556333
status_bar:
557334
enabled: true
558335
indicators:

0 commit comments

Comments
 (0)