| ... | ... | @@ -1074,6 +1074,8 @@ |
| 1074 | 1074 | function onSearchKeyDown(ev) { |
| 1075 | 1075 | switch (ev.which) { |
| 1076 | 1076 | case 13: |
| 1077 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1078 | |
| 1077 | 1079 | // detect if this search changes anything |
| 1078 | 1080 | var terms1 = getSearchTerms(); |
| 1079 | 1081 | startSearch(); |
| ... | ... | @@ -1087,6 +1089,8 @@ |
| 1087 | 1089 | ev.stopPropagation(); |
| 1088 | 1090 | return; |
| 1089 | 1091 | case 27: |
| 1092 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1093 | |
| 1090 | 1094 | domSearch.value = ""; |
| 1091 | 1095 | domSearch.blur(); |
| 1092 | 1096 | curSearchIndex = -1; |
| ... | ... | @@ -1095,16 +1099,22 @@ |
| 1095 | 1099 | startSearch(); |
| 1096 | 1100 | return; |
| 1097 | 1101 | case 38: |
| 1102 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1103 | |
| 1098 | 1104 | moveSearchCursor(-1); |
| 1099 | 1105 | ev.preventDefault(); |
| 1100 | 1106 | ev.stopPropagation(); |
| 1101 | 1107 | return; |
| 1102 | 1108 | case 40: |
| 1109 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1110 | |
| 1103 | 1111 | moveSearchCursor(1); |
| 1104 | 1112 | ev.preventDefault(); |
| 1105 | 1113 | ev.stopPropagation(); |
| 1106 | 1114 | return; |
| 1107 | 1115 | default: |
| 1116 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1117 | |
| 1108 | 1118 | curSearchIndex = -1; |
| 1109 | 1119 | ev.stopPropagation(); |
| 1110 | 1120 | startAsyncSearch(); |
| ... | ... | @@ -1134,6 +1144,7 @@ |
| 1134 | 1144 | function onWindowKeyDown(ev) { |
| 1135 | 1145 | switch (ev.which) { |
| 1136 | 1146 | case 27: |
| 1147 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1137 | 1148 | if (!domHelpModal.classList.contains("hidden")) { |
| 1138 | 1149 | domHelpModal.classList.add("hidden"); |
| 1139 | 1150 | ev.preventDefault(); |
| ... | ... | @@ -1141,6 +1152,7 @@ |
| 1141 | 1152 | } |
| 1142 | 1153 | break; |
| 1143 | 1154 | case 83: |
| 1155 | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1144 | 1156 | domSearch.focus(); |
| 1145 | 1157 | domSearch.select(); |
| 1146 | 1158 | ev.preventDefault(); |
| ... | ... | @@ -1148,6 +1160,7 @@ |
| 1148 | 1160 | startAsyncSearch(); |
| 1149 | 1161 | break; |
| 1150 | 1162 | case 191: |
| 1163 | if (!ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 1151 | 1164 | ev.preventDefault(); |
| 1152 | 1165 | ev.stopPropagation(); |
| 1153 | 1166 | showHelpModal(); |