Merge remote-tracking branch 'origin/beta' into chore/common/crowdin-ha-2

This commit is contained in:
Darcy Wong 2022-03-22 21:15:28 +07:00
commit a6186489b5
46 changed files with 180 additions and 152 deletions

View file

@ -1,5 +1,17 @@
# Keyman Version History
## 15.0.218 beta 2022-03-21
* chore(android/engine): Remove visual gaps in keyboard picker menu (#6370)
## 15.0.217 beta 2022-03-19
* fix(web): bounding rect offset was incorrect (#6357)
## 15.0.216 beta 2022-03-18
* feat(linux): Allow to run ibus tests on Wayland (#6202)
## 15.0.215 beta 2022-03-17
* fix(web): crash on focus before init (#6393)

View file

@ -1 +1 @@
15.0.216
15.0.219

View file

@ -214,7 +214,8 @@ public final class KeyboardPickerActivity extends BaseActivity {
imeListAdapter = new SimpleAdapter(this, imeList, R.layout.list_row_layout5, from, to);
imeListView.setAdapter(imeListAdapter);
// Rescale IME listview so entire list is visible (wrap_content not working)
imeListView.getLayoutParams().height = actionBarHeight * imeListAdapter.getCount();
imeListView.getLayoutParams().height = ((int) context.getResources().getDimension(R.dimen.other_ime_row_height)) *
imeListAdapter.getCount();
imeListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

View file

@ -16,8 +16,7 @@
android:ellipsize="end"
android:singleLine="true"
android:textSize="@dimen/titlebar_label_textsize"
android:textStyle="bold"
android:layout_marginTop="@dimen/fab_margin"/>
android:textStyle="bold" />
<!-- ListView of other enabled keyboards -->
<include layout="@layout/list_layout"

View file

@ -7,7 +7,7 @@
<LinearLayout
android:background="@android:color/transparent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/other_ime_row_height"
android:layout_marginStart="16dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"

View file

@ -14,4 +14,6 @@
<dimen name="help_bubble_height">80dp</dimen>
<dimen name="help_bubble_offset_x">0.5dp</dimen>
<dimen name="help_bubble_offset_y">10dp</dimen>
<dimen name="other_ime_title_height">50dp</dimen>
<dimen name="other_ime_row_height">60dp</dimen>
</resources>

View file

@ -16,6 +16,7 @@
<dimen name="help_bubble_offset_x">0.5dp</dimen>
<dimen name="help_bubble_offset_y">6dp</dimen>
<dimen name="other_ime_title_height">35dp</dimen>
<dimen name="other_ime_row_height">50dp</dimen>
<dimen name="fab_margin">10dp</dimen>
<dimen name="fab_padding">70dp</dimen>
<dimen name="qr_height">250dp</dimen>

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/input-processor",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/input-processor",
"version": "15.0.216",
"version": "15.0.219",
"description": "The core text and prediction processing engine for KeymanWeb",
"repository": {
"type": "git",
@ -18,8 +18,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/lexical-model-compiler": "^15.0.216",
"@keymanapp/resources-gosh": "^15.0.216",
"@keymanapp/lexical-model-compiler": "^15.0.219",
"@keymanapp/resources-gosh": "^15.0.219",
"@types/node": "^11.9.4",
"chai": "^4.3.4",
"mocha": "^8.4.0",
@ -34,11 +34,11 @@
"mocha": "mocha"
},
"dependencies": {
"@keymanapp/keyboard-processor": "^15.0.216",
"@keymanapp/lexical-model-layer": "^15.0.216",
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/web-utils": "^15.0.216",
"@keymanapp/keyboard-processor": "^15.0.219",
"@keymanapp/lexical-model-layer": "^15.0.219",
"@keymanapp/models-types": "^15.0.219",
"@keymanapp/web-environment": "^15.0.219",
"@keymanapp/web-utils": "^15.0.219",
"eventemitter3": "^4.0.0"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/keyboard-processor",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/keyboard-processor",
"version": "15.0.216",
"version": "15.0.219",
"description": "Core module for Keyman keyboard support in KeymanWeb.",
"repository": {
"type": "git",
@ -18,7 +18,7 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^15.0.216",
"@keymanapp/resources-gosh": "^15.0.219",
"chai": "^4.3.4",
"mocha": "^8.4.0",
"mocha-teamcity-reporter": "^4.0.0",
@ -32,9 +32,9 @@
"mocha": "mocha"
},
"dependencies": {
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/web-utils": "^15.0.216",
"@keymanapp/models-types": "^15.0.219",
"@keymanapp/web-environment": "^15.0.219",
"@keymanapp/web-utils": "^15.0.219",
"@types/node": "^11.9.4"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/recorder-core",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/recorder-core",
"version": "15.0.216",
"version": "15.0.219",
"description": "Core classes used to develop KeymanWeb test cases based on keystrokes",
"main": "index.js",
"scripts": {
@ -17,10 +17,10 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"dependencies": {
"@keymanapp/keyboard-processor": "^15.0.216",
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/web-utils": "^15.0.216",
"@keymanapp/keyboard-processor": "^15.0.219",
"@keymanapp/models-types": "^15.0.219",
"@keymanapp/web-environment": "^15.0.219",
"@keymanapp/web-utils": "^15.0.219",
"@types/node": "^11.9.4"
},
"devDependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-sentry-manager",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-sentry-manager",
"version": "15.0.216",
"version": "15.0.219",
"description": "Common setup for KeymanWeb's Sentry-based error reporting",
"main": "dist/index.js",
"scripts": {
@ -20,7 +20,7 @@
"typescript": "^3.8.3"
},
"dependencies": {
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/web-environment": "^15.0.219",
"@sentry/browser": "^5.27.4"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-utils",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-utils",
"version": "15.0.216",
"version": "15.0.219",
"description": "Common utility functions used throughout other Keyman packages",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@ -20,8 +20,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^15.0.216",
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/resources-gosh": "^15.0.219",
"@keymanapp/web-environment": "^15.0.219",
"@types/node": "^14.0.5",
"typescript": "^3.8.3"
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-templates",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-templates",
"version": "15.0.216",
"version": "15.0.219",
"description": "Backing model implementations (templates) for Keyman's modelling layer",
"keywords": [
"lm",
@ -42,8 +42,8 @@
"url": "https://github.com/keymanapp/keyman/issues"
},
"devDependencies": {
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/web-utils": "^15.0.216",
"@keymanapp/models-types": "^15.0.219",
"@keymanapp/web-utils": "^15.0.219",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"@types/node": "^14.0.4",
@ -52,6 +52,6 @@
"typescript": "^3.8.3"
},
"dependencies": {
"@keymanapp/models-wordbreakers": "^15.0.216"
"@keymanapp/models-wordbreakers": "^15.0.219"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-types",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-types",
"version": "15.0.216",
"version": "15.0.219",
"description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.",
"types": "./index.d.ts",
"scripts": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-wordbreakers",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-wordbreakers",
"version": "15.0.216",
"version": "15.0.219",
"description": "Word breakers bundled in the modeling layer",
"keywords": [
"lexical model",
@ -40,7 +40,7 @@
"url": "https://github.com/keymanapp/keyman/issues"
},
"devDependencies": {
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/models-types": "^15.0.219",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"chai": "^4.3.4",

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-layer",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-layer",
"version": "15.0.216",
"version": "15.0.219",
"description": "Keyman/Predictive Text integration layer",
"main": "build/index.js",
"scripts": {
@ -21,8 +21,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/resources-gosh": "^15.0.216",
"@keymanapp/models-types": "^15.0.219",
"@keymanapp/resources-gosh": "^15.0.219",
"@types/node": "^10.17.21",
"chai": "^4.3.4",
"karma": "^6.3.4",
@ -46,10 +46,10 @@
"typescript": "^3.8.3"
},
"dependencies": {
"@keymanapp/models-templates": "^15.0.216",
"@keymanapp/models-wordbreakers": "^15.0.216",
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/web-utils": "^15.0.216",
"@keymanapp/models-templates": "^15.0.219",
"@keymanapp/models-wordbreakers": "^15.0.219",
"@keymanapp/web-environment": "^15.0.219",
"@keymanapp/web-utils": "^15.0.219",
"es6-shim": "^0.35.5",
"string.prototype.codepointat": "^0.2.1",
"string.prototype.startswith": "^0.2.0"

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-compiler",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-compiler",
"version": "15.0.216",
"version": "15.0.219",
"description": "Keyman Developer lexical model compiler",
"keywords": [
"keyboard",
@ -37,14 +37,14 @@
"node": ">=12.0.0"
},
"dependencies": {
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/models-types": "^15.0.219",
"commander": "^3.0.0",
"typescript": "^3.8.3",
"xml2js": "^0.4.19"
},
"devDependencies": {
"@keymanapp/models-templates": "^15.0.216",
"@keymanapp/models-wordbreakers": "^15.0.216",
"@keymanapp/models-templates": "^15.0.219",
"@keymanapp/models-wordbreakers": "^15.0.219",
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.7",
"@types/node": "^10.14.6",

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/developer-server",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/developer-server",
"version": "15.0.216",
"version": "15.0.219",
"description": "Keyman Developer backend server",
"main": "dist/index.js",
"scripts": {

8
docs/build/macos.md vendored
View file

@ -48,11 +48,15 @@ These dependencies are also listed below if you'd prefer to install manually.
## Shared Dependencies
* Shared: HomeBrew, Bash 5.0+, jq, Python 3, Meson, Ninja, coreutils, Pandoc
* Shared: HomeBrew, Bash 5.0+, jq, Python 2.7, Python 3, Meson, Ninja, coreutils, Pandoc
```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install bash jq python3 meson ninja coreutils pandoc
brew install bash jq python3 meson ninja coreutils pandoc pyenv
# Python 2.7 required for DeviceKit (among others?) at present
pyenv install 2.7.18
pyenv global 2.7.18
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
```
On M1 only (as greadlink is not on the path otherwise in XCode):

View file

@ -87,9 +87,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window!.rootViewController = navigationController
window!.makeKeyAndVisible()
//TODO: look in documents directory for .zip / .kmp files
//TODO: OR browse documents Dir from new keyboard window
//self.installAdhocKeyboard(filePath: "")
// TODO: look in documents directory for .zip / .kmp files
// TODO: OR browse documents Dir from new keyboard window
// self.installAdhocKeyboard(filePath: "")
return true
}

View file

@ -57,7 +57,7 @@ class BookmarksViewController: UIViewController, UITableViewDelegate, UITableVie
message: "",
preferredStyle: UIAlertController.Style.alert)
alertController.addTextField(configurationHandler: { (textField) in
//listen for changes
// listen for changes
NotificationCenter.default.addObserver(self,
selector: #selector(BookmarksViewController.handleTextFieldTextChangedNotification(notification:)),
name: UITextField.textDidChangeNotification, object: textField)
@ -70,7 +70,7 @@ class BookmarksViewController: UIViewController, UITableViewDelegate, UITableVie
self.inputTitleField = textField
})
alertController.addTextField(configurationHandler: { (textField) in
//listen for changes
// listen for changes
NotificationCenter.default.addObserver(self,
selector: #selector(BookmarksViewController.handleTextFieldTextChangedNotification(notification:)),
name: UITextField.textDidChangeNotification, object: textField)
@ -207,7 +207,7 @@ class BookmarksViewController: UIViewController, UITableViewDelegate, UITableVie
tableView.reloadData()
}
//handler
// handler
@objc func handleTextFieldTextChangedNotification(notification: NSNotification) {
updateAddButtonEnableState()
}

View file

@ -11,7 +11,7 @@ import UIKit
class KMUnderscoreView: KMView {
override func draw(_ rect: CGRect) {
//percentage based widths for the color bar portion of the logo
// percentage based widths for the color bar portion of the logo
let widths: [CGFloat] = [0.6, 0.25, 0.15]
let colors: [UIColor] = [ UIColor.keymanOrange,
UIColor.keymanRed,

View file

@ -21,5 +21,5 @@
"ts-node",
"typescript"
],
"version": "15.0.216"
"version": "15.0.219"
}

View file

@ -17,3 +17,6 @@ export PATH=$ANDROID_HOME/build-tools/30.0.3:$PATH
export PATH="/usr/local/opt/openjdk@8/bin:$PATH"
export JAVA_HOME=/usr/local/opt/openjdk@8
# Python 2.7
eval "$(pyenv init --path)"

View file

@ -144,7 +144,7 @@ which brew || (
## Install devchain components
BREW_ALL="bash jq python3 meson ninja coreutils"
BREW_ALL="bash jq python3 meson ninja coreutils pyenv"
BREW_WEB="node emscripten openjdk@8"
BREW_IOS="swiftlint carthage"
BREW_MACOS="carthage cocoapods"
@ -162,6 +162,10 @@ $REQUIRE_MACOS && brew install $BREW_MACOS
$REQUIRE_PANDOC && brew install pandoc
$REQUIRE_SENTRYCLI && brew install getsentry/tools/sentry-cli
# Add python 2.7.18 from pyenv
pyenv install 2.7.18
pyenv global 2.7.18
# Install WINE
$REQUIRE_KMCOMP && (
brew tap homebrew/cask-versions

View file

@ -1,5 +1,5 @@
{
"name": "@keymanapp/resources-gosh",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 1
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/resources-gosh",
"version": "15.0.216",
"version": "15.0.219",
"description": "Good Ol' Shell",
"author": "Marc Durdin <marc@keyman.com> (https://github.com/mcdurdin)",
"contributors": [

View file

@ -1,5 +1,5 @@
{
"name": "@keymanapp/web-environment",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 1
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-environment",
"version": "15.0.216",
"version": "15.0.219",
"description": "A compilation utility for passing select environment variables into our TS builds",
"author": "Joshua Horton <joshua_horton@sil.org> (https://github.com/jahorton)",
"homepage": "https://github.com/keymanapp/keyman",
@ -17,6 +17,6 @@
"url": "https://github.com/keymanapp/keyman/issues"
},
"devDependencies": {
"@keymanapp/resources-gosh": "^15.0.216"
"@keymanapp/resources-gosh": "^15.0.219"
}
}

2
web/package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "keyman",
"version": "15.0.216",
"version": "15.0.219",
"lockfileVersion": 2,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "keyman",
"version": "15.0.216",
"version": "15.0.219",
"description": "Facilitates text input in any language.",
"repository": {
"type": "git",
@ -18,8 +18,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^15.0.216",
"@keymanapp/web-sentry-manager": "^15.0.216",
"@keymanapp/resources-gosh": "^15.0.219",
"@keymanapp/web-sentry-manager": "^15.0.219",
"@sentry/cli": "^1.52.3",
"chai": "^4.3.4",
"google-closure-compiler-java": "^20200224.0.0",
@ -52,13 +52,13 @@
"sentry-cli": "sentry-cli"
},
"dependencies": {
"@keymanapp/input-processor": "^15.0.216",
"@keymanapp/keyboard-processor": "^15.0.216",
"@keymanapp/lexical-model-layer": "^15.0.216",
"@keymanapp/models-types": "^15.0.216",
"@keymanapp/recorder-core": "^15.0.216",
"@keymanapp/web-environment": "^15.0.216",
"@keymanapp/web-utils": "^15.0.216",
"@keymanapp/input-processor": "^15.0.219",
"@keymanapp/keyboard-processor": "^15.0.219",
"@keymanapp/lexical-model-layer": "^15.0.219",
"@keymanapp/models-types": "^15.0.219",
"@keymanapp/recorder-core": "^15.0.219",
"@keymanapp/web-environment": "^15.0.219",
"@keymanapp/web-utils": "^15.0.219",
"@types/node": "^11.9.4",
"es6-shim": "^0.35.5",
"eventemitter3": "^4.0.0"

View file

@ -34,7 +34,7 @@ namespace com.keyman.osk {
}
} else if(keyName.indexOf('K_ROPT') >= 0) {
if(keyDown) {
this.highlightKey(e,false);
this.highlightKey(e,false);
if(typeof keyman['hideKeyboard'] == 'function') {
keyman['hideKeyboard']();
}
@ -49,10 +49,10 @@ namespace com.keyman.osk {
if(device.OS == 'Android') { // assumption - if this file is being loaded, keyman.isEmbedded == true.
// Send the subkey array to iOS, with centre,top of base key position
/**
* Create a popup key array natively
*
* Create a popup key array natively
*
* @param {Object} key base key element
*/
*/
VisualKeyboard.prototype.startLongpress = function(this: VisualKeyboard, key: KeyElement): PendingGesture {
if(typeof(window['oskCreatePopup']) == 'function') {
var xBase = dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(this.kbdDiv) + key.offsetWidth/2,
@ -78,11 +78,11 @@ namespace com.keyman.osk {
this.keytip = new osk.embedded.KeyTip(window['oskCreateKeyPreview'], window['oskClearKeyPreview']);
}
};
}
VisualKeyboard.prototype.waitForFonts = function(this: VisualKeyboard, kfd, ofd) {
// a dummy function; it's only really used for 'native' KMW.
return true;
}
VisualKeyboard.prototype.waitForFonts = function(this: VisualKeyboard, kfd, ofd) {
// a dummy function; it's only really used for 'native' KMW.
return true;
}
SuggestionManager.prototype.platformHold = function(this: SuggestionManager, suggestionObj: BannerSuggestion, isCustom: boolean) {
@ -129,10 +129,10 @@ namespace com.keyman.text {
// Allow definition of application name
keymanweb.options['app']='';
// Flag to control refreshing of a keyboard that is already loaded
keymanweb.mustReloadKeyboard = true;
// Skip full page initialization - skips native-mode only code
keymanweb.isEmbedded = true;
@ -140,14 +140,14 @@ namespace com.keyman.text {
keymanweb.setDefaultDeviceOptions = function(opt: com.keyman.OptionType) {
opt['attachType'] = 'manual';
device.app=opt['app'];
device.touchable=true;
device.formFactor='phone';
device.touchable=true;
device.formFactor='phone';
if(navigator && navigator.userAgent && navigator.userAgent.indexOf('iPad') >= 0) device.formFactor='tablet';
if(device.app.indexOf('Mobile') >= 0) device.formFactor='phone';
if(device.app.indexOf('Tablet') >= 0) device.formFactor='tablet';
device.browser='native';
};
// Get default style sheet path
keymanweb.getStyleSheetPath = function(ssName) {
return keymanweb.rootPath+ssName;
@ -191,7 +191,7 @@ namespace com.keyman.text {
/**
* Force reload of resource
*
*
* @param {string} s unmodified URL
* @return {string} modified URL
*/
@ -200,7 +200,7 @@ namespace com.keyman.text {
s = s + '?v=' + t;
return s;
};
util.wait = function() {
// Empty stub - this function should not be implemented or used within embedded code routes.
console.warn("util.wait() call attempted in embedded mode!"); // Sends log message to embedding app.
@ -213,39 +213,39 @@ namespace com.keyman.text {
/**
* Refresh element content after change of text (if required)
*
*
* @param {Object} Pelem input element
*/
keymanweb.refreshElementContent = function(Pelem)
*/
keymanweb.refreshElementContent = function(Pelem)
{
if('ontextchange' in keymanweb) keymanweb['ontextchange'](Pelem);
};
/**
* Set target element text direction (LTR or RTL): not functional for KMEI, KMEA
*
*
* @param {Object} Ptarg Target element
*/
*/
keymanweb.domManager._SetTargDir = function(Ptarg){};
/**
* Align input fields (should not be needed with KMEI, KMEA)
*
*
* @param {object} eleList A list of specific elements to align. If nil, selects all elements.
*
*
**/
keymanweb.alignInputs = function(eleList: HTMLElement[]) {};
/**
* Use rotation events to adjust OSK element positions and scaling if necessary
*/
*/
keymanweb.handleRotationEvents = function() {};
/**
* Caret position always determined from the active (but hidden) element
*
*
* @return {boolean}
**/
**/
keymanweb.isPositionSynthesized = function()
{
return false;
@ -264,7 +264,7 @@ namespace com.keyman.text {
/**
* Register a lexical model
*
*
* @param {com.keyman.text.prediction.ModelSpec} model Spec of the lexical model
*/
keymanweb['registerModel']=function(model: com.keyman.text.prediction.ModelSpec) {
@ -272,12 +272,12 @@ namespace com.keyman.text {
};
/**
* Function called by Android and iOS when a device-implemented keyboard popup
* Function called by Android and iOS when a device-implemented keyboard popup
* is displayed or hidden. As this is controlled by the app, we use it as a
* trigger for 'embedded'-mode gesture state management.
*
*
* @param {boolean} isVisible
*
*
**/
keymanweb['popupVisible'] = function(isVisible) {
let osk = keymanweb.osk;
@ -287,7 +287,7 @@ namespace com.keyman.text {
/*
* If a longpress popup was visible, but is no longer, this means that the
* associated longpress gesture was cancelled. It is possible for the base
* key to emit if selected at this time; detecton of this is managed by
* key to emit if selected at this time; detecton of this is managed by
* the `SubkeyDelegator` class.
*/
if(!isVisible) {
@ -302,9 +302,9 @@ namespace com.keyman.text {
/*
* If the popup was not visible, but now is, that means our previously-pending
* longpress is now 'realized' (complete). The OSK relies upon this state
* longpress is now 'realized' (complete). The OSK relies upon this state
* information, which will be properly updated by `resolve`.
*
*
* Prominent uses of such state info helps prevent change of base key, key
* previews, and key output from occurring while a subkey popup remains active.
*/
@ -316,9 +316,9 @@ namespace com.keyman.text {
/**
* Return position of language menu key to KeymanTouch
*
*
* @return {string} comma-separated x,y,w,h of language menu key
*
*
**/
keymanweb['touchMenuPos'] = function() {
let osk = keymanweb.osk;
@ -329,14 +329,14 @@ namespace com.keyman.text {
var key: HTMLElement = osk.vkbd.lgKey;
// A CSS change of kmd-key-square from position:fixed to position:static was needed
// for Android 4.3 to display the OSK correctly, but resulted in the position of
// the menu key not being returned correctly. The following line gets the
// key element, instead of the key-square element, fixes this. It should be
// the menu key not being returned correctly. The following line gets the
// key element, instead of the key-square element, fixes this. It should be
// removed again when the key-square elements are all removed as planned.
if(typeof key.firstChild != 'undefined' && key.firstChild != null && util.hasClass(key.firstChild,'kmw-key')) {
key = <HTMLElement> key.firstChild;
}
var w=key.offsetWidth,
var w=key.offsetWidth,
h=key.offsetHeight,
// Since the full OSKManager '_Box' is displayed within the keyboards' WebViews,
// these calculations should be performed with respect to that, rather than osk.vkbd.kbdDiv.
@ -345,13 +345,13 @@ namespace com.keyman.text {
return x+','+y+','+w+','+h;
};
/**
* Accept an external key ID (from KeymanTouch) and pass to the keyboard mapping
*
*
* @param {string} keyName key identifier which could contain a display layer and a "functional" layer
* e.g: 'shift-K_E+rightalt-shift'
**/
**/
keymanweb['executePopupKey'] = function(keyName: string) {
let osk = keymanweb.osk;
var origArg = keyName;
@ -376,7 +376,7 @@ namespace com.keyman.text {
return false;
}
keyName = matches[2] + (matches[3] ? '+' + matches[3] : '');
// Note: this assumes Lelem is properly attached and has an element interface.
// Currently true in the Android and iOS apps.
var Lelem=keymanweb.domManager.lastActiveElement;
@ -394,13 +394,13 @@ namespace com.keyman.text {
/**
* API endpoint for hardware keystroke events from Android external keyboards
*
*
* @param {number} code key identifier
* @param {number} shift shift state (0x01=left ctrl 0x02=right ctrl 0x04=left alt 0x08=right alt
* 0x10=shift 0x20=ctrl 0x40=alt)
* @param {number} lstates lock state (0x0200=no caps 0x0400=num 0x0800=no num 0x1000=scroll 0x2000=no scroll locks)
* @return {boolean} false when KMW _has_ fully handled the event and true when not.
**/
**/
keymanweb['executeHardwareKeystroke'] = function(code, shift, lstates = 0): boolean {
if(!keymanweb.core.activeKeyboard || code == 0) {
return false;
@ -408,14 +408,14 @@ namespace com.keyman.text {
// Clear any pending (non-popup) key
keymanweb.osk.vkbd.keyPending = null;
// Note: this assumes Lelem is properly attached and has an element interface.
// Currently true in the Android and iOS apps.
var Lelem = keymanweb.domManager.lastActiveElement;
keymanweb.domManager.initActiveElement(Lelem);
// Check the virtual key
// Check the virtual key
var Lkc: com.keyman.text.KeyEvent = {
Lmodifiers: shift,
vkCode: code,
@ -425,7 +425,7 @@ namespace com.keyman.text {
kName: '',
device: keymanweb.util.physicalDevice.coreSpec, // As we're executing a hardware keystroke.
isSynthetic: false
};
};
try {
// Now that we've manually constructed a proper keystroke-sourced KeyEvent, pass control

View file

@ -457,9 +457,8 @@ namespace com.keyman.osk {
*/
private getInteractiveBoundingRect(): BoundingRect {
// Determine the important geometric values involved
const _Box = this.element.offsetParent as HTMLElement;
let oskX = this.element.offsetLeft + (_Box?.offsetLeft || 0);
let oskY = this.element.offsetTop + (_Box?.offsetTop || 0);
let oskX = dom.Utils.getAbsoluteX(this.element);
let oskY = dom.Utils.getAbsoluteY(this.element);
// Determine the out-of-bounds threshold at which touch-cancellation should automatically occur.
// Assuming square key-squares, we'll use 1/3 the height of a row for bounds detection
@ -476,15 +475,6 @@ namespace com.keyman.osk {
bottom: oskY + this.height + buffer
};
// If the OSK is using fixed positioning (thus, viewport-relative), we need to
// convert the 'clientX'-like values into 'pageX'-like values.
if (this.usesFixedPositioning) {
boundingRect.left += window.pageXOffset;
boundingRect.right += window.pageXOffset;
boundingRect.top += window.pageYOffset;
boundingRect.bottom += window.pageYOffset;
}
return boundingRect;
}

View file

@ -1446,11 +1446,18 @@ $(function () {
builder.updateKeyId(builder.selectedKey());
}, {saveOnce: true});
const wrapInstant = function(f) {
return function() {
window.setTimeout(f.bind(this), 0);
}
}
$('#inpKeyName')
.change(inpKeyNameChange)
.autocomplete({
source: builder.lookupKeyNames,
change: inpKeyNameChange
change: inpKeyNameChange,
select: wrapInstant(inpKeyNameChange)
})
.on('input', inpKeyNameChange)
.blur(function () {
@ -1494,7 +1501,8 @@ $(function () {
.change(inpKeyCapChange)
.autocomplete({
source: builder.specialKeyNames,
change: inpKeyCapChange
change: inpKeyCapChange,
select: wrapInstant(inpKeyCapChange)
})
.mouseup(function () {
builder.updateCharacterMap($(this).val(), false);
@ -1721,7 +1729,8 @@ $(function () {
.on('input', subKeyNameChange)
.autocomplete({
source: builder.lookupKeyNames,
change: subKeyNameChange
change: subKeyNameChange,
select: wrapInstant(subKeyNameChange)
}).blur(function () {
builder.hasSavedKeyUndo = false;
});
@ -1744,7 +1753,8 @@ $(function () {
.change(inpSubKeyCapChange)
.autocomplete({
source: builder.specialKeyNames,
change: inpSubKeyCapChange
change: inpSubKeyCapChange,
select: wrapInstant(inpSubKeyCapChange)
})
.on('input', inpSubKeyCapChange)
.mouseup(function () {

View file

@ -276,11 +276,13 @@ begin
{$WARN SYMBOL_PLATFORM OFF} // W1002 Symbol 'CmdLine' is specific to a platform
if CmdLine <> nil then
begin
sentry_set_tag('keyman.commandline', PAnsiChar(AnsiString(string(CmdLine))));
sentry_set_extra('keyman.commandline', sentry_value_new_string(PAnsiChar(AnsiString(string(CmdLine)))));
end;
{$WARN SYMBOL_PLATFORM DEFAULT}
sentry_set_tag('keyman.executable', PAnsiChar(AnsiString(ParamStr(0))));
sentry_set_extra('keyman.executable.fullpath', sentry_value_new_string(PAnsiChar(AnsiString(ParamStr(0)))));
sentry_set_tag('keyman.executable', PAnsiChar(AnsiString(ExtractFileName(ParamStr(0)))));
// TODO: callback to capture list of keyboard filenames, TSF settings, additional diag?
if scfCaptureExceptions in AFlags then
begin