Skip to content

C버튼으로 채팅 바로가기#8

Draft
emptycan1010 wants to merge 24 commits into
khk4912:dev/v3.1.2from
emptycan1010:main
Draft

C버튼으로 채팅 바로가기#8
emptycan1010 wants to merge 24 commits into
khk4912:dev/v3.1.2from
emptycan1010:main

Conversation

@emptycan1010
Copy link
Copy Markdown
Contributor

No description provided.

@khk4912 khk4912 requested a review from Copilot June 13, 2025 10:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a global “C” key shortcut to focus and select the chat textarea.

  • Introduces a new utility (keyboard.ts) to detect key presses and focus the chat input.
  • Registers the keyboard utility in the content script entrypoint.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/utils/keyboard.ts Implements keydown listener for ‘c’/’C’ to focus chat
src/entrypoints/content/index.tsx Imports the keyboard utility for side effects
Comments suppressed due to low confidence (2)

src/utils/keyboard.ts:5

  • [nitpick] The function name focusTarget is generic. Consider renaming it to focusChatInput for clearer intent.
function focusTarget (): void {

src/utils/keyboard.ts:25

  • The new keyboard shortcut behavior isn’t covered by tests. Consider adding unit or integration tests for the keydown handler to ensure it focuses the chat input correctly.
window.addEventListener('keydown', (e: KeyboardEvent) => {

Comment thread src/utils/keyboard.ts Outdated
// 이미 다른 입력 필드에 커서가 있으면 무시
if (isTypingInEditable()) return
// 단독 'c' 키 확인
if (e.key === 'c' || e.key === 'C') {
Copy link

Copilot AI Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify case handling by using e.key.toLowerCase() === 'c', which covers both 'c' and 'C'.

Suggested change
if (e.key === 'c' || e.key === 'C') {
if (e.key.toLowerCase() === 'c') {

Copilot uses AI. Check for mistakes.
@khk4912 khk4912 changed the base branch from main to dev/v3.1.2 June 13, 2025 10:43
@khk4912 khk4912 added the enhancement New feature or request label Jun 13, 2025
@khk4912 khk4912 linked an issue Jun 13, 2025 that may be closed by this pull request
@khk4912 khk4912 moved this to In progress in Cheese-PIP TODO Jun 13, 2025
@khk4912
Copy link
Copy Markdown
Owner

khk4912 commented Jul 12, 2025

기존에 사용하고 있는 hook을 이용한 구현이 필요해보입니다.

@khk4912 khk4912 marked this pull request as draft July 12, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

채팅으로 포커스 이동 단축키 추가

3 participants