File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1345,9 +1345,7 @@ function _stageEventHandler(actor, event) {
13451345 return false ;
13461346 }
13471347
1348- // A non-modifier key was pressed while a modifier was held.
1349- // Use -1 to indicate the modifier release should be consumed.
1350- _modifierOnlyAction = - 1 ;
1348+ _modifierOnlyAction = 0 ;
13511349
13521350 let action = global . display . get_keybinding_action ( keyCode , modifierState ) ;
13531351 if ( action > 0 ) {
@@ -1361,20 +1359,12 @@ function _stageEventHandler(actor, event) {
13611359 return false ;
13621360 }
13631361
1364- // Release event - activate the single-key keybinding, or eat the release if
1365- // a multi-key combo was used.
1366- if ( _isModifierKeyval ( event . get_key_symbol ( ) ) ) {
1367- if ( _modifierOnlyAction > 0 ) {
1368- let action = _modifierOnlyAction ;
1369- _modifierOnlyAction = 0 ;
1370- keybindingManager . invoke_keybinding_action_by_id ( action ) ;
1371- return true ;
1372- }
1373-
1374- if ( _modifierOnlyAction === - 1 ) {
1375- _modifierOnlyAction = 0 ;
1376- return true ;
1377- }
1362+ // Release event - activate the single-key modifier keybinding if one was stored.
1363+ if ( _isModifierKeyval ( event . get_key_symbol ( ) ) && _modifierOnlyAction > 0 ) {
1364+ let action = _modifierOnlyAction ;
1365+ _modifierOnlyAction = 0 ;
1366+ keybindingManager . invoke_keybinding_action_by_id ( action ) ;
1367+ return true ;
13781368 }
13791369
13801370 return false ;
You can’t perform that action at this time.
0 commit comments