Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: chrome/browser/resources/chromeos/switch_access/switch_access.js

Issue 2690063004: Tried to add keyboard shortcuts to trigger switch access commands. Maybe missing a permission.
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/switch_access/switch_access.js
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access.js b/chrome/browser/resources/chromeos/switch_access/switch_access.js
index ce21b3af8a4c78993035beed7adbf899ef6ebacb..0c54a67b3058ae39456d03a17d116be4ace05ec0 100644
--- a/chrome/browser/resources/chromeos/switch_access/switch_access.js
+++ b/chrome/browser/resources/chromeos/switch_access/switch_access.js
@@ -3,3 +3,20 @@
// found in the LICENSE file.
console.log("Switch access is enabled");
+
+console.log(chrome);
+console.log(chrome.commands);
+console.log(chrome.commands.onCommand);
+console.log(chrome.commands.onCommand.addListener);
+
+chrome.commands.onCommand.addListener(function(command) {
+ console.log("Start of onCommand listener");
+ console.log("Triggered command: ", command);
+ console.log("End of onCommand listener");
+});
+
+chrome.commands.getAll(function(commands) {
+ console.log(commands);
+});
+
+console.log("Reached end of code");

Powered by Google App Engine
This is Rietveld 408576698