Curious if someone can help me determine where I'm messing this up or what I'm missing:
{
"name": "Vertically Listed Tabs",
"description": "Manage your tabs vertically!",
"version": "0.3.0",
"manifest_version": 3,
"permissions": ["tabs","tabGroups","favicon","storage","system.display","input"],
"action": {
"default_title": "Open the VLT panel window."
},
"background": {
"service_worker": "background.js",
"type": "module"
},
"icons": {
"48": "img/vlticon-48x48.png",
"128": "img/vlticon-128x128.png"
},
"options_page": "options/options.html"
}
The background.js launches a window with an html and js file. In this window's js file, I use a bunch of addListeners for various things. In here, I have:
chrome.input.ime.onKeyEvent.addListener(
(engineID, keyData) => {
console.log(keyData)
}
)
Yet, I see Uncaught (in promise) TypeError:
"Cannot read properties of undefined (reading 'ime')"
According to
https://developer.chrome.com/docs/extensions/reference/input_ime/#event-onKeyEvent, this should work.
What am I missing? Is it because this is only supported in the service_worker? IF so, that's insane since the worker is only alive for a few seconds. For context: I need to handle when the user executes (on macos) command + ~.