@@ -125,17 +125,17 @@ describe('Keyboard', () => {
125125 describe ( 'On non-macOS platforms' , ( ) => {
126126 // Evalueate alt + arrow key movement, which is a feature of terminal emulators but not VT100
127127 // http://unix.stackexchange.com/a/108106
128- it ( 'should return \\x1b[5D for alt+left' , ( ) => {
129- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 37 } , { isMac : false } ) . key , '\x1b[1;5D ' ) ; // CSI 5 D
128+ it ( 'should return \\x1b[1;3D for alt+left' , ( ) => {
129+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 37 } , { isMac : false } ) . key , '\x1b[1;3D ' ) ; // CSI 1;3 D
130130 } ) ;
131- it ( 'should return \\x1b[5C for alt+right' , ( ) => {
132- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 39 } , { isMac : false } ) . key , '\x1b[1;5C ' ) ; // CSI 5 C
131+ it ( 'should return \\x1b[1;3C for alt+right' , ( ) => {
132+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 39 } , { isMac : false } ) . key , '\x1b[1;3C ' ) ; // CSI 1;3 C
133133 } ) ;
134- it ( 'should return \\x1b[5D for alt+up' , ( ) => {
135- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 38 } , { isMac : false } ) . key , '\x1b[1;5A ' ) ; // CSI 5 D
134+ it ( 'should return \\x1b[1;3A for alt+up' , ( ) => {
135+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 38 } , { isMac : false } ) . key , '\x1b[1;3A ' ) ; // CSI 1;3 A
136136 } ) ;
137- it ( 'should return \\x1b[5C for alt+down' , ( ) => {
138- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 40 } , { isMac : false } ) . key , '\x1b[1;5B ' ) ; // CSI 5 C
137+ it ( 'should return \\x1b[1;3B for alt+down' , ( ) => {
138+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 40 } , { isMac : false } ) . key , '\x1b[1;3B ' ) ; // CSI 1;3 B
139139 } ) ;
140140 it ( 'should return \\x1ba for alt+a' , ( ) => {
141141 assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 65 } , { isMac : false } ) . key , '\x1ba' ) ;
@@ -149,17 +149,17 @@ describe('Keyboard', () => {
149149 } ) ;
150150
151151 describe ( 'On macOS platforms' , ( ) => {
152- it ( 'should return \\x1bb for alt+left' , ( ) => {
153- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 37 } , { isMac : true } ) . key , '\x1bb ' ) ; // CSI 5 D
152+ it ( 'should return \\x1b[1;3D for alt+left' , ( ) => {
153+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 37 } , { isMac : true } ) . key , '\x1b[1;3D ' ) ; // CSI 1;3 D
154154 } ) ;
155- it ( 'should return \\x1bf for alt+right' , ( ) => {
156- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 39 } , { isMac : true } ) . key , '\x1bf ' ) ; // CSI 5 C
155+ it ( 'should return \\x1b[1;3C for alt+right' , ( ) => {
156+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 39 } , { isMac : true } ) . key , '\x1b[1;3C ' ) ; // CSI 1;3 C
157157 } ) ;
158- it ( 'should return \\x1bb for alt+up' , ( ) => {
159- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 38 } , { isMac : true } ) . key , '\x1b[1;3A' ) ; // CSI 5 D
158+ it ( 'should return \\x1b[1;3A for alt+up' , ( ) => {
159+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 38 } , { isMac : true } ) . key , '\x1b[1;3A' ) ; // CSI 1;3 A
160160 } ) ;
161- it ( 'should return \\x1bf for alt+down' , ( ) => {
162- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 40 } , { isMac : true } ) . key , '\x1b[1;3B' ) ; // CSI 5 C
161+ it ( 'should return \\x1b[1;3B for alt+down' , ( ) => {
162+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 40 } , { isMac : true } ) . key , '\x1b[1;3B' ) ; // CSI 1;3 B
163163 } ) ;
164164 it ( 'should return undefined for alt+a' , ( ) => {
165165 assert . strictEqual ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 65 } , { isMac : true } ) . key , undefined ) ;
@@ -176,11 +176,11 @@ describe('Keyboard', () => {
176176 } ) ;
177177 } ) ;
178178
179- it ( 'should return \\x1b[5A for alt+up' , ( ) => {
180- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 38 } ) . key , '\x1b[1;5A ' ) ; // CSI 5 A
179+ it ( 'should return \\x1b[1;3A for alt+up' , ( ) => {
180+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 38 } ) . key , '\x1b[1;3A ' ) ; // CSI 1;3 A
181181 } ) ;
182- it ( 'should return \\x1b[5B for alt+down' , ( ) => {
183- assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 40 } ) . key , '\x1b[1;5B ' ) ; // CSI 5 B
182+ it ( 'should return \\x1b[1;3B for alt+down' , ( ) => {
183+ assert . equal ( testEvaluateKeyboardEvent ( { altKey : true , keyCode : 40 } ) . key , '\x1b[1;3B ' ) ; // CSI 1;3 B
184184 } ) ;
185185 it ( 'should return the correct escape sequence for modified F1-F12 keys' , ( ) => {
186186 assert . equal ( testEvaluateKeyboardEvent ( { shiftKey : true , keyCode : 112 } ) . key , '\x1b[1;2P' ) ;
0 commit comments