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

Unified Diff: pkg/dartdoc/lib/src/client/dropdown.dart

Issue 11045019: Change find-as-you-type shortcuts to Ctrl+3 and S. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « pkg/dartdoc/lib/src/client/client-static.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/src/client/dropdown.dart
diff --git a/pkg/dartdoc/lib/src/client/dropdown.dart b/pkg/dartdoc/lib/src/client/dropdown.dart
index 9865b04b5203bf911a2e0ac5e0d46aa6e9c6356f..eab7e7901b8be63d230736461329f6f5120abd42 100644
--- a/pkg/dartdoc/lib/src/client/dropdown.dart
+++ b/pkg/dartdoc/lib/src/client/dropdown.dart
@@ -322,15 +322,22 @@ void hideDropDown() {
dropdown.style.visibility = 'hidden';
}
-/** Activate search on Ctrl+F and F3. */
+/** Activate search on Ctrl+3 and S. */
void shortcutHandler(KeyboardEvent event) {
- if (event.keyCode == 0x46/*F*/ && event.ctrlKey ||
- event.keyIdentifier == KeyName.F3) {
+ if (event.keyCode == 0x33/* 3 */ && event.ctrlKey ||
+ event.keyCode == 0x53/* S */) {
searchInput.focus();
event.preventDefault();
}
}
+/**
+ * Setup window shortcuts.
+ */
+void setupShortcuts() {
+ window.on.keyDown.add(shortcutHandler);
+}
+
/** Setup search hooks. */
void setupSearch(var libraries) {
libraryList = libraries;
@@ -343,5 +350,4 @@ void setupSearch(var libraries) {
searchInput.on.reset.add(updateDropDown);
searchInput.on.focus.add((event) => showDropDown());
searchInput.on.blur.add((event) => hideDropDown());
- window.on.keyDown.add(shortcutHandler);
}
« no previous file with comments | « pkg/dartdoc/lib/src/client/client-static.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698