Commit graph

33096 commits

Author SHA1 Message Date
Marc Durdin
737ff45952 chore(mac): englishspanish test keyboard 2020-11-27 15:19:32 +11:00
Darcy Wong
07d9719df0
Merge pull request #3974 from keymanapp/chore/common/scopes-readme
chore(common/resources): Document keeping scopes in sync
2020-11-27 09:25:22 +07: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
Darcy Wong
13e2f4cc6d chore(common/resources): Document keeping scopes in sync 2020-11-27 08:25:14 +07:00
Darcy Wong
73879bd64e fix(android/engine): Count the number of keyboard ID's with matching JS 2020-11-27 07:47:04 +07:00
Marc Durdin
1d41ee193b
Merge pull request #3959 from keymanapp/fix/mac/3331-altool-robustness
fix(mac): improve robustness of altool call
2020-11-27 06:31:25 +11:00
Keyman Server
1fcfd3b722
Merge pull request #3968 from keymanapp/auto/version-master-14.0.191
auto: increment master version to 14.0.191
2020-11-27 05:01:54 +11:00
Keyman Build Agent
c2392511f1 auto: increment master version to 14.0.191 2020-11-26 13:01:12 -05:00
Darcy Wong
2e29f117df fix(android/app): Finish packageActivity on Toast errors
This stops the activity from generating the Stepper navigation on failed keyboard installs
2020-11-26 12:38:42 +07:00
Marc Durdin
e0b019be8b
Merge pull request #3957 from keymanapp/chore/common/fixup-missing-history
chore(common): fixup missing history
2020-11-26 15:41:48 +11:00
Marc Durdin
d41a047942 chore: address review comments 2020-11-26 15:41:29 +11:00
Darcy Wong
967ec86889 fix(android/app): Check touch keyboard and language count 2020-11-26 11:36:34 +07:00
Darcy Wong
5a9cb05165 fix(android/engine): Check JS file exists in kmp
Modify packageProcessor.getKeyboardCount
2020-11-26 11:36:34 +07:00
Darcy Wong
63d92cd05b
Merge pull request #3923 from keymanapp/fix/fv/android/force-keyboard-setup
fix(android/oem): Check keyboard selected  before allowing setup
2020-11-26 11:06:06 +07: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
59aa301ea4 fix(oem/fv/android): tweaked check boxes
I opted to make the checkbox invisible when the step has not been
completed. This seemed to look a little clearer when I tried it.
2020-11-26 10:48:10 +11:00
Marc Durdin
fb36fc3f69 chore(common): remove --first-parent when searching for PRs
Instead of just reporting on --first-parent, now lists all merges that
are in the log, which means we get some non-PR merges but that's ok. At
least we get all of them.

This was most visible with chained PRs which were merged bottom-up.
2020-11-26 09:49:21 +11:00
Marc Durdin
51c69e2894 chore(common): fixup missing history
Discovered that some history entries were missing. This was because we
were calling `--first-parent` on `git log` in fixupHistory.ts. (I will
fix that in the next commit.)

I manually constructed the remaining history by hacking up
fixupHistory.ts to pull together the additional entries. A bit scary but
it worked.

For ref, I threw together the following PHP to get the list of missing
PRs:

```
<?php
  $foo = shell_exec("git log --merges --oneline --decorate=short master...release-14.0.3-alpha | grep -E \"#|-alpha\"");
  $foo = explode("\n", $foo);

  $version = '14.0.187';

  $history = file_get_contents('HISTORY.md');

  foreach($foo as $line) {
    $PR = null;
    if(preg_match("/#(\d\d\d\d)/", $line, $matches)) {
      // Is this entry a PR
      if(!preg_match("/keymanapp\/auto\/version-master/", $line)) {
        // Skip automatic version upgrades
        $PR = $matches[1];
      }
    }
    if(preg_match('/\(tag: release-(\d+\.\d+\.\d+)-alpha\)/', $line, $matches)) {
      // Was there a version tag here?
      $version = $matches[1];
    }
    if($PR) {
      if(strpos($history, "(#$PR)") === false ) {
        echo " $version: $PR [$line]\n";
      }
    }
  }
?>
```

And I munged up fixupHistory.ts to just lookup each PR returned from
that report and splice it into HISTORY.md. That hackery is so awful I am
not sharing it here.
2020-11-26 09:44:36 +11:00
Keyman Server
922ac7953c
Merge pull request #3956 from keymanapp/auto/version-master-14.0.190
auto: increment master version to 14.0.190
2020-11-26 05:01:54 +11:00
Keyman Build Agent
5f32b941ad auto: increment master version to 14.0.190 2020-11-25 13:01:09 -05:00
Darcy Wong
1d580360d7
Merge pull request #3947 from keymanapp/chore/common/cleanup-lmlayer-history
chore(common/resources): Part 3 of additional HISTORY.md cleanup
2020-11-25 19:19:48 +07:00
Marc Durdin
7df7d78749
Merge pull request #3952 from keymanapp/chore/mac/iso_section_key_code
chore(mac): fix iso section key code
2020-11-25 19:46:45 +11:00
Marc Durdin
0c67dbf5dd
Merge pull request #3949 from keymanapp/feat/mac/1953-user-controllable-legacy-app-list
feat(mac): user-controllable legacy app list
2020-11-25 19:46:35 +11:00
Marc Durdin
78816cbe6a
Merge pull request #3946 from keymanapp/fix/mac/3939-arrow-keys-reset-context
fix(mac): arrow keys now reset context
2020-11-25 19:05:39 +11:00
Marc Durdin
0981473514 chore(mac): fix iso section key code 2020-11-25 18:56:23 +11:00
Darcy Wong
bb424b8f50 chore: Split (android,ios) scope
* Split (android,ios) scopes into separate lines so that App store submission won't get blocked
* fix chore(mac)
2020-11-25 14:26:52 +07:00
Darcy Wong
f19cfff3f4 chore: address review comments 2020-11-25 14:15:57 +07:00
Joshua Horton
ca530f260f
Merge pull request #3948 from keymanapp/fix/web/default-attachment-behavior
fix(web): default attachment behavior
2020-11-25 14:07:19 +07:00
Darcy Wong
1664c8439e chore: cleanup common scopes 2020-11-25 13:07:38 +07: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
jahorton
af7be3f1dc fix(web): default attachment behavior 2020-11-25 12:51:34 +07:00
Darcy Wong
c1e74dd51e chore: cleanup web/utils 2020-11-25 12:47:16 +07:00
Darcy Wong
605656adc4 chore: cleanup lmlayer scopes 2020-11-25 12:02:37 +07: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
285319ba37
Merge pull request #3878 from keymanapp/feat/developer/3863-new-touch-layout-key-tags
feat(developer): add new touch layout special tags
2020-11-25 12:51:36 +11:00
Marc Durdin
c4871c981c
Merge branch 'master' into feat/developer/3863-new-touch-layout-key-tags 2020-11-25 12:51:14 +11:00
Marc Durdin
48a3d0c9fa
Update windows/src/developer/TIKE/compile/CompileKeymanWeb.pas
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2020-11-25 12:50:45 +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
Keyman Server
36075815aa
Merge pull request #3943 from keymanapp/auto/version-master-14.0.189
auto: increment master version to 14.0.189
2020-11-25 05:01:58 +11:00
Keyman Build Agent
976d47a006 auto: increment master version to 14.0.189 2020-11-24 13:01:13 -05:00
Darcy Wong
0e574ae9f3
Merge pull request #3942 from keymanapp/chore/common/additional-cleanup-history
chore(common): additional cleanup to HISTORY.md
2020-11-24 16:50:25 +07:00
Darcy Wong
acd3e9c16f chore(common): Fix one more linux line 2020-11-24 14:01:13 +07:00
Joshua Horton
6a29257b49
Merge pull request #3941 from keymanapp/fix/web/osk-errors
fix(web): adds null guards for two Sentry errors
2020-11-24 11:43:20 +07:00
Darcy Wong
3fdbac7005 chore(common): additional cleanup to HISTORY.md
Follow-on to #3926

* Use `oem/fv/ios` and `oem/fv/android` for FV changes
* Add missing commit types
* Changes `deps` to use scopes (dependabot changes)
2020-11-24 11:30:51 +07:00
Joshua Horton
2db93b92d0
Merge pull request #3937 from keymanapp/chore/web/engine/ltr-codes-and-mapping
chore(web): adds LTREnter, LTRBkSp, and associated layout mapping
2020-11-24 10:51:40 +07:00