Commit graph

718 commits

Author SHA1 Message Date
Shawn Schantz
0b16eeff80 externalize strings for alerts and download status 2021-10-14 14:28:45 +07:00
Shawn Schantz
163446be06 enabled support for i18n and externalized alert strings 2021-10-13 14:31:30 +07:00
Marc Durdin
3219b44624 chore: sentry.io dsn 2021-10-04 15:01:36 +11:00
Darcy Wong
c10fee5d26
Update mac/help/start/install-keyman.md
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-09-30 15:34:48 +07:00
Darcy Wong
394b33da9c docs(mac): Reorder install instructions 2021-09-30 14:04:26 +07:00
Darcy Wong
b138aab3a1 docs(mac): Tweak install instructions 2021-09-29 09:06:15 +07:00
Darcy Wong
de475b8602 docs(mac): Add note about installing with homebrew 2021-09-29 08:45:45 +07:00
Marc Durdin
3d7a32968b chore(mac): update build setup notes for M1 2021-09-17 10:29:25 +10:00
Marc Durdin
ef12db7cf4 chore(mac): include all sources in makefile 2021-09-16 09:21:30 +10:00
Marc Durdin
16dd8f5b23 fix(mac): prioritise arm64 for script 2021-09-16 07:07:54 +10:00
Marc Durdin
8399f4638b fix(mac): add support for M1 processor
Fixes #5700.

Adds support for arm64 (M1) to textinputsource in the Keyman app. All
other executables are already fat with support for both x86_64 and
arm64.
2021-09-16 06:17:58 +10:00
Marc Durdin
e22ce72442
Merge pull request #5324 from keymanapp/docs/shared-build-docs
docs: start consolidation of build config docs
2021-07-01 11:57:09 +10:00
Marc Durdin
a0ca8ea9fc
Merge pull request #5328 from keymanapp/fix/mac/5316-kmp-inf-encoding
fix(mac): kmp.inf is windows-1252
2021-06-22 14:10:01 +10:00
Marc Durdin
643d6da144 fix(mac): .kmx max file version is now 0x0E00 (14.0)
Fixes #5316.

Keyman for macOS did not recognise the updated version number 0x0E00,
which is version 14.0. There are no changes to the file format which
impact Keyman for macOS -- the only change is support for notany and
context for Keyman Engine for Web.
2021-06-22 07:10:39 +10:00
Marc Durdin
f56beba185 fix(mac): kmp.inf is windows-1252
Relates to #5316.

Keyman for mac is still reading from kmp.inf, but was treating it as
UTF-8. However, it is windows-1252 encoding. This was stopping Keyman
from loading the file due to the presence of a (C) symbol.

Keyman for mac *should* be loading kmp.json. This needs to be addressed
as a separate issues.
2021-06-22 07:08:08 +10:00
Marc Durdin
4af39a58b0 docs: start consolidation of build config docs
As the build environment documentation is duplicated across each of the
Keyman platform projects, it has become somewhat convoluted and
inconsistent. This PR moves all the mac-based and shared documentation
into docs/build, with placeholders for Windows and Linux documentation
to be moved in the next PR.

The idea is that a developer can configure their box to build any of the
available projects for that platform (web and android build on all three
main dev platforms).

Keeping the build documentation in one place makes it much simpler to
keep it consistent and up-to-date as well, as well as keeping us aware
of potential dependency conflicts between projects.

The icing on the cake is the resources/devbox/macos/macos.sh script,
which I have tested and takes a bare metal mac box through to a full
Keyman development environment (except XCode, there's always something!)
2021-06-21 21:12:27 +10:00
Darcy Wong
49544f5b11 chore(common): Add YouTube links to Keyman 14 features 2021-06-13 10:09:52 +07:00
Marc Durdin
5fac633fb6 fix(common): build script help param
When working on a new build script, I tripped over the `-?` question
mark help parameter here, as it needs to be escaped. Opted to fix all
the instances in our scripts, although AFAICT there would not have been
current bugs arising from this, as there were no conflicting one
character options lower in the case list.
2021-05-28 09:50:40 +10:00
jahorton
8f1e1dc65a feat(common): offline help css 2021-05-26 15:40:45 +07:00
Darcy Wong
d6677913ea chore(mac): Add video link for installing khmer_angkor keyboard 2021-05-19 13:21:51 +07:00
Darcy Wong
a0bb9aa69c chore(mac): Add video link for installing Keyman 2021-05-19 13:09:45 +07:00
Marc Durdin
94bd6a41ca chore(mac): update requirements to include Big Sur 2021-05-05 09:50:02 +10:00
Marc Durdin
c429936a9f chore(mac): update readme 2021-04-29 15:48:19 +10:00
Marc Durdin
647c20ebc7 chore: support for xcode 12
Fixes #4994.
2021-04-29 14:30:10 +10:00
Marc Durdin
eeb8153252 fix(mac): prevent duplicate keyboards in list
Fixes #4058.
Fixes #4528.

Prevents duplicate keyboards from appearing in the list. If there are
already duplicates in the list, they will be cleaned up the next time a
keyboard is added or removed in Configuration.
2021-03-15 20:14:56 +11:00
Marc Durdin
2e4d19be99
Merge pull request #4673 from keymanapp/fix/mac/3979-local-help
fix(mac): show local help in app
2021-03-15 20:12:42 +11:00
Marc Durdin
637cc064da fix(mac): show local help in app
Fixes #3979.

Instead of loading help.keyman.com in the support frame, we now load a
local copy of the help. External links within the help will open in the
user's browser. This avoids issues of navigation to keyboard download
and other sites which won't work well.

Also, adds Back, Forward and Home buttons to the window so the user can
navigate more easily with mouse.

Finally, this means that the local help will always be synchronised with
the app version and brings the macOS help in line with the other
platforms.
2021-03-15 17:21:19 +11:00
Marc Durdin
3ba46ad07a chore(mac): missed about window 2021-03-15 16:26:34 +11:00
Marc Durdin
0f655f99b3 chore(mac): tweak close notification 2021-03-15 16:24:53 +11:00
Marc Durdin
f8e40182fe fix(mac): release window resources on close
Fixes #3972.

Ensure that window controllers are released when we close the window, so
that we are starting again when we want to use the window again in the
future.

There are a number of ugly patterns in this code, but fixing those is
outside scope for the beta.
2021-03-15 16:05:26 +11:00
Marc Durdin
0c01f7c41d fix(mac): register configuration window on load
Fixes #3945.

When the configuration window is opened via `showPreferences`, we were
not aware that the configuration window had been opened, so subsequent
references to it would recreate it.
2021-03-15 14:59:30 +11:00
Darcy Wong
6d2354332d chore(mac): Check in markdown help 2021-02-11 15:02:16 +07:00
Darcy Wong
84d2aa6539
Merge pull request #3977 from keymanapp/chore/mac/history-stable-13
chore(mac/resources): Catch up mac history for 13.0 releases
2020-11-27 12:36:30 +07:00
Marc Durdin
ab0ed0c614 chore: address review comments 2020-11-27 15:58:21 +11:00
Darcy Wong
02843d1aaf chore(mac/resources): Catch up mac history for 13.0 releases 2020-11-27 11:29:45 +07:00
Marc Durdin
737ff45952 chore(mac): englishspanish test keyboard 2020-11-27 15:19:32 +11:00
Marc Durdin
5bcbcb260f
Merge pull request #3961 from keymanapp/fix/mac/2488-duplicate-package-filenames
fix(mac): Handle duplicate filenames for packages
2020-11-27 13:13:58 +11:00
Marc Durdin
be544f49a7 fix(mac): Handle duplicate filenames for packages
If multiple copies of a package are saved by a browser, the browser will
typically append a ` (#)` to the filename, where `#` is a number. This
should be stripped off before installation to prevent duplicates of the
package being installed.

Fixes #2488.
2020-11-26 14:44:38 +11:00
Marc Durdin
9757e4330b fix(mac): improve robustness of altool call
Handles temporary failures calling altool where Apple servers return
"Could not find the RequestUUID" for a few minutes post-upload.

Example log we are handling:

```
[04:50:44][Step 5/5] Zipping Keyman.app for notarization to /Users/mcdurdin/buildAgent/work/99b311828f4ee7c/keyman/mac/Keyman4MacIM/build/Release/Keyman.zip
[04:50:44][Step 5/5] Uploading Keyman.zip to Apple for notarization
[04:51:23][Step 5/5] <?xml version="1.0" encoding="UTF-8"?>
[04:51:23][Step 5/5] <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
[04:51:23][Step 5/5] <plist version="1.0">
[04:51:23][Step 5/5] <dict>
[04:51:23][Step 5/5] 	<key>notarization-upload</key>
[04:51:23][Step 5/5] 	<dict>
[04:51:23][Step 5/5] 		<key>RequestUUID</key>
[04:51:23][Step 5/5] 		<string>fd45e30c-5a96-4d02-9196-0923d4e5e90f</string>
[04:51:23][Step 5/5] 	</dict>
[04:51:23][Step 5/5] 	<key>os-version</key>
[04:51:23][Step 5/5] 	<string>10.15.3</string>
[04:51:23][Step 5/5] 	<key>success-message</key>
[04:51:23][Step 5/5] 	<string>No errors uploading '/Users/mcdurdin/buildAgent/work/99b311828f4ee7c/keyman/mac/Keyman4MacIM/build/Release/Keyman.zip'.</string>
[04:51:23][Step 5/5] 	<key>tool-path</key>
[04:51:23][Step 5/5] 	<string>/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework</string>
[04:51:23][Step 5/5] 	<key>tool-version</key>
[04:51:23][Step 5/5] 	<string>4.01.1182</string>
[04:51:23][Step 5/5] </dict>
[04:51:23][Step 5/5] </plist>
[04:51:23][Step 5/5]
[04:51:23][Step 5/5] Waiting 30 seconds for status
[04:51:55][Step 5/5] <?xml version="1.0" encoding="UTF-8"?>
[04:51:55][Step 5/5] <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
[04:51:55][Step 5/5] <plist version="1.0">
[04:51:55][Step 5/5] <dict>
[04:51:55][Step 5/5] 	<key>os-version</key>
[04:51:55][Step 5/5] 	<string>10.15.3</string>
[04:51:55][Step 5/5] 	<key>product-errors</key>
[04:51:55][Step 5/5] 	<array>
[04:51:55][Step 5/5] 		<dict>
[04:51:55][Step 5/5] 			<key>code</key>
[04:51:55][Step 5/5] 			<integer>1519</integer>
[04:51:55][Step 5/5] 			<key>message</key>
[04:51:55][Step 5/5] 			<string>Could not find the RequestUUID.</string>
[04:51:55][Step 5/5] 			<key>userInfo</key>
[04:51:55][Step 5/5] 			<dict>
[04:51:55][Step 5/5] 				<key>NSLocalizedDescription</key>
[04:51:55][Step 5/5] 				<string>Could not find the RequestUUID.</string>
[04:51:55][Step 5/5] 				<key>NSLocalizedFailureReason</key>
[04:51:55][Step 5/5] 				<string>Apple Services operation failed.</string>
[04:51:55][Step 5/5] 				<key>NSLocalizedRecoverySuggestion</key>
[04:51:55][Step 5/5] 				<string>Could not find the RequestUUID.</string>
[04:51:55][Step 5/5] 			</dict>
[04:51:55][Step 5/5] 		</dict>
[04:51:55][Step 5/5] 	</array>
[04:51:55][Step 5/5] 	<key>tool-path</key>
[04:51:55][Step 5/5] 	<string>/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework</string>
[04:51:55][Step 5/5] 	<key>tool-version</key>
[04:51:55][Step 5/5] 	<string>4.01.1182</string>
[04:51:55][Step 5/5] </dict>
[04:51:55][Step 5/5] </plist>
[04:51:55][Step 5/5]
[04:51:55][Step 5/5] altool failed with code 1
```
2020-11-26 11:53:35 +11:00
Marc Durdin
0981473514 chore(mac): fix iso section key code 2020-11-25 18:56:23 +11:00
Marc Durdin
01b192796a feat(mac): user-controllable legacy app list
Fixes #1953.

Makes it possible to specify additional apps that need 'legacy' handling
without requiring an updated build of Keyman for Mac. The list should be
stored in user defaults under the `KMLegacyApps` key. It can be viewed
with the command:

```
defaults read keyman.inputmethod.Keyman KMLegacyApps
```

And updated with

```
defaults write keyman.inputmethod.Keyman KMLegacyApps -array value1 value2 ...
defaults write keyman.inputmethod.Keyman KMLegacyApps -array-add value1 value2 ...
```

Each entry should be a regex that matches the client app id.

For example:

```
defaults write keyman.inputmethod.Keyman KMLegacyApps -array com.microsoft.Word '^com.github.atom$'
```

(Note for purity, the `.` should be escaped in the regex but it'll
actually be fine without...)

This commit also adds the `keymanDataPath` method on
`KMInputMethodAppDelegate`, so we can place additional configuration
data there in the future (as opposed to in the shared config which is
less easy for users to edit.)
2020-11-25 16:56:52 +11:00
Marc Durdin
daff70bebf fix(mac): arrow keys now reset context
Fixes #3939.

Arrow keys, function keys and a handful of other keys should trigger a
context reload (for legacy apps, that means a context flush). This means
that deadkeys are also flushed when any of these keys are pressed, in
the same way as a Command key or a mouse click already did.
2020-11-25 13:15:12 +11:00
Marc Durdin
6a4038497b
Merge pull request #3944 from keymanapp/fix/mac/3935-legacy-mode-for-java
fix(mac): turn on legacy mode for Java apps
2020-11-25 12:50:03 +11:00
Marc Durdin
44399fc594
Merge pull request #3924 from keymanapp/feat/mac/2601-support-102nd-key
feat(mac): Add support for "ISO" keyboard layouts
2020-11-25 12:49:53 +11:00
Marc Durdin
506a2b52f3
Merge pull request #3933 from keymanapp/fix/mac/nsstring-to-nsurl
fix(mac/engine): wrong variable type
2020-11-25 12:49:31 +11:00
Marc Durdin
0f831f7df7
Merge pull request #3932 from keymanapp/fix/mac/build-sign-post-tweaking-plist
fix(mac): re-sign files post plist update
2020-11-25 12:49:19 +11:00
Marc Durdin
044631cd54 fix(mac): turn on legacy mode for Java apps
Relates to #3935.

This switches Java apps into legacy mode. However, Java itself will need
patching to support Keyman, as it makes assumptions about input methods,
including matching specific input methods by name, before enabling its
complex text support.

I am in process of submitting a bug report and may try and submit a
patch (although the process seems a little convoluted). It requires a
change to a single file, AWTView.m, with the following diff (against
JDK 16.0):

diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
index 3e80b5a6cf3..2ae1f4f3f12 100644
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
@@ -263,6 +263,16 @@ - (void) keyDown: (NSEvent *)event {
     fProcessingKeystroke = YES;
     fKeyEventsNeeded = YES;

+    if([(NSString *)kbdLayout containsString:@"keyman"]) {
+        // Keyman handles all key events; none should be
+        // passed through as default before Keyman processes them
+        fKeyEventsNeeded = NO;
+    }
     // Allow TSM to look at the event and potentially send back NSTextInputClient messages.
     [self interpretKeyEvents:[NSArray arrayWithObject:event]];

@@ -960,7 +989,9 @@ - (void) insertText:(id)aString replacementRange:(NSRange)replacementRange

     if ((utf16Length > 2) ||
         ((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:codePoint]) ||
-        ((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"]))) {
+        ((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"])) ||
+        ([(NSString *)kbdLayout containsString:@"keyman"])
+        ) {
         aStringIsComplex = YES;
     }
2020-11-25 09:59:10 +11:00
Marc Durdin
d849c532de chore(mac): address review comments
* Make less WET
* Add comments
* Fix mixed up key labels
2020-11-24 08:27:37 +11:00
Marc Durdin
c8000c2d9c chore: cleanup 2020-11-24 08:24:30 +11:00
Marc Durdin
e32ab796bd feat(mac): Add support for "ISO" keyboard layouts
Fixes #2601.

This PR adds support for the 102nd key as found on European layouts. It
does not however reshape the Enter key and move the BKSLASH key, as that
is a much bigger job; functionally this makes it possible to press the
102nd key, which was the biggest gap.
2020-11-24 08:24:30 +11:00