Focus on Go to Line field is now CTRL+L

This commit is contained in:
Matt Pass
2015-06-25 11:02:04 +01:00
parent 1699a1ada7
commit 7b4ba0008b
3 changed files with 4 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ $t = $text['help'];
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut"><?php echo $t['Close current tab'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> o</span> <span class="shortcut"><?php echo $t['Open file prompt'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> f</span> <span class="shortcut"><?php echo $t['Find'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> g</span> <span class="shortcut"><?php echo $t['Focus on Go...'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> l</span> <span class="shortcut"><?php echo $t['Focus on Go...'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> s</span> <span class="shortcut"><?php echo $t['Save'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Shift <span class="plus">+</span> s</span> <span class="shortcut"><?php echo $t['Save as'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['View webpage'];?> <span class="info" title="Popups need to be enabled">[?]</span></span><br>

View File

@@ -3315,8 +3315,8 @@ var ICEcoder = {
find.focus();
return false;
// CTRL/Cmd+G (Go to line)
} else if(key==71 && (evt.ctrlKey||top.ICEcoder.cmdKey)) {
// CTRL/Cmd+L (Go to line)
} else if(key==76 && (evt.ctrlKey||top.ICEcoder.cmdKey)) {
var goToLineInput = top.get('goToLineNo');
goToLineInput.select();
// this is trick for Chrome - after you have used Ctrl-F once, when

View File

@@ -149,7 +149,7 @@ alphaTabs:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c,d,e;a=[];b=[]
1);a.splice(e,1);b.splice(e,1)}top.ICEcoder.sortTabs(c)}},interceptKeys:function(a,b){var c,d,e;c=b.keyCode?b.keyCode:b.which?b.which:b.charCode;if(224==c||91==c||93==c)top.ICEcoder.cmdKey=!0;if(46==c&&"files"==a)return top.ICEcoder.deleteFiles(),!1;if(b.altKey)return d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1,"ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d?"content"==a?68==c?(top.ICEcoder.tagWrapper("div"),!1):83==c?(top.ICEcoder.tagWrapper("span"),!1):80==
c?(top.ICEcoder.tagWrapper("p"),!1):65==c?(top.ICEcoder.tagWrapper("a"),!1):66==c?(top.ICEcoder.tagWrapper("b"),!1):73==c?(top.ICEcoder.tagWrapper("i"),!1):71==c?(top.ICEcoder.tagWrapper("strong"),!1):69==c?(top.ICEcoder.tagWrapper("em"),!1):49==c?(top.ICEcoder.tagWrapper("h1"),!1):50==c?(top.ICEcoder.tagWrapper("h2"),!1):51==c?(top.ICEcoder.tagWrapper("h3"),!1):56==c?(top.ICEcoder.tagWrapper("li"),!1):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):37==c?(top.ICEcoder.filesFrame.contentWindow.focus(),
!1):c:37==c?(top.ICEcoder.filesFrame.contentWindow.focus(),!1):39==c?(top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?!0:!1),!1):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c;if(13==c&&b.shiftKey)return top.ICEcoder.insertLineBefore(),!1;if(70==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return c=top.get("find"),d=ICEcoder.getcMInstance(),e=ICEcoder.getcMdiffInstance(),d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?e:d,d=d.getSelections(),0<d.length&&0<d[0].length&&(c.value=
d[0]),c.select(),top.get("goToLineNo").focus(),c.focus(),!1;if(71==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return c=top.get("goToLineNo"),c.select(),top.get("find").focus(),c.focus(),!1;if(73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.searchForSelected(),!1;if(39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.nextTab(),!1;if(37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.previousTab(),!1;if(38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&
d[0]),c.select(),top.get("goToLineNo").focus(),c.focus(),!1;if(76==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return c=top.get("goToLineNo"),c.select(),top.get("find").focus(),c.focus(),!1;if(73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.searchForSelected(),!1;if(39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.nextTab(),!1;if(37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.previousTab(),!1;if(38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&
"content"==a)return top.ICEcoder.moveLines("up"),!1;if(40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.moveLines("down"),!1;if(107==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.duplicateLines():top.ICEcoder.newTab(),!1;if(109==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1;if(83==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return b.shiftKey?top.ICEcoder.saveFile("saveAs"):
top.ICEcoder.saveFile(),!1;if(13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1])return top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]),!1;if(13==c&&"files"==a)return b.ctrlKey||top.ICEcoder.cmdKey||(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder","|"),top.ICEcoder.selectFileFolder("init")),top.ICEcoder.fmAction(b,"enter")),!1;if(38!=c&&40!=c&&37!=c&&39!=c||"files"!=a)return 79==
c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!1):74==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.jumpToDefinition(),!1):223==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.lockUnlockNav(),ICEcoder.changeFilesW(top.ICEcoder.lockedNav?"expand":"contract"),!1):190==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(d=ICEcoder.getcMInstance(),e=ICEcoder.getcMdiffInstance(),d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?