Skip to content

Commit

Permalink
Disable sticky key while in panel.
Browse files Browse the repository at this point in the history
It doesn't make sense to intercept ordinary commands while in the panel; this will help with the i-search experience and the possibility of implementing type to find commands.

Also, rebind i-search to search+ctrl+f (without sticky) and ctrl+f (with sticky). This change is needed because we don't eat key events containing ctrl only without sticky mode on. Ctrl+F causes both regular find and ChromeVox find to pop up (without sticky mode).

TEST=with sticky mode on, use i-search and menus. Do the same without sticky key.
Observe sticky key gets retained (state) when exiting and gets turned off while in panel.

Review URL: https://codereview.chromium.org/1819433002

Cr-Commit-Position: refs/heads/master@{#382033}
  • Loading branch information
dtsengchromium authored and Commit bot committed Mar 18, 2016
1 parent e7b42f8 commit 02158c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
{
"command": "toggleSearchWidget",
"sequence": {
"cvoxModifier": true,
"keys": {
"keyCode": [70],
"ctrlKey": [true]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,3 +550,12 @@ Panel.closeMenusAndRestoreFocus = function() {
window.addEventListener('load', function() {
Panel.init();
}, false);

window.addEventListener('hashchange', function() {
if (location.hash == '#fullscreen' || location.hash == '#focus') {
this.originalStickyState_ = cvox.ChromeVox.isStickyPrefOn;
cvox.ChromeVox.isStickyPrefOn = false;
} else {
cvox.ChromeVox.isStickyPrefOn = this.originalStickyState_;
}
}, false);

0 comments on commit 02158c8

Please sign in to comment.