Skip to content

Commit f4bc7c2

Browse files
author
Gulshan Singh
committed
Merge pull request #18 from NateTheGreat68/key_shortcuts
Key shortcuts
2 parents 5a8841a + 09d91d3 commit f4bc7c2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/popup/popup.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,19 @@ module Popup {
6969
var queryInputKeyDown = function(event) {
7070
if (event.keyCode == 13) {
7171
Log.info("Enter pressed");
72-
search(id, tabStates);
72+
if (tabStates.isSearching(id)) {
73+
if (event.shiftKey) {
74+
prevButtonClick();
75+
} else {
76+
nextButtonClick();
77+
}
78+
} else {
79+
search(id, tabStates);
80+
}
81+
} else if (event.keyCode == 27) {
82+
Log.info("Esc pressed");
83+
setSearching(id, false, tabStates);
84+
Utils.sendCommand("clear");
7385
}
7486
}
7587

0 commit comments

Comments
 (0)