1

The PressAndHold plists are now (Ventura) in /System/Library/Input Methods/PressAndHold.app/Contents/PlugIns/PAH_Extension.appex/Contents/Resources/

Long ago (with help from here), I managed to get PressAndHold functionality added to Unicode Hex Input and called it UHI+. It almost looks like it is still using the old version. However, I looked for a file containing the string "à á â ä æ ã å ã ā" in /System, /Library, and /Users (including my custom input method) and didn't find it!

Is there a way to make an input method to use the file in /Library instead of the one in /System?

Update: There is one in /System, and it is the one being used. My grep -l did not find it because it is now binary format. But it is not in the same path as in previous O.S. versions. Now in /System/Library/TextInput/TextInput_en.bundle/Versions/A/Resources/Keyboard-en.plist which is read-only. I've edited the question due to this.

Note: There are hundreds of questions relating to PressAndHold,  Because of this (and because they're all for previous O.S. versions), I chose to write a new one rather than piggy-back on an old one which no longer applies (since Apple keeps changing the path and format).

WGroleau
  • 4,869
  • 7
  • 44
  • 77
  • Third-party mods shouldn't (can't) be in /System, so /Library/Input Methods seems like a good place. – benwiggy Dec 13 '22 at 12:10
  • According to answers in other questions, it used to be in /System. I don't remember where it was when I modified mine, but I do remember it was under SIP. – WGroleau Dec 13 '22 at 17:08
  • And it is still in /System but not where previous versions had it. – WGroleau Dec 13 '22 at 17:41
  • What is your question? Keyboards should have press and hold options according to whatever plist corresponds to the language code in their bundle form. So you should be able to add these to Unicode Hex by creating a duplicate of that keyboard in bundle form with the language set to "en". Does that no longer work? – Tom Gewecke Dec 13 '22 at 18:19
  • My question is in bold. I did what you suggest when you suggested it long ago. Unfortunately, not only is the file under SIP, making alterations a proctalgia, but Apple frequently overwrites it by Software update. (And they change the path to it frequently.) – WGroleau Dec 13 '22 at 18:25
  • Library/Input Methods should normally be empty, unless the user has added one of their own. I can't imagine any way that a keyboard could be made to use a .plist located there. If you want to change the press/hold options from what you get by just setting a keyboard to "en" or some other language code, I think you have to somehow edit the stuff in that new system/library/textinput location. – Tom Gewecke Dec 13 '22 at 20:29
  • Well, it isn't using that one, though I think it was not put there by me. Can't be sure years after. The only way to edit either one is to first disable SIP. And do it again every time there's an O.S. update. – WGroleau Dec 14 '22 at 00:46

2 Answers2

1

For reference, the previous answer on how to modify the Accent Menu is here.

In Monterey,the location of the .plist that needs to be edited is the same as indicated in that answer. It's definitely valuable to know the new location you have discovered for Ventura.

Unfortunately Apple has made it increasingly difficult to modify these files.

As far as I know, there's no way have to have the accent menu of a keyboard layout reflect anything other than one of the language specific .plists located in System/Library. Normally which accent menu a keyboard uses depends on the language code specified in its .bundle format.

Tom Gewecke
  • 20,864
  • My AppleCare is almost expired. I think I'll use it to pressure Apple for a way to override or supplement the protected system definition. Not holding my breath—they have been remarkably UNhelpful with any other issue I've had, including how trying to launch Photos shuts down the MacBook. – WGroleau Dec 14 '22 at 00:49
0

For now, I'll have to say the same as Tom: "As far as I know, there's no way." I succeeded in an earlier version by the proctalgic method of rebooting to disable SIP, installing my change, and rebooting with SIP re-enabled. But soon after, a Software Update reversed my change. Not to mention how many times Apple has changed the location of the files.

And now, according to the article Tom cited, doing it the first time will break the whole system.

Putting my version of the file in /Library didn't work then and doesn't work now. The /System file will still define the pop-ups. I was able to use sudo & rsync to duplicate /System/Library/TextInput as /Library/TextInput, convert the file to xml, edit, and convert back. After reboot, the pop-ups still use the /System definition.

If I can find some Apple documentation on how this thing works, maybe I can figure out a way to do it.

WGroleau
  • 4,869
  • 7
  • 44
  • 77