<p dir="auto">In the Find widget, the "Previous match" and "Next match" buttons have labels which include their associated keybindings in parentheses. The "Replace" and "Replace All" buttons in the Replace Input box don't display keyboard shortcuts.</p>
<p dir="auto">I looked into this a bit before creating an issue, and the solution isn't the simple "look up keybinding --&gt; add to label" approach that I hoped for. It looks like Replace and Replace All don't actually have keybindings defined. Instead, the keys are hardcoded into the <code class="notranslate">_onReplaceInputKeyDown()</code> method of <a href="https://github.com/Microsoft/vscode/blob/85de39a54d78de5d247b57d1e2c50cc81192212e/src/vs/editor/contrib/find/browser/findWidget.ts#L284-L292">findWidget.ts</a>.</p>
<p dir="auto">I would like to see Replace and Replace All get configurable keyboard shortcuts. The defaults would come from the existing hardcoded values, so the core functionality would be unchanged. With configurable keyboard shortcuts it would be easier to display them cleanly on the Replace and Replace All buttons, and we get some flexibility as a free bonus.</p>
<p dir="auto">I would like to implement this and submit a PR, but wanted to document and perhaps discuss the issue first to make sure that sort of contribution would be OK. Some comments in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="118194155" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/406" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/406/hovercard" href="https://github.com/microsoft/vscode/issues/406">#406</a> brushed up against what I'm suggesting here, but I didn't find any other potential duplicate issues.</p>
<p dir="auto">Hi there,</p>
<p dir="auto">This happens in 10.8, and it also happened in the last one before that.</p>
<p dir="auto">How to reproduce;</p>
<ul dir="auto">
<li>Create a new extension via "yo code". I went with a TypeScript extension.</li>
<li>Replace the command implementation with something like this:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="     let disposable = vscode.commands.registerCommand('extension.sayHello', () =&gt; {

        var editor = vscode.window.activeTextEditor;
        if(!editor) {
            return;
        }

        var output = vscode.window.createOutputChannel(&quot;regex test&quot;);

        var count = 0;
        for(var i=0; i &lt; editor.document.lineCount; i++)
        {
            var line = editor.document.lineAt(i).text;

            if(line.match('vscode')) {
                console.log('Line matches: ' + line);
                output.appendLine(line);
                count++;
            }

        }

        output.show();

        vscode.window.showInformationMessage('Found ' + count + ' matches');    
    });
"><pre class="notranslate"><code class="notranslate">     let disposable = vscode.commands.registerCommand('extension.sayHello', () =&gt; {

        var editor = vscode.window.activeTextEditor;
        if(!editor) {
            return;
        }

        var output = vscode.window.createOutputChannel("regex test");

        var count = 0;
        for(var i=0; i &lt; editor.document.lineCount; i++)
        {
            var line = editor.document.lineAt(i).text;

            if(line.match('vscode')) {
                console.log('Line matches: ' + line);
                output.appendLine(line);
                count++;
            }

        }

        output.show();

        vscode.window.showInformationMessage('Found ' + count + ' matches');    
    });

</code></pre></div>
<ul dir="auto">
<li>Press F5 to open a new Code window with the extension running as part of it.</li>
<li>Paste some text into the window, where some lines will match. I just pasted the source code from the first window into the new one.</li>
<li>Run the extension - F1 then hello, and press enter.</li>
</ul>
<p dir="auto">At least on my machine, this correctly finds the expected lines. The console log output is called only once per line.</p>
<p dir="auto">However, in the OutputChannel, I see something strange. Let us for clarity say that this was the expected output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1
2
3
4
5
6
7
8
9"><pre class="notranslate"><code class="notranslate">1
2
3
4
5
6
7
8
9
</code></pre></div>
<p dir="auto">Then this would be the actual output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9"><pre class="notranslate"><code class="notranslate">1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
</code></pre></div>
<p dir="auto">In other words, it duplicates all the output lines except for the first one.</p>
<p dir="auto">I created a new test project to reproduce this and it behaved the same way.</p>