Closed kjk closed 5 years ago
This is how carlo seems to be doing this: https://sourcegraph.com/github.com/GoogleChromeLabs/carlo/-/blob/lib/features/shortcuts.js
Correct. If you want to disable particular hotkeys - you can use javascript. Chrome DevTools protocol does not allow disabling Chrome hotkeys on its own, so capturing them in javascript is the way to go.
On Windows, standard chrome shortcuts ctrl-t and ctrl-n open a new, empty browser window, which is probably not what any application writer wants.
If possible, they should be blocked. Better yet, it would be good if that was routed through logic in Go program so that user of library can decide if this should be blocked or allowed to proceed. If allowed to proceed, there should be a way to specify which html file or url to load.