User가 chrome://extensions/shortcuts 통해 어느 거든 re-bind 가능 — Chrome이 모든 extension의 command 거기 surface.
특별 _execute_action command가 popup 열기. _execute_side_panel이 SW listener 없이 panel 열기.
Bind 된 거 진단
chrome.commands.getAll()이 각각의 active key와 함께 현재 set 반환. onInstalled handler에서 유용 — Chrome이 suggested key를 silent drop 했는지 (다른 extension 이나 Chrome 자체가 이미 combo 소유 시 일어남) 알도록 command 로깅:
const cmds = await chrome.commands.getAll();
for (const c of cmds) console.log(c.name, '→', c.shortcut || '(unbound)');
shortcut이 비어 있다면 user가 아무것도 안 걸었거나, 설치할 때 다른 것과 충돌해서 풀린 거야. 처음 안내하는 popup에서 한 번쯤 알려 줘. 어디 가서 다시 걸 수 있는지 찾을 수 있게.
Omnibox API
chrome.omnibox가 Chrome 주소창을 extension의 input으로 바꿈. User가 (manifest에 선언된) keyword 타이핑, space, query — SW가 매 keystroke 받고 suggestion 반환.
Toolbar icon click → popup → Save (이 track Lesson 2) — middle ground.
Right-click selection → 'Save to ClipDeck' (이 track Lesson 3) — in-the-moment discoverability.
검색용 omnibox clip ... (이 lesson) — power-user 회수.
각각 유지 비용 거의 0. 함께 모든 종류 user cover — power user, kbd-shy clicker, right-click 사람, omnibox 애호가. 각각 코드 몇 줄 세 받고 다른 audience 닿으니 다 ship.
값싼 통로 여러 개가 완벽한 통로 하나보다 더 많은 user 한테 닿아. 단축키, popup, 우클릭 메뉴, 주소창 키워드 — 하나같이 몇 줄이면 되고, 각자 다른 습관을 가진 사람을 잡아. 다 만들어 두고 고르는 건 user 한테 맡겨.
네 단축키 cap. Stable Chrome이 extension 당 user-bindable command 4 개 제한 강제. 더 필요하면 나머지를 user가 Karabiner, AutoHotkey 같은 거 통해 OS-level shortcut에 wire 할 suggestion으로 문서화. 다섯 등록 시도 안 함 — Chrome이 install 시 다섯 번째를 silent drop.
clipdeck/manifest.json의 commands update 하고 첫 번째 code block의 omnibox block 추가. clipdeck/background.js의 command listener를 두 번째 code block으로 교체. 세 번째 code block (omnibox handler)을 background.js에 추가. Reload. chrome://extensions/shortcuts 열고 4 ClipDeck command가 suggested key와 함께 나타나는지 확인 — conflict 보이면 하나 rebind. 각각 테스트: Ctrl+Shift+K가 clip 저장. Ctrl+Shift+P가 panel 열기. Ctrl+Shift+M이 SW console에 toggle-pause request 로깅. Ctrl+Shift+L이 popup 열기. 다음 주소창 click, clip space 타이핑, 저장한 clip 매칭하는 검색어 — suggestion 나타나야 함. 하나에 Enter 눌러 source URL 열기.
Hint
Shortcut이 chrome://extensions/shortcuts page에서 unbound 보이면, suggested combo가 다른 extension 이나 Chrome 자체 binding과 conflict — 다른 거 선택. Omnibox keyword가 user의 정확한 타이핑 문자열에 매칭. clip 이 suggestion trigger 안 하면 manifest entry가 "omnibox": { "keyword": "clip" } 인지 확인하고 extension reload. Suggestion 나타나는데 <match> 태그가 bold 안 되고 literal 렌더되면, 일부 Chrome 버전에선 정상 — description이 작은 XML formatting subset 지원, 렌더링은 다양. 상호작용 자체는 상관없이 동작.Raw query에서 Enter를 누르면 suggestion URL이 온다는 보장이 없어. Handler가 matching clip을 resolve하고 http(s)를 검증해야 해. Current, foreground, background disposition을 다 시험해.
Progress
Progress is local-only — sign in to sync across devices.