Bug 42437 - Enable the macOS press-and-hold functionality for special character input (é, ñ, etc.)
Summary: Enable the macOS press-and-hold functionality for special character input (é,...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: All macOS (All)
: high enhancement
Assignee: Patrick Luby (volunteer)
URL:
Whiteboard: target:7.6.0 target:7.5.0.2 target:7.5.1
Keywords:
: 49967 98364 109154 121319 123664 133895 (view as bug list)
Depends on:
Blocks: macOS-UI-polish
  Show dependency treegraph
 
Reported: 2011-10-31 08:14 UTC by Mathias Foehr
Modified: 2023-02-25 22:26 UTC (History)
19 users (show)

See Also:
Crash report or crash signature:


Attachments
TextEdit and NeoOffice Write in comparison (58.24 KB, image/png)
2013-11-17 14:18 UTC, Dennis Roczek
Details
clip of the Special Characters split button with Favorites and Recents character picker (7.90 KB, image/png)
2021-05-08 15:11 UTC, V Stuart Foote
Details
Screen snapshot of Writer with press-and-hold patch (293.62 KB, image/png)
2022-12-21 14:14 UTC, Patrick Luby (volunteer)
Details
Screen snapshot of Writer with press-and-hold patch - Patchset 4 (279.33 KB, image/png)
2022-12-22 13:40 UTC, Patrick Luby (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Foehr 2011-10-31 08:14:12 UTC
On most programs in OSX, if you press for example e, and keep your finger on the key, a small "window" appears and permits you to select various accented versions of this character. 

You can test this in TextEdit, TextMate, Microsoft Word or Matlab.

It's not a general solution to keyboard problems. But it is helpful, if you have the wrong keyboard for the language written or if you have to write a name with foreign accents.

Unfortunately, this does not work in LibreOffice. 

I would like to thank you for this program I use with great pleasure and which is definitely very helpful to me

Best reagrds, Mathias
Comment 1 Roman Eisele 2012-05-31 02:22:06 UTC
@Mathias Foehr:
Thank you very much for your report/request! I'm sorry that it was not processed earlier (we have few MacOS X users in the QA team, of course).

The functionality you mention was introduced with MacOS X 10.7, right? (At least I don't see it in MacOS X 10.6).

*

I can confirm that this functionality does not work in LibreOffice, therefore setting the Status of this report to NEW.

I change the Summary to make it easier to see that this is a feature request.
Comment 2 Don't use this account, use tml@iki.fi 2013-08-06 07:22:17 UTC
*** Bug 49967 has been marked as a duplicate of this bug. ***
Comment 3 Dennis Roczek 2013-11-17 13:54:30 UTC
I have access to a Mac OS X 10.7.5 macbook pro: I can confirm that this is common in most applications and should be integrated into LibO. (dunno when this feature was introduced, I don't have access to any other versions right now)
Comment 4 Dennis Roczek 2013-11-17 14:18:28 UTC
Created attachment 89361 [details]
TextEdit and NeoOffice Write in comparison

Just for the record: I just installed NeoOffice 3.4 and they have that feature included but sadly that way that you have to click e long and that many eeees will be produced until the optional characters are displayed. In TextEdit only one e is added and the "popup" is displayed. 

With super reaction someone is able to post only three "e"s in the new document until the popup is displayed. see additional the cropped screenshot.
Comment 5 Fred 2015-09-05 12:56:53 UTC
OSX has had the ability to easily enter accented characters since 10.7, which is a great help to anyone who writes in more languages than just English.  This is supported in ANY OSX application, with the sole and remarkable exception of LibreOffice as well as OpenOffice.  A search on Google for the issue produces enough hits to suggest it's no longer a trivial 'enhancement', OSX based newcomers to LibreOffice now flag this as a bug with a fairly direct and critical impact on usability for multilingual use.

Online recommendations to "use another editor" such as MS Office or Pages (which both do support the accented character facility) can now be found, but are naturally rather unhelpful to people like us that seek to promote LibreOffice everywhere they go and work.  

Please help us to help you*.  Cheers, D

* Happy to beta test, am using OSX 10.10.5.
Comment 6 Adolfo Jayme Barrientos 2016-03-03 04:46:21 UTC
*** Bug 98364 has been marked as a duplicate of this bug. ***
Comment 7 V Stuart Foote 2016-03-03 05:09:31 UTC
Sorry, but this is *NOT* a bug as supporting "this or that" OS X Cocoa NSObject widget implements by Apple requires development effort beyond the core cross platform code in LibreOffice.

Yes, support for the OS X PressAndHold.app added by Apple at 10.7 (Lion) is a reasonable enhancement that requires a developer with interest in native OS X Cocoa widgets to take an interest.

It is already an "OS X Shine and glow" meta.

Until then, the LibreOffice Special Character dialog supports this use requirement, and its capabilities are being actively improved. Admittedly it will never be as seamless as PressAndHold may be for OS X users, but until a developer takes on this enhancement it is what is available cross platform.
Comment 8 Adolfo Jayme Barrientos 2017-08-08 15:11:01 UTC
*** Bug 109154 has been marked as a duplicate of this bug. ***
Comment 9 Fred 2017-08-11 05:56:54 UTC
(In reply to V Stuart Foote from comment #7)
> Sorry, but this is *NOT* a bug as supporting "this or that" OS X Cocoa
> NSObject widget implements by Apple requires development effort beyond the
> core cross platform code in LibreOffice.

No, I would define this as standard functionality expected by users of the platform.  Key to OSX and macos is usability, which also happens to be one of the guiding arguments to install LibreOffice in the first place because it has a more stable UI.

> Yes, support for the OS X PressAndHold.app added by Apple at 10.7 (Lion) is
> a reasonable enhancement that requires a developer with interest in native
> OS X Cocoa widgets to take an interest.
> 
> It is already an "OS X Shine and glow" meta.

Does this mean there already is a possibility to enable this functionality for macos but you omit this deliberately?

> Until then, the LibreOffice Special Character dialog supports this use
> requirement, and its capabilities are being actively improved.

With all due respect, that "support" could do with a lot of improvement for anyone who has to use this functionality for more than once in a day so I would welcome an update on what improvements are underway.  It's not like this bug has only been outstanding for a few days.

Anyone who works in more languages than just English needs this.  Improvements which macos already provides but maybe it would be better to replicate this approach so all platforms can enjoy it.  In that case, it also needs to be as optional as it is for macos - I would not allege Apple's approach to be perfect either (as it swaps key repeat for selected keys with accent functionality) but it's a factor better than the current functionality in LO.

For the moment, it means that people who write more than occasionally in non-English languages are not served well in LibreOffice, a fact also illustrated by the update process that is sufficiently non-trivial for those who have the temerity not to speak American (as opposed to English) to disqualify it for serious end user deployment (and yes, I'll file a bug for that in a minute).

> will never be as seamless as PressAndHold may be for OS X users, but until a
> developer takes on this enhancement it is what is available cross platform.

Isn't there a conditional in the compiler so you can tell it to use this input function when compiling for macos?  It's not just that LibreOffice functionality isn't as useful, it means that on macos, the use LibreOffice effectively reduces functionality that users expect and that does not help deployment in multi-lingual environments.  

It's OK if you have, for instance, LO in a language of the country itself because keyboards typically support all accents directly - a classic example of that is the Swiss keyboard that has to support several languages at once and is thus a pain to use for programming, or the French who use AZERTY (which always takes me a few minutes to get used to), but users who operate in English and have an English keyboard - well, they're stuck.  Not just in macos.
Comment 10 Cœur 2017-12-08 03:47:38 UTC
This is a serious, long lasting issue.
As reported on https://apple.stackexchange.com/questions/308104/activate-pressandhold-for-libreoffice-or-openoffice, it is basically the only text editor or macos app with this text input issue for non-English languages.

The only known alternative we have is to use Microsoft Office for Mac in the mean time, which is quite an expensive solution just to get default keyboard input support.
Comment 11 Fred 2017-12-08 05:39:57 UTC
"The only known alternative we have is to use Microsoft Office for Mac in the mean time, which is quite an expensive solution just to get default keyboard input support"

With all due respect for the covert Microsoft advertising, there IS an alternative with both better price and usability à la LibreOffice: NeoOffice, which is compiled specifically for MacOS.

Not only does that solve the foreign language input (which, I must add, I agree with you as a tragic and frankly embarrassing omission), but it also solves the installer and update conundrum: it is ONE file, which installs for all supported languages, and an update is user compatible too in that it is again one action that does not destroy the language settings of the user (which in LO/OO requires an extra action post language pack installation).

In other words, if you want a non-Englisg speaker to install LibreOffice on Mac, the NeoOffice derivative is more than worth its frankly puny donation, to the point of making me consider to make it a standard part of our office build and pay the guy a bit more per unit for the hassle he saves us.  But I digress.

n summary, agree with the foreign language input, but there ARE alternative solution that do not involve paying a tithe to Redmond for ruining your productivity :).
Comment 12 Fred 2018-10-08 22:05:36 UTC
With the arrival of MacOS 10.14 Mojave I think we can now consider this a bug instead of a mere feature request as this has been outstanding since MacOS 10.7, or since LO v3.4.3, or maybe the observation that this bug will celebrate its sixth anniversary in the system at the end of the month may be sufficiently illustrative.

Is something really still a "feature request" if non-implementation actively conflicts with usability on a platform usability?  Has anyone actually tried to use LO's native facility which is, umm, not quite as useful?

I suspect that this request got buried under all the other fun stuff added to LO to bring it to v6, so I'm pulling from underneath the pile, dust if off a bit and put it back where it can be seen, faded as it has become over time..
Comment 13 V Stuart Foote 2018-10-08 22:21:34 UTC
Sorry it is still an enhancement, as with comment 7 all the wishing in the world will not materialize a dev to integrate support of a native NSObject PressAndHold.app

Otherwise the LibreOffice special character dialog and the <alt>+X Unicode toggle are what is provided.
Comment 14 Marc Grober 2018-10-08 22:27:47 UTC
Lions and Tigers and Bears! The last time I made an irreverent comment such as yours about ancient OSX bugs and engaged in a bit of Civil Disobedience (35361) I was roundly scolded, rofl...

Bottom line is that apparently there are not a lot of people who want to work on these OSX issues so they just get ignored.
Comment 15 Fred 2018-10-09 07:03:31 UTC
Oh, I don't mind prodding the bears a bit if it sorts out a problem - hopefully I didn't poke too hard as it was more meant as a bit of good natured ribbing. I am principally against blatting people who do free work for a community because that feels rather ungrateful. 

If it is more a matter of someone with MacOS background assisting to get this in place rather than not-invented-here syndrome I have some semblance of an answer and can now see if I can find someone who wants to assist.

I'll just use NeoOffice for now, but I'll have a look around for someone who could pick this up.

I'll be back ( ™1984 by Schwarzenegger)..
Comment 16 Alex Thurgood 2018-10-09 07:49:17 UTC
(In reply to Fred from comment #15)

Hi Fred,

> If it is more a matter of someoneth MacOS background assisting to get
> this in place rather than not-invented-here syndrome I have some semblance
> of an answer and can now see if I can find someone who wants to assist.
> 

The project definitely has a lack of devs who are comfortable/familiar with the specifics of MacOS development - the more merrier, if you can manage to bring any on board, it would be most welcome !
Comment 17 Aron Budea 2018-11-09 19:44:51 UTC
*** Bug 121319 has been marked as a duplicate of this bug. ***
Comment 18 Alex Thurgood 2019-02-25 09:14:33 UTC
*** Bug 123664 has been marked as a duplicate of this bug. ***
Comment 19 jdhartung 2019-02-25 10:29:26 UTC
Reading through the comments here after posting my own request for the feature (and having it linked to this thread), I see that many other commenters see the need for it. Some of them stated the need much more eloquently than I. I understand the need for development to take care of other more important things first, but I must agree that the implementation of this feature is way overdue.
Comment 20 jdhartung 2019-02-25 10:30:50 UTC Comment hidden (obsolete)
Comment 21 Alex Thurgood 2019-02-25 11:02:03 UTC
*** Bug 123664 has been marked as a duplicate of this bug. ***
Comment 22 Xisco Faulí 2019-12-02 11:07:34 UTC
Changing priority to 'high' since the number of duplicates is 5 or higher
Comment 23 V Stuart Foote 2020-06-11 13:39:32 UTC
*** Bug 133895 has been marked as a duplicate of this bug. ***
Comment 24 jdhartung 2021-05-08 13:58:01 UTC
Thank you to all the wonderful people who make Open Office great! Just downloaded 7.1.3 though and am sorry to see that once again my hopes for this feature have been dashed. If it was finally fixed, I was set to make a substantial donation to the project as a Thank You. But the lack of this one feature (I live in a Spanish speaking country and write in this language every-single-day) is a time consuming daily issue for me. Maybe you can see your way clear to seek some help in fixing this. It's been 10 years now and there are many others who have also asked for this basic functionality. Will definitely donate to the project then.
Comment 25 V Stuart Foote 2021-05-08 15:11:36 UTC
Created attachment 171786 [details]
clip of the Special Characters split button with Favorites and Recents character picker

(In reply to jdhartung from comment #24)
The LibreOffice projcet is great, as are members of its world wide Community brought together by the Document Foundation.

The functionality is provided, just not via the native macOS PressAndHold.app

The Favorites & Recents of the 'Insert Special Characters' split button provides the same feature cross platform.  Add what you need to Favorites, and the Recents will keep a running usage (though it could use a tweak or two, 
see bug 120753)

Otherwise code submission to integrate the Apple NSObjet widgets are always welcome, and there are opportunities to hire developers to do the work--either from the LibreOffice community or at large.
Comment 26 Patrick Luby (volunteer) 2022-12-20 20:13:09 UTC
I have implemented the press-and-hold special character feature in the following patch:

https://gerrit.libreoffice.org/c/core/+/144630

The patch needs still needs to be reviewed and tested before it appears in a nightly build. But if there any people who have a macOS LibreOffice build that can test the patch, that would be very much appreciated.
Comment 27 Patrick Luby (volunteer) 2022-12-21 14:14:43 UTC
Created attachment 184295 [details]
Screen snapshot of Writer with press-and-hold patch

I have attached a screen snapshot of LibreOffice running with my press-and-hold patch.
Comment 28 Patrick Luby (volunteer) 2022-12-22 13:40:48 UTC
Created attachment 184320 [details]
Screen snapshot of Writer with press-and-hold patch - Patchset 4

I have made some changes to the press-and-hold special character feature and I have posted Patchset 4 with the changes:

https://gerrit.libreoffice.org/c/core/+/144630

In this latest patch, I was able to replace the hacky behavior of highlighting the character with the default macOS behavior: the character is committed and the cursor is moved after the character. Now, only when you use the arrow keys to select an item from the special character input method popup will the character be highlighted.

The patch needs still needs to be reviewed and tested before it appears in a nightly build. But if there any people who have a macOS LibreOffice build that can test the patch, that would be very much appreciated.
Comment 29 Commit Notification 2022-12-22 16:44:33 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1e4ef6d69b22f6674aefb415edf2e8e7ca78ff2d

tdf#42437 Enable press-and-hold special character input method

It will be available in 7.6.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 30 Patrick Luby (volunteer) 2023-01-05 16:28:35 UTC
Is there any chance that the bug fix can be included in LibreOffice 7.5?

If yes, I have submitted and tested the following patch for the libreoffice-7-5 branch:

https://gerrit.libreoffice.org/c/core/+/145009
Comment 31 Commit Notification 2023-01-06 20:42:15 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/d8f358656e1c78c479a417adab12eaee190d3fe7

tdf#42437 Enable press-and-hold special character input method

It will be available in 7.5.0.2.

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 32 Patrick Luby (volunteer) 2023-01-17 20:56:14 UTC
Reopening this bug as I found that my fix has the following unexpected behavior: pressing and holding any arrow keys in a Calc document will insert a rectangular glyph. I assume my code needs special handle repeating arrow keys.
Comment 33 Patrick Luby (volunteer) 2023-01-17 21:39:22 UTC
I have posted a fix for the press-and-hold arrow keys bug that I found in comment 32:

https://gerrit.libreoffice.org/c/core/+/145689

It is not in the nightly build yet so please wait for the commit to be posted to this bug.
Comment 34 Commit Notification 2023-01-17 22:21:30 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ef558d0aab44421ad5cd8362724ff1410af1b480

Related: tdf#42437 Skip special press-and-hold handling for action keys

It will be available in 7.6.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 35 Commit Notification 2023-01-18 00:14:40 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/55965358a39120e078820c67a6a5adfa3caec382

Related: tdf#42437 Skip special press-and-hold handling for action keys

It will be available in 7.5.1.

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 36 Commit Notification 2023-01-19 13:47:58 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-0":

https://git.libreoffice.org/core/commit/d6958883a48d5ed4774b558f5e1fe9f878b7d2f5

Related: tdf#42437 Skip special press-and-hold handling for action keys

It will be available in 7.5.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 37 Patrick Luby (volunteer) 2023-01-19 15:27:54 UTC
My fix for pressing and holding arrow keys (and other action keys) is now in the nightly build. Can anyone verify that the pressing and holding works as expected on your machine?
Comment 38 Alex Thurgood 2023-01-24 09:47:52 UTC
Verified fixed with

Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: 7f23dae00fedc9d7119b44b6c44d9eca4f8c87b8
CPU threads: 8; OS: Mac OS X 13.0.1; UI render: Skia/Metal; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded


Thanks Patrick for fixing this longstanding issue !
Comment 39 Wim M 2023-01-24 10:35:45 UTC
I also want to thank Patrick for fixing this and many other macOS-related issues in the upcoming 7.5 release and beyond. It has already made my life a lot better.

I also suggest that an entry is added to the release notes for this and various other improvements; I am not sure who is supposed to and will be happy to do so if anyone is allowed to add to the wiki.
Comment 40 Fred 2023-01-24 19:58:20 UTC
Patrick, thank you very much for donating the code to make this work.
Comment 41 Eric Theise 2023-02-25 22:26:45 UTC
I'll add my voice to the chorus: thank you Patrick. Absurd that this should feel like it yields a huge productivity boost but it does.