苦労した点
- keypress.jsをnpmでつかう
- content_scriptsを使うこと
- 本当にbackgroundで待ち受けしないといけないのか調べてみたけど結局待ち受けることにした
WebページのタイトルとURLをワンクリックでコピーするBookmarklet - Qiita
https://qiita.com/georgen/items/93d5345d4bf282f60817
manifest.json chrome commands - Google 検索
https://www.google.co.jp/search?num=100&ei=WZ8CW772OMqL0wLup7DYCw&q=manifest.json+chrome+commands+&oq=manifest.json+chrome+commands+&gs_l=psy-ab.3...3044.8143.0.14347.10.10.0.0.0.0.199.1516.0j10.10.0....0...1c.1.64.psy-ab..0.8.1222...33i160k1j33i21k1.0.Vv2fgryxVJc
Chrome App/Extensions で特殊キーの入力やキーボードショートカットを受け取る - Qiita
https://qiita.com/kimama1997/items/b9292c26b62bfbba17e9
try catch and ...release: Chrome拡張機能のショートカットキー設定
https://trycatchand.blogspot.jp/2013/08/chrome-keyboard-shortcut.html
javascript extension chrome key shortcut - Google 検索
https://www.google.co.jp/search?num=100&ei=sQcEW5e3EYHM8wXEi4vIBg&q=javascript+extension+chrome+key+shortcut&oq=javascript+extension+chrome+key+shortcut&gs_l=psy-ab.3...9009.11759.0.11888.12.11.0.0.0.0.276.1120.0j6j1.7.0....0...1c.1.64.psy-ab..8.1.123...0i8i30k1.0.MlwvHc-qQxE
キーボード入力をキャプチャするためのkeypress.jsの紹介 | 全世界のIT記事
https://sekai-it.com/archives/37860
JavaScriptでショートカットキーを実装する色々な方法 | CMS(WordPress)などの技術ブログ
https://www.cms-seisaku.com/blog/javascript/199
"keypress.js" "shortcut.js" - Google 検索
https://www.google.co.jp/search?num=100&biw=1717&bih=1080&ei=IwkEW4PWBor88QWSqpXgDg&q=%22keypress.js%22+%22shortcut.js%22&oq=%22keypress.js%22+%22shortcut.js%22&gs_l=psy-ab.3...8107.11038.0.11207.4.4.0.0.0.0.158.538.0j4.4.0....0...1c.1.64.psy-ab..0.0.0....0.l4aAI59soHY
Capturing the charCode for CTRL (or any modifier/special key) + [any key] seems unclear · Issue #4159 · facebook/react
https://github.com/facebook/react/issues/4159
批处理之家 js 在线脚本库 - JS / JScript / JavaScript - VBS求助&讨论 - 批处理之家 批处理_BAT_CMD_DOS_VBS_Perl_Python_PowerShell - Powered by Discuz!
http://www.bathome.net/viewthread.php?tid=34544&rpid=163481&ordertype=0&page=1#pid163481
Keypress: A Javascript library for capturing input
http://dmauro.github.io/Keypress/
JavaScript APIs - Google Chrome
https://developer.chrome.com/apps/api_index
Chrome App/Extensions で特殊キーの入力やキーボードショートカットを受け取る - Qiita
https://qiita.com/kimama1997/items/b9292c26b62bfbba17e9
keypress.js 2.1.0-1 on npm - Libraries.io
https://libraries.io/npm/keypress.js/2.1.0-1
npm install keypress.js
Using Keypress with RequireJS
http://jp1971.com/2014/06/25/using-keypress-with-requirejs/
var listener = new keypress.Listener();
JavaScript APIs - Google Chrome
https://developer.chrome.com/apps/api_index
ブラウザー拡張(アドオン、エクステンション)の作り方チュートリアル。 | Ginpen.com
https://ginpen.com/2018/05/06/how-to-create-browser-extension/
chrome.notifications - Google Chrome
https://developer.chrome.com/apps/notifications#type-NotificationOptions
ブラウザゲームを効率的にプレイするためのChrome Extension開発紀行 その1 - 渋谷ほととぎす通信
http://www.shibuya24.info/entry/2015/09/22/224446
1-3-1. メッセージの待機処理
デスクトップ通知を行うときは、background.jsを使用します。background.jsは裏側で動き続き続けるJavaScriptです。content-script.jsから表示して欲しい通知内容をbackground.jsにメッセージを送ることが出来ます。