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() {
4141 return KeyCommand . addListener ( KEY_COMMAND , ( ) => handleSearchCommandPress ( '[CMD + F] pressed' ) ) ;
4242 } , [ ] ) ;
4343
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+
4449 React . useEffect ( ( ) => {
4550 const KEY_COMMAND = { input : KeyCommand . constants . keyInputEscape } ;
4651 return KeyCommand . addListener ( KEY_COMMAND , ( ) => handleSearchCommandPress ( '[Esc] pressed' ) ) ;
@@ -78,9 +83,10 @@ export default function App() {
7883 < Text style = { styles . title } > 1. [CMD + F]</ Text >
7984 < Text style = { styles . title } > 2. [G]</ Text >
8085 < 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 >
8490 </ View >
8591
8692 < ScrollView style = { styles . scroll } >
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ function getRegisteredCommandIndex(json) {
116116 const strictIndex = _ . findIndex ( commands , item => (
117117 ( item . input === json . input && matchesModifierFlags ( item ) )
118118 || ( matchesEnter ( item ) && matchesModifierFlags ( item ) )
119+ || ( matchesEscape ( item ) && matchesModifierFlags ( item ) )
119120 ) ) ;
120121
121122 if ( strictIndex < 0 ) {
You can’t perform that action at this time.
0 commit comments