[Qt-creator] Find/replace keys

Eike Ziller Eike.Ziller at qt.io
Fri Feb 8 10:30:19 CET 2019



> On 7. Feb 2019, at 21:55, Jason H <jhihn at gmx.com> wrote:
> 
> OSX, Qtc 4.8.1, Dell Keyboard 
> On the docked find/replace panel, I've noticed that if I use home/end on the keyboard it doesn't work, but if I use ctrl-left/right it works as home/end. Meanwhile In the source code editing area home/end keys work as they should.

You probably changed the keyboard shortcuts in Prefs > Environment > Keyboard for the code editor (since that is not macOS’s default behavior, which is instead to go to the start/end of the document).
These shortcuts are (so far?) unfortunately not used by any of the “normal” QLineEdit based input fields (i.e. anywhere outside the editors).

> Has anyone else noticed this? What would it take to get home/end to work in those lineedits?

I think these input fields (as well as locator and the “path chooser” input fields that we show in some dialogs + options) are Utils::FancyLineEdits, so at least that provides a common base (that is under control of Qt Creator code).
Unfortunately the code for making these use the shortcut settings cannot directly added to this class as it is, since the shortcut code is in Core plugin which Utils cannot access.
Otherwise adding the use of the shortcuts to these involves some work: Each of the widgets needs an IContext registered for it, and the shortcuts must be registered for these contexts.

Bottom line: Conceptually possible, but involving some work. I’ve created https://bugreports.qt.io/browse/QTCREATORBUG-21959

From the viewpoint of macOS it would be much nicer if Qt could finally respect StandardKeyBinding.dict ... https://bugreports.qt.io/browse/QTBUG-393

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list