File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ export default function App() {
41
41
return KeyCommand . addListener ( KEY_COMMAND , ( ) => handleSearchCommandPress ( '[CMD + F] pressed' ) ) ;
42
42
} , [ ] ) ;
43
43
44
+ React . useEffect ( ( ) => {
45
+ const KEY_COMMAND = { input : KeyCommand . constants . keyInputEscape , modifierFlags : KeyCommand . constants . keyModifierShift } ;
46
+ return KeyCommand . addListener ( KEY_COMMAND , ( ) => handleSearchCommandPress ( '[Shift + Esc] pressed' ) ) ;
47
+ } , [ ] ) ;
48
+
44
49
React . useEffect ( ( ) => {
45
50
const KEY_COMMAND = { input : KeyCommand . constants . keyInputEscape } ;
46
51
return KeyCommand . addListener ( KEY_COMMAND , ( ) => handleSearchCommandPress ( '[Esc] pressed' ) ) ;
@@ -78,9 +83,10 @@ export default function App() {
78
83
< Text style = { styles . title } > 1. [CMD + F]</ Text >
79
84
< Text style = { styles . title } > 2. [G]</ Text >
80
85
< Text style = { styles . title } > 3. [Esc]</ Text >
81
- < Text style = { styles . title } > 4. [CMD + SHIFT + K]</ Text >
82
- < Text style = { styles . title } > 5. [ENTER]</ Text >
83
- < Text style = { styles . title } > 6. [DOWN / UP ARROW]</ Text >
86
+ < Text style = { styles . title } > 4. [Shift + Esc]</ Text >
87
+ < Text style = { styles . title } > 5. [CMD + SHIFT + K]</ Text >
88
+ < Text style = { styles . title } > 6. [ENTER]</ Text >
89
+ < Text style = { styles . title } > 7. [DOWN / UP ARROW]</ Text >
84
90
</ View >
85
91
86
92
< ScrollView style = { styles . scroll } >
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ function getRegisteredCommandIndex(json) {
116
116
const strictIndex = _ . findIndex ( commands , item => (
117
117
( item . input === json . input && matchesModifierFlags ( item ) )
118
118
|| ( matchesEnter ( item ) && matchesModifierFlags ( item ) )
119
+ || ( matchesEscape ( item ) && matchesModifierFlags ( item ) )
119
120
) ) ;
120
121
121
122
if ( strictIndex < 0 ) {
You can’t perform that action at this time.
0 commit comments