File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 176176
177177 if ( keys . length > 1 ) {
178178 mods = getMods ( keys ) ;
179- key = keys [ keys . length - 1 ] ;
180179 }
181180
181+ key = keys [ keys . length - 1 ] ;
182182 key = code ( key ) ;
183183
184184 if ( scope === undefined ) {
Original file line number Diff line number Diff line change @@ -199,6 +199,23 @@ <h1>Keymaster unit tests</h1>
199199 t . assertEqual ( 1 , cntCtrlShiftA ) ;
200200 } ,
201201
202+ testUnbindWithKeysMultiple : function ( t ) {
203+ var cntSlashF = 0 ;
204+ key ( '/, f' , function ( ) { cntSlashF ++ } ) ;
205+
206+ keydown ( 191 ) ; keyup ( 191 ) ;
207+ keydown ( 70 ) ; keyup ( 70 ) ;
208+
209+ t . assertEqual ( 2 , cntSlashF ) ;
210+
211+ key . unbind ( '/, f' ) ;
212+
213+ keydown ( 191 ) ; keyup ( 191 ) ;
214+ keydown ( 70 ) ; keyup ( 70 ) ;
215+
216+ t . assertEqual ( 2 , cntSlashF ) ;
217+ } ,
218+
202219 testFancyModifierKeys : function ( t ) {
203220 var sequence = '' ;
204221 key ( '⌃+a' , function ( ) { sequence += 'a' } ) ;
You can’t perform that action at this time.
0 commit comments