Bug 102307 - F3 is hardcoded as Find next but not defined as the shortcut for uno:RepeatSearch
Summary: F3 is hardcoded as Find next but not defined as the shortcut for uno:RepeatSe...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:27.2.0
Keywords:
Depends on:
Blocks: Shortcuts-Accelerators Find-Search
  Show dependency treegraph
 
Reported: 2016-09-20 06:50 UTC by mahfiaz
Modified: 2026-07-20 21:48 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mahfiaz 2016-09-20 06:50:44 UTC
1. Open Calc or Writer
2. Ctrl + F to open quick search toolbar and activate
3. Search something, end with Enter
4. Press F3 to find next
5. Click inside document
6. Press F3 to find again. No boom. Either nothing happens or F3 has another use now.

I think whatever shortcut we use (F3 and Ctrl+G are generally common ones), it should work even when cursor is not inside search box.
Comment 1 V Stuart Foote 2016-09-21 18:14:43 UTC
F3 is undefined--both Globally and in Calc--it has no Find function in LibreOffice.

And, <Ctrl>+G *is* the defined shortcut for "Repeat Search" and functions from the Find toolbar (<Ctrl>+F) and the Find & Replace dialog (<Ctrl>+H)

You can of course customize your Keyboard to assign F3 to Repeat Search if you prefer--but we wont make it a default assignment as that would duplicate the <Ctrl>+G already used.
Comment 2 mahfiaz 2016-09-25 05:57:48 UTC
Put cursor back to search box and F3 will work (until your cursor is there). That's the problem.
Comment 3 V Stuart Foote 2016-09-25 16:24:13 UTC
As mentioned the behavior you seek is *already* provided with a customizable short cut assigned to the "Repeat Search" action--i.e. .uno:RepeatSearch.

On Windows builds that is already <Ctrl>+G by default, and on RPM builds it is to <Ctrl>+<Shift>+F; simply set the shortcut you prefer from Tools -> Customize -> Keyboard: Edit Functions, "Repeat Search"

F3 is *not* assigned to a LibreOffice search related shortcut action in any module, nor used in LibreOffice globally for an action. 

It has some specific uses--notably in Calc to move between errors, and in Draw/Impress to enter a group of objects.

The behavior of the F3 key executing find--e.g. .uno:RepeatSearch--while in the FindBar with cursor focus in the TextFind widget is anomalous in that it is not assigned as a shortcut, but is being parsed in the source code of the widget. This anomoly is present in both Windows and Linux builds and affects Writer and Calc.

Adjusting summary for that issue.
Comment 4 mahfiaz 2016-09-25 16:31:57 UTC
I think whatever happens should be consistent. So I vote for removal of F3 doing anything in this context.
Comment 5 QA Administrators 2017-10-23 14:14:00 UTC Comment hidden (no-value, obsolete)
Comment 6 mahfiaz 2019-03-30 18:05:19 UTC
It still happens in 6.2.2.2

svx/source/tbxctrls/tbunosearchcontrollers.cxx@269

            // Execute the search when Return, Ctrl-G or F3 pressed
            if ( KEY_RETURN == nCode || (bMod1 && (KEY_G == nCode)) || (KEY_F3 == nCode) )

should be:

            // Execute the search when Return or Ctrl-G is pressed
            if ( KEY_RETURN == nCode || (bMod1 && (KEY_G == nCode)) )
Comment 7 QA Administrators 2021-03-30 03:39:20 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2023-03-31 03:29:17 UTC Comment hidden (obsolete)
Comment 9 mahfiaz 2023-03-31 07:50:57 UTC
The bug is still there in 7.5.2.2. The patch is in my previous comment.
Comment 10 QA Administrators 2025-03-31 03:12:09 UTC Comment hidden (obsolete)
Comment 11 V Stuart Foote 2025-03-31 11:39:56 UTC
My comment 1 and comment 3 regards the UNO assignment were off topic.

For legacy Find use, the F3 key is hardcoded (as Key_F3) assigned at tbunosearchcontrollers.cxx#301 to activate the Find bar, so non-customizable.

<F3> and <Shift><F3> Find next and find previous movements are held over from legacy MS Word handling (since removed IIUC), but they remain in common use, e.g. for Notepad and the Visual Basic Editor as well as new Visual Studio Code for Find Next and Find Previous. 

However, case can be made as in OP that behavior seems wrong. But not the assignment of the <F3>, but that its behavior changes depending on *edit cursor* focus.

When the Find bar tb has edit cursor focus, the <F3/Shift+F3> pair perform the next/previous Find actions. But with Find tb open, but edit cursor shifted onto canvas, the text at cursor position becomes the new search target and throws an info warning 'AutoText for shortcut <selected text> not found'.

And when UI is not focused to document canvas (e.g. is on Main menu or Std Toolbar)--the F3 pair then have no action.

Likewise get the same behavior when edit cursor is not on the Find bar affecting the <Ctrl>+G/<Shift><Ctrl>+G Find next/previous shortcuts. Except that the <Ctrl>+G is now assigned and when on document canvas now launches the GoTo page dialog.

A this point, I don't think removing the <F3> pair would be correct, it is not a bug. They are valid common shortcut. But maybe should be bound to the Find bar being open even if unfocused, and the Find next/previous not dependent on edit cursor and UI focus placement? 

As in OP "... it should work even when cursor is not inside search box."
Comment 12 V Stuart Foote 2025-03-31 11:56:53 UTC
(In reply to V Stuart Foote from comment #11)

>... But with Find tb open, but edit cursor
> shifted onto canvas, the text at cursor position becomes the new search
> target and throws an info warning 'AutoText for shortcut <selected text> not
> found'.

And that looks to be a collision with the AutoText feature in Writer for the .uno:ExpandGlossary 'Run Auto Text Entry'. 

Hmm, I'd imagine the F3 as Find Next really does need to be bound to focus of the Find bar as is, and this becomes a Wont fix.
Comment 13 Heiko Tietze 2025-03-31 12:32:11 UTC
There might be conflicts but I see no good reason for hard-coded shortcuts.
Comment 14 V Stuart Foote 2025-03-31 13:18:42 UTC
(In reply to Heiko Tietze from comment #13)
> There might be conflicts but I see no good reason for hard-coded shortcuts.

You mean liike <F6> and <F10>? ;-)  

Or even <F1>, <Ctrl>+W, <Ctrl>+Q, <Ctrl>+C, <Ctrl>+V, <Ctrl>+X, <Ctrl>+F, <Ctrl>+H, and etc. [1]

Hard-coded are user expectations, warts and all including headache(s) of localization(s).

=-ref-=

[1] https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Text_editing
Comment 15 Justin L 2026-07-11 23:57:42 UTC
(In reply to V Stuart Foote from comment #3)
> The behavior you seek is *already* provided with a customizable
> short cut assigned to the "Repeat Search" action--i.e. .uno:RepeatSearch.
> 
> On Windows builds that is already <Ctrl>+G by default, and on RPM builds it
> is to <Ctrl>+<Shift>+F;
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu

<node oor:name="F_SHIFT_MOD1" oor:op="replace">
    <prop oor:name="Command">
    <value xml:lang="x-no-translate">L10N SHORTCUTS - NO TRANSLATE</value>
    <value xml:lang="en-US" install:module="unxwnt">.uno:RepeatSearch</value>
    </prop>
</node>
<node oor:name="G_MOD1" oor:op="replace">
    <prop oor:name="Command">
    <value xml:lang="x-no-translate">L10N SHORTCUTS - NO TRANSLATE</value>
    <value xml:lang="en-US">.uno:RepeatSearch</value>
    <value xml:lang="es">.uno:Save</value>
    </prop>
</node>
</node>
Comment 16 Justin L 2026-07-14 01:58:41 UTC
(In reply to Heiko Tietze from comment #13)
> I see no good reason for hard-coded shortcuts.
I currently see excellent reasons for hard coded shortcuts.
- .uno:RepeatSearch (Ctrl-Shift-F) currently doesn't work when in the quick find.
- F3 is practically a Windows/Linux standard for Find Next (MS Word being a notable exception).
- Ctrl-G is a Mac and Linux/Gnome standard for Find Next

(I documented this a bit more in bug 70001.) So utilising the user's muscle memory is an excellent accomplishment in quick find.

(In reply to V Stuart Foote from comment #3)
> On Windows builds that is already <Ctrl>+G by default
That should say 'On Mac builds ...'. For Unix/Windows it is Ctrl-Shift-F AFAICS.


I agree with Comment 12: WONTFIX - except to have .uno:RepeatSearch ALSO work in the quick find (as well as implementing bug 47122).

I could also imagine adding hardcoded Shift-F4 and Ctrl-Alt-Y (the MS Word shortcuts for Find Again).

Apparently MS Word also has a BrowseNext (Ctrl-PageDown) and BrowsePrev (Ctrl-PageUp). Those would also make good sense.
Comment 17 Commit Notification 2026-07-14 01:59:21 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/25ff7de2f7dc9557366954482c9d735a7e9a6f7e

tdf#102307 quick find: also use .uno:RepeatSearch to find next

It will be available in 27.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2026-07-14 11:32:11 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6e873ec987caeb78086c55607540971a4f9c9141

tdf#102307 quick find: add hard-coded MS Word keyboard shortcuts

It will be available in 27.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2026-07-20 21:48:19 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3552e250f442f4b7da207233faf8e7b8bdbcf049

tdf#102307 quick find: add hard coded keyboard shortcut to label

It will be available in 27.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.