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.
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.
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.
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.)
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.
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;
}
Fixes#3898.
This reworks the keyboard download window to use the new keyboard
install page and url pattern. Some refactoring of the downloadKeyboard
method was required to handle the new download patterns.
Fixes#3849.
* Uses keyman-staging.com when on alpha or beta
* Updates copyright year at build time
* Fixes link to help documentation (/mac, not /macosx)
This PR tries to make codesign more resilient to failure, by retrying
a build step that falls over with code 65. This code is not limited to
codesign but most frequently happens with it.
A more complete answer would be to do the codesigning step in build.sh
instead of in the project, which would give us more control of the
outcome, and maybe simplify the build process somewhat, but I will
leave that for now, because it is usually better to leave that to XCode.
I wasn't going to do this, but realised that crash reporting was going
to be a problem on mac because it still used crashlytics/fabric. Turned
out to be a good exercise to get me back into macOS world, and fairly
straightforward to get right (helps that the other platforms broke the
ice for me).
The handleEvent function has somewhat convoluted logic around emitting
the final transform to the client application. This starts to refactor
that code to move all client interaction to a single point at the end
of the event sequence.
Next phase will be to update delete and insert events to turn them into
a single action where possible.
Fixes#2375.
For applications that do not provide context to Keyman, Keyman was losing
the context buffer whenever a modifier key was pressed or released. This
change modifies the cache reset to occur only when the Command modifier is
pressed.
First steps towards a clean install script
for Keyman for Mac. Some steps still out-
of-order for now, particularly opening
System Preferences to allow Keyman before
Keyman has run for first time.