Sha256: c083e33130d9855810f80a1c453d638e6eda387d9fda0936be42bd77617790c2
Contents?: true
Size: 832 Bytes
Versions: 19
Compression:
Stored size: 832 Bytes
Contents
var ShortcutKeysBehavior = Behavior.create({ onkeydown: function(event){ var character = String.fromCharCode(event.keyCode); if(!event.shiftKey && !character.blank()) character = character.toLowerCase(); if(event.ctrlKey && event.keyCode != 17){ var button = $$('input[accesskey='+character+']')[0]; if(button){ event.stop(); button.click(); } else { var control = TabControls['tab_control']; if(event.keyCode == 219){ // [ control.selectPreviousTab(); } if(event.keyCode == 221){ // ] control.selectNextTab(); } if(event.keyCode >= 49 && event.keyCode <= 57){ // 1..9 var index = event.keyCode - 49; control.selectTabByIndex(index); event.stop(); } } } } });
Version data entries
19 entries across 18 versions & 4 rubygems