mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-10 17:47:42 +00:00
chore(web): Merge branch 'feat/web/gesture-staging' into feat/web/gesture-staging-integration
This commit is contained in:
commit
aebfca8b0b
210 changed files with 1676 additions and 2694 deletions
2
.github/workflows/deb-packaging.yml
vendored
2
.github/workflows/deb-packaging.yml
vendored
|
|
@ -119,7 +119,7 @@ jobs:
|
|||
path: artifacts
|
||||
|
||||
- name: Build
|
||||
uses: sillsdev/gha-ubuntu-packaging@4f3a013ec28f4defc2b3d6ecb04c98815cd9de25 # v0.9
|
||||
uses: sillsdev/gha-ubuntu-packaging@1f4b7e7eacb8c82a4d874ee2c371b9bfef7e16ea # v1.0
|
||||
with:
|
||||
dist: "${{ matrix.dist }}"
|
||||
platform: "${{ matrix.arch }}"
|
||||
|
|
|
|||
33
HISTORY.md
33
HISTORY.md
|
|
@ -1,5 +1,38 @@
|
|||
# Keyman Version History
|
||||
|
||||
## 17.0.180 alpha 2023-09-25
|
||||
|
||||
* fix(linux): Fix detection of unit tests (#9606)
|
||||
|
||||
## 17.0.179 alpha 2023-09-22
|
||||
|
||||
* chore(resources): ldml: update to keyboard3 (#9588)
|
||||
* change(android,web) Use web-based popup key longpresses (#9591)
|
||||
|
||||
## 17.0.178 alpha 2023-09-21
|
||||
|
||||
* fix(linux): Correctly open files linked from help page (#9601)
|
||||
* chore(linux): Fix bugs, add dependency and update documentation (#9602)
|
||||
|
||||
## 17.0.177 alpha 2023-09-20
|
||||
|
||||
* chore(linux): Add coverage action to `ibus-keyman/build.sh` (#9583)
|
||||
* docs(common): Fix documentation for `builder_describe_internal_dependency` (#9582)
|
||||
|
||||
## 17.0.176 alpha 2023-09-19
|
||||
|
||||
* chore(oem/fv/android): Update Gradle to 7.4 (#9590)
|
||||
* refactor(linux): Rename defines to clarify purpose ️ (#9584)
|
||||
* (#9560)
|
||||
|
||||
## 17.0.175 alpha 2023-09-18
|
||||
|
||||
* chore(linux): Split startup process (#9570)
|
||||
|
||||
## 17.0.174 alpha 2023-09-16
|
||||
|
||||
* refactor(linux): Reformat file (#9569)
|
||||
|
||||
## 17.0.173 alpha 2023-09-13
|
||||
|
||||
* chore(common): Update to Unicode 15.1 (#9555)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
17.0.174
|
||||
17.0.181
|
||||
|
|
@ -229,58 +229,12 @@ function updateKMSelectionRange(start, end) {
|
|||
}
|
||||
|
||||
var lastKeyTip = null;
|
||||
function oskCreateKeyPreview(x,y,w,h,t) {
|
||||
if(lastKeyTip &&
|
||||
lastKeyTip.t == t &&
|
||||
lastKeyTip.x == x &&
|
||||
lastKeyTip.y == y &&
|
||||
lastKeyTip.w == w &&
|
||||
lastKeyTip.h == h) {
|
||||
return;
|
||||
}
|
||||
lastKeyTip = {x:x,y:y,w:w,h:h,t:t};
|
||||
|
||||
fragmentToggle = (fragmentToggle + 1) % 100;
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = t;
|
||||
var dt = div.firstChild.nodeValue;
|
||||
window.location.hash = 'showKeyPreview-'+fragmentToggle+'+x='+x+'+y='+y+'+w='+w+'+h='+h+'+t='+toHex(dt);
|
||||
}
|
||||
|
||||
function oskClearKeyPreview() {
|
||||
lastKeyTip = null;
|
||||
fragmentToggle = (fragmentToggle + 1) % 100;
|
||||
window.location.hash = 'dismissKeyPreview-'+fragmentToggle;
|
||||
}
|
||||
|
||||
function signalHelpBubbleDismissal() {
|
||||
fragmentToggle = (fragmentToggle + 1) % 100;
|
||||
window.location.hash = 'helpBubbleDismissed-'+fragmentToggle;
|
||||
}
|
||||
|
||||
function oskCreatePopup(obj,x,y) {
|
||||
if(obj != null) {
|
||||
var i;
|
||||
var s = '';
|
||||
var shift = false;
|
||||
var keyPos = x.toString() + ',' + y.toString();
|
||||
for(i=0; i<obj.length; i++)
|
||||
{
|
||||
// elementID contains the layer and coreID
|
||||
s=s+obj[i].elementID;
|
||||
if(obj[i].sp == 1 || obj[i].sp == 2) shift = true;
|
||||
if(typeof(obj[i].text) != 'undefined' && obj[i].text != null && obj[i].text != '') s=s+':'+toHex(obj[i].text);
|
||||
if(i < (obj.length -1)) s=s+';'
|
||||
}
|
||||
fragmentToggle=(fragmentToggle+1) % 100;
|
||||
var hash = 'showMore-' + fragmentToggle + '+keyPos=' + keyPos + '+keys=' + s;
|
||||
if(shift) {
|
||||
hash = hash + '+font=' + 'SpecialOSK';
|
||||
}
|
||||
window.location.hash = hash;
|
||||
}
|
||||
}
|
||||
|
||||
function suggestionPopup(obj,custom,x,y,w,h) {
|
||||
if(obj != null) {
|
||||
var s = JSON.stringify(obj);
|
||||
|
|
@ -320,12 +274,6 @@ function showKeyboard() {
|
|||
keyman.refreshOskLayout();
|
||||
}
|
||||
|
||||
function executePopupKey(keyID, keyText) {
|
||||
// KMW only needs keyID to process the popup key. keyText merely logged to console
|
||||
//window.console.log('executePopupKey('+keyID+'); keyText: ' + keyText);
|
||||
keyman.executePopupKey(keyID);
|
||||
}
|
||||
|
||||
// Cannot make it explicitly async / await on API 21.
|
||||
function executeHardwareKeystroke(code, shift, lstates, eventModifiers) {
|
||||
console_debug('executeHardwareKeystroke(code='+code+',shift='+shift+',lstates='+lstates+',eventModifiers='+eventModifiers+')');
|
||||
|
|
|
|||
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* Copyright (C) 2017 SIL International. All rights reserved.
|
||||
*/
|
||||
|
||||
package com.keyman.engine;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
final class KMKeyPreviewView extends View {
|
||||
|
||||
private float density;
|
||||
private float viewWidth, viewHeight;
|
||||
private Paint fillPaint, borderPaint;
|
||||
private int bgColor, bgColor2, borderColor;
|
||||
private float strokeWidth;
|
||||
private float borderRadius;
|
||||
private Path path;
|
||||
private RectF rect;
|
||||
|
||||
public KMKeyPreviewView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getMetrics(metrics);
|
||||
density = metrics.density;
|
||||
|
||||
viewWidth = metrics.widthPixels;
|
||||
viewHeight = metrics.heightPixels;
|
||||
borderRadius = 12 * density;
|
||||
strokeWidth = 4.0f;
|
||||
bgColor = context.getResources().getColor(R.color.key_preview_bg);
|
||||
bgColor2 = context.getResources().getColor(R.color.key_preview_bg2);
|
||||
borderColor = context.getResources().getColor(R.color.key_preview_border);
|
||||
|
||||
fillPaint = new Paint();
|
||||
fillPaint.setStyle(Style.FILL);
|
||||
fillPaint.setAlpha(250);
|
||||
fillPaint.setAntiAlias(true);
|
||||
|
||||
borderPaint = new Paint();
|
||||
borderPaint.setStyle(Style.STROKE);
|
||||
borderPaint.setStrokeWidth(strokeWidth);
|
||||
borderPaint.setAntiAlias(true);
|
||||
|
||||
initDraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawPath(path, fillPaint);
|
||||
canvas.drawPath(path, borderPaint);
|
||||
}
|
||||
|
||||
public void redraw() {
|
||||
initDraw();
|
||||
this.invalidate();
|
||||
}
|
||||
|
||||
public RectF setKeySize(int width, int height) {
|
||||
RectF viewFrame = new RectF();
|
||||
viewWidth = width * 1.6f;
|
||||
viewHeight = height * 1.6f;
|
||||
viewFrame.set(0, 0, viewWidth, viewHeight);
|
||||
return viewFrame;
|
||||
}
|
||||
|
||||
public void setBackgroundColor(int color) {
|
||||
bgColor = color;
|
||||
}
|
||||
|
||||
public void setBackgroundColor2(int color) {
|
||||
bgColor2 = color;
|
||||
}
|
||||
|
||||
public void setBorderColor(int color) {
|
||||
borderColor = color;
|
||||
}
|
||||
|
||||
private void initDraw() {
|
||||
float midX = viewWidth / 2.0f;
|
||||
float midY = viewHeight - viewHeight / 4.0f;
|
||||
float viewRight = viewWidth - strokeWidth;
|
||||
float viewBottom = viewHeight - strokeWidth;
|
||||
float r = borderRadius - strokeWidth;
|
||||
|
||||
fillPaint.setShader(new LinearGradient(0, midY - strokeWidth, 0, viewBottom, bgColor, bgColor2, Shader.TileMode.CLAMP));
|
||||
borderPaint.setColor(borderColor);
|
||||
|
||||
path = new Path();
|
||||
path.moveTo(viewWidth / 2.0f, strokeWidth);
|
||||
rect = new RectF(strokeWidth, strokeWidth, strokeWidth + r, strokeWidth + r);
|
||||
path.arcTo(rect, 270, -90);
|
||||
path.lineTo(strokeWidth, midY);
|
||||
path.lineTo(midX, viewBottom);
|
||||
path.lineTo(viewRight, midY);
|
||||
rect.set(viewRight - r, strokeWidth, viewRight, strokeWidth + r);
|
||||
path.arcTo(rect, 0, -90);
|
||||
path.close();
|
||||
}
|
||||
}
|
||||
|
|
@ -115,12 +115,6 @@ final class KMKeyboard extends WebView {
|
|||
protected boolean keyboardSet = false;
|
||||
protected boolean keyboardPickerEnabled = true;
|
||||
|
||||
public PopupWindow subKeysWindow = null;
|
||||
public PopupWindow keyPreviewWindow = null;
|
||||
|
||||
public ArrayList<HashMap<String, String>> subKeysList = null;
|
||||
public String[] subKeysWindowPos = {"0", "0"};
|
||||
|
||||
// public something-something for the suggestion.
|
||||
public PopupWindow suggestionMenuWindow = null;
|
||||
public double[] suggestionWindowPos = {0, 0};
|
||||
|
|
@ -268,22 +262,12 @@ final class KMKeyboard extends WebView {
|
|||
|
||||
@Override
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
if(e2.getY() - e1.getY() < -5) { // TODO: get better threshold value from KMW
|
||||
if (subKeysList != null && (subKeysWindow == null || !subKeysWindow.isShowing())) {
|
||||
showSubKeys(context);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongPress(MotionEvent event) {
|
||||
// This is also called for banner longpresses! Need a way to differentiate the sources.
|
||||
if (subKeysList != null && (subKeysWindow == null || !subKeysWindow.isShowing())) {
|
||||
showSubKeys(context);
|
||||
return;
|
||||
} else if (KMManager.getGlobeKeyState() == KMManager.GlobeKeyState.GLOBE_KEY_STATE_DOWN) {
|
||||
if (KMManager.getGlobeKeyState() == KMManager.GlobeKeyState.GLOBE_KEY_STATE_DOWN) {
|
||||
KMManager.setGlobeKeyState(KMManager.GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS);
|
||||
KMManager.handleGlobeKeyAction(context, true, keyboardType);
|
||||
return;
|
||||
|
|
@ -353,8 +337,6 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
|
||||
public void hideKeyboard() {
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
String jsString = "hideKeyboard()";
|
||||
loadJavascript(jsString);
|
||||
|
|
@ -381,23 +363,10 @@ final class KMKeyboard extends WebView {
|
|||
// Come to think of it, I wonder if suggestionMenuWindow was work being done to link with
|
||||
// suggestion banner longpresses - if so, it's not yet ready for proper integration...
|
||||
// and would need its own rung in this if-else ladder.
|
||||
if (subKeysWindow != null && suggestionMenuWindow == null && subKeysWindow.isShowing()) {
|
||||
// Passes KMKeyboard (subclass of WebView)'s touch events off to our subkey window
|
||||
// if active, allowing for smooth, integrated gesture control.
|
||||
subKeysWindow.getContentView().findViewById(R.id.grid).dispatchTouchEvent(event);
|
||||
} else {
|
||||
if (event.getPointerCount() > 1) {
|
||||
// Multiple points touch the screen at the same time, so dismiss any pending subkeys
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
}
|
||||
gestureDetector.onTouchEvent(event);
|
||||
}
|
||||
gestureDetector.onTouchEvent(event);
|
||||
|
||||
if (action == MotionEvent.ACTION_UP) {
|
||||
// Cleanup popups. #6636
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
}
|
||||
|
||||
return super.onTouchEvent(event);
|
||||
|
|
@ -416,23 +385,15 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
|
||||
public void onPause() {
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
dismissHelpBubble();
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
dismissHelpBubble();
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
dismissKeyPreview(0);
|
||||
dismissSubKeysWindow();
|
||||
|
||||
RelativeLayout.LayoutParams params = KMManager.getKeyboardLayoutParams();
|
||||
this.setLayoutParams(params);
|
||||
|
|
@ -450,17 +411,6 @@ final class KMKeyboard extends WebView {
|
|||
}
|
||||
}
|
||||
|
||||
public void dismissSubKeysWindow() {
|
||||
try {
|
||||
if (subKeysWindow != null && subKeysWindow.isShowing()) {
|
||||
subKeysWindow.dismiss();
|
||||
}
|
||||
subKeysList = null;
|
||||
} catch (Exception e) {
|
||||
KMLog.LogException(TAG, "", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void dismissSuggestionMenuWindow() {
|
||||
try {
|
||||
if (suggestionMenuWindow != null && suggestionMenuWindow.isShowing()) {
|
||||
|
|
@ -968,234 +918,6 @@ final class KMKeyboard extends WebView {
|
|||
return;
|
||||
}
|
||||
|
||||
@SuppressLint({"InflateParams", "ClickableViewAccessibility"})
|
||||
private void showSubKeys(Context context) {
|
||||
if (subKeysList == null || subKeysWindow != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getMetrics(metrics);
|
||||
float density = metrics.density;
|
||||
|
||||
String[] pos = subKeysWindowPos;
|
||||
int x = (int) (Float.valueOf(pos[0]) * density);
|
||||
int y = (int) (Float.valueOf(pos[1]) * density);
|
||||
|
||||
// Calculate desired size for subkey display, # of rows/cols, etc.
|
||||
int kbWidth = getWidth();
|
||||
float pvWidth, pvHeight;
|
||||
|
||||
float margin = getResources().getDimension(R.dimen.popup_margin);
|
||||
int padding = getResources().getDimensionPixelSize(R.dimen.popup_padding);
|
||||
int rows, columns;
|
||||
float buttonWidth = getResources().getDimension(R.dimen.key_width);
|
||||
float buttonHeight = getResources().getDimension(R.dimen.key_height);
|
||||
float arrowWidth = getResources().getDimension(R.dimen.popup_arrow_width);
|
||||
float arrowHeight = getResources().getDimension(R.dimen.popup_arrow_height);
|
||||
float offset_y = getResources().getDimension(R.dimen.popup_offset_y);
|
||||
|
||||
//int orientation = getResources().getConfiguration().orientation;
|
||||
//columns = (orientation == Configuration.ORIENTATION_PORTRAIT)?6:10;
|
||||
columns = (int) ((getWidth() - margin) / (buttonWidth + margin));
|
||||
int subKeysCount = subKeysList.size();
|
||||
if (subKeysCount <= columns) {
|
||||
rows = 1;
|
||||
pvWidth = (subKeysCount * (buttonWidth + padding)) + 2 * margin + padding;
|
||||
pvHeight = (buttonHeight + padding) + 2 * margin + padding + arrowHeight;
|
||||
} else {
|
||||
rows = (subKeysCount / columns);
|
||||
if (subKeysCount % columns > 0) {
|
||||
rows++;
|
||||
}
|
||||
|
||||
if (subKeysCount % rows == 0) {
|
||||
columns = subKeysCount / rows;
|
||||
} else {
|
||||
int s = (columns * rows - subKeysCount) / 2;
|
||||
columns -= s / (rows - 1);
|
||||
}
|
||||
|
||||
pvWidth = (columns * (buttonWidth + padding)) + 2 * margin + padding;
|
||||
pvHeight = (rows * (buttonHeight + padding)) + 2 * margin + padding + arrowHeight;
|
||||
}
|
||||
|
||||
// Construct from resources.
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.subkeys_popup_layout, null, false);
|
||||
|
||||
// Configure the popover view with desired size and construct its popup "arrow."
|
||||
KMPopoverView popoverView = (KMPopoverView) contentView.findViewById(R.id.kmPopoverView);
|
||||
popoverView.setSize((int) pvWidth, (int) pvHeight);
|
||||
popoverView.setArrowSize(arrowWidth, arrowHeight);
|
||||
|
||||
float px = x - pvWidth / 2.0f;
|
||||
float py = y + offset_y - pvHeight;
|
||||
if (px < 0) {
|
||||
px = 0;
|
||||
} else if ((px + pvWidth) > kbWidth) {
|
||||
px = kbWidth - pvWidth;
|
||||
}
|
||||
|
||||
if (px == 0) {
|
||||
popoverView.setArrowPosX(x);
|
||||
} else if (px == (kbWidth - pvWidth)) {
|
||||
popoverView.setArrowPosX(x - px);
|
||||
} else {
|
||||
popoverView.setArrowPosX(pvWidth / 2.0f);
|
||||
}
|
||||
|
||||
popoverView.redraw();
|
||||
|
||||
// Add needed subkeys to the popup view.
|
||||
GridLayout grid = (GridLayout) contentView.findViewById(R.id.grid);
|
||||
grid.setColumnCount(columns);
|
||||
|
||||
for (int i = 0; i < subKeysCount; i++) {
|
||||
Button button = (Button) inflater.inflate(R.layout.subkey_layout, null);
|
||||
button.setId(i + 1);
|
||||
button.setLayoutParams(new FrameLayout.LayoutParams((int) buttonWidth, (int) buttonHeight));
|
||||
// May as well set them here, keeping them in a closure than a prone-to-change field.
|
||||
// Helps keep things from totally breaking when the event handler triggering subkey menu
|
||||
// generation and the menu's event handler stop talking to each other.
|
||||
final ArrayList<HashMap<String, String>> subkeyList = subKeysList;
|
||||
button.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int index = v.getId() - 1;
|
||||
String keyId = subkeyList.get(index).get("keyId");
|
||||
String keyText = getSubkeyText(keyId, subkeyList.get(index).get("keyText"));
|
||||
String jsFormat = "executePopupKey('%s','%s')";
|
||||
String jsString = KMString.format(jsFormat, keyId, keyText);
|
||||
loadJavascript(jsString);
|
||||
}
|
||||
});
|
||||
button.setClickable(false);
|
||||
|
||||
// Show existing text for subkeys. If subkey text is blank, get from id
|
||||
String kId = subKeysList.get(i).get("keyId");
|
||||
String kText = getSubkeyText(kId, subKeysList.get(i).get("keyText"));
|
||||
String title = convertKeyText(kText);
|
||||
|
||||
// Disable Android's default uppercasing transformation on buttons.
|
||||
button.setTransformationMethod(null);
|
||||
button.setText(title);
|
||||
|
||||
if (!specialOskFont.isEmpty()) {
|
||||
button.setTypeface(KMManager.getFontTypeface(context, specialOSKFontFilename(specialOskFont)));
|
||||
} else {
|
||||
Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename());
|
||||
if (font != null) {
|
||||
button.setTypeface(font);
|
||||
} else {
|
||||
button.setTypeface(Typeface.SANS_SERIF);
|
||||
}
|
||||
}
|
||||
|
||||
FrameLayout frame = new FrameLayout(context);
|
||||
frame.setPadding(padding, padding, 0, 0);
|
||||
frame.addView(button);
|
||||
grid.addView(frame);
|
||||
}
|
||||
|
||||
grid.setOnTouchListener(new OnTouchListener() {
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
int action = event.getAction();
|
||||
int tx = (int) event.getRawX();
|
||||
int ty = (int) event.getRawY();
|
||||
|
||||
if (action == MotionEvent.ACTION_UP) {
|
||||
int count = ((ViewGroup) v).getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i);
|
||||
Button button = (Button) frame.getChildAt(0);
|
||||
if (button.isPressed()) {
|
||||
button.performClick();
|
||||
break;
|
||||
}
|
||||
}
|
||||
dismissSubKeysWindow();
|
||||
return true;
|
||||
} else if (action == MotionEvent.ACTION_MOVE) {
|
||||
int count = ((ViewGroup) v).getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
FrameLayout frame = (FrameLayout) ((ViewGroup) v).getChildAt(i);
|
||||
Button button = (Button) frame.getChildAt(0);
|
||||
int[] pos = new int[2];
|
||||
button.getLocationOnScreen(pos);
|
||||
Rect rect = new Rect();
|
||||
button.getDrawingRect(rect);
|
||||
rect.offset(pos[0], pos[1]);
|
||||
if (rect.contains(tx, ty)) {
|
||||
button.setPressed(true);
|
||||
} else {
|
||||
button.setPressed(false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if (action == MotionEvent.ACTION_DOWN) {
|
||||
// Must return true if we want the others to properly process if and when this handler
|
||||
// becomes decoupled from the keyboard's touch handler.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Now to finalize the actual window.
|
||||
subKeysWindow = new PopupWindow(contentView, (int) pvWidth, (int) pvHeight, false);
|
||||
subKeysWindow.setTouchable(true);
|
||||
subKeysWindow.setOnDismissListener(new OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
subKeysList = null;
|
||||
subKeysWindow = null;
|
||||
String jsString = "popupVisible(0)";
|
||||
loadJavascript(jsString);
|
||||
}
|
||||
});
|
||||
|
||||
int posX, posY;
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationOnScreen(kbPos);
|
||||
posX = (int) px;
|
||||
posY = kbPos[1] + (int) py;
|
||||
} else {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationInWindow(kbPos);
|
||||
posX = (int) px;
|
||||
posY = kbPos[1] + (int) py;
|
||||
}
|
||||
|
||||
dismissHelpBubble();
|
||||
this.setShouldShowHelpBubble(false);
|
||||
dismissKeyPreview(0);
|
||||
//subKeysWindow.setAnimationStyle(R.style.PopupAnim);
|
||||
|
||||
// And now to actually display it.
|
||||
subKeysWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY);
|
||||
String jsString = "popupVisible(1)";
|
||||
loadJavascript(jsString);
|
||||
}
|
||||
|
||||
// Attempt to get the subkey text.
|
||||
// If the subkey popup text is empty, parse the ID
|
||||
private String getSubkeyText(String keyID, String keyText) {
|
||||
String text = keyText;
|
||||
if (text.isEmpty()) {
|
||||
if(keyID.indexOf("U_") != -1 && keyID.indexOf("+") != -1 ) {
|
||||
// Chop off any appended '+____' portion of the key ID.
|
||||
keyID = keyID.substring(0, keyID.indexOf("+"));
|
||||
}
|
||||
text = keyID.replaceAll("U_", "\\\\u");
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Take a font JSON object and adjust to pass to JS
|
||||
* 1. Replace "source" keys for "files" keys
|
||||
|
|
@ -1255,111 +977,6 @@ final class KMKeyboard extends WebView {
|
|||
return null;
|
||||
}
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
protected void showKeyPreview(Context context, int px, int py, RectF baseKeyFrame, String text) {
|
||||
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getMetrics(metrics);
|
||||
float density = metrics.density;
|
||||
|
||||
if (keyPreviewWindow != null && keyPreviewWindow.isShowing()) {
|
||||
View contentView = keyPreviewWindow.getContentView();
|
||||
KMKeyPreviewView keyPreview = (KMKeyPreviewView) contentView.findViewById(R.id.kmKeyPreviewView);
|
||||
TextView textView = (TextView) contentView.findViewById(R.id.textView1);
|
||||
textView.setText(text);
|
||||
Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename());
|
||||
if (font != null) {
|
||||
textView.setTypeface(font);
|
||||
} else {
|
||||
textView.setTypeface(Typeface.SANS_SERIF);
|
||||
}
|
||||
|
||||
int w = (int)getResources().getDimension(R.dimen.key_width);
|
||||
int h = (int)getResources().getDimension(R.dimen.key_height);
|
||||
RectF frame = keyPreview.setKeySize(w, h);
|
||||
keyPreview.redraw();
|
||||
|
||||
float offset_y = getResources().getDimension(R.dimen.popup_offset_y);
|
||||
int posX, posY;
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationOnScreen(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
} else {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationInWindow(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
}
|
||||
|
||||
keyPreviewWindow.update(posX, posY, (int) frame.width(), (int) frame.height());
|
||||
return;
|
||||
}
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.key_preview_layout, null, false);
|
||||
KMKeyPreviewView keyPreview = (KMKeyPreviewView) contentView.findViewById(R.id.kmKeyPreviewView);
|
||||
TextView textView = (TextView) contentView.findViewById(R.id.textView1);
|
||||
textView.setText(text);
|
||||
Typeface font = KMManager.getFontTypeface(context, (oskFont != null) ? oskFontFilename() : textFontFilename());
|
||||
if (font != null) {
|
||||
textView.setTypeface(font);
|
||||
} else {
|
||||
textView.setTypeface(Typeface.SANS_SERIF);
|
||||
}
|
||||
|
||||
int w = (int)getResources().getDimension(R.dimen.key_width);
|
||||
int h = (int)getResources().getDimension(R.dimen.key_height);
|
||||
RectF frame = keyPreview.setKeySize(w, h);
|
||||
keyPreview.redraw();
|
||||
keyPreviewWindow = new PopupWindow(contentView, (int) frame.width(), (int) frame.height(), false);
|
||||
keyPreviewWindow.setTouchable(true);
|
||||
keyPreviewWindow.setOnDismissListener(new OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
keyPreviewWindow = null;
|
||||
}
|
||||
});
|
||||
|
||||
float offset_y = getResources().getDimension(R.dimen.popup_offset_y);
|
||||
int posX, posY;
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationOnScreen(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
} else {
|
||||
int[] kbPos = new int[2];
|
||||
KMKeyboard.this.getLocationInWindow(kbPos);
|
||||
posX = (int) (px * density - frame.width() / 2.0f);
|
||||
posY = kbPos[1] + (int) (py * density - frame.height() + offset_y);
|
||||
}
|
||||
|
||||
dismissHelpBubble();
|
||||
this.setShouldShowHelpBubble(false);
|
||||
//keyPreviewWindow.setAnimationStyle(R.style.KeyPreviewAnim);
|
||||
if (keyPreviewWindow != null) {
|
||||
keyPreviewWindow.showAtLocation(KMKeyboard.this, Gravity.TOP | Gravity.LEFT, posX, posY);
|
||||
}
|
||||
}
|
||||
|
||||
protected void dismissKeyPreview(long delay) {
|
||||
// dismiss after delay
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (keyPreviewWindow != null && keyPreviewWindow.isShowing())
|
||||
keyPreviewWindow.dismiss();
|
||||
} catch (Exception e) {
|
||||
KMLog.LogException(TAG, "", e);
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
protected void showHelpBubble() {
|
||||
if(keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
return; // Help bubble is disabled for System-wide keyboard
|
||||
|
|
|
|||
|
|
@ -92,10 +92,6 @@ public class KMKeyboardJSHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
if (k.subKeysWindow != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isInappKMTextViewValid(k.keyboardType)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -204,10 +200,6 @@ public class KMKeyboardJSHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
if (k.subKeysWindow != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isInappKMTextViewValid(k.keyboardType)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,78 +163,6 @@ public final class KMKeyboardWebViewClient extends WebViewClient {
|
|||
// The user has begun interacting with the keyboard; we'll disable the help bubble
|
||||
// for the rest of the lifetime of this keyboard instance.
|
||||
kmKeyboard.setShouldShowHelpBubble(false);
|
||||
} else if (url.indexOf("showKeyPreview") >= 0) {
|
||||
String deviceType = context.getResources().getString(R.string.device_type);
|
||||
if (deviceType.equals("AndroidTablet")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (kmKeyboard.subKeysWindow != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("x=") + 2;
|
||||
int end = url.indexOf("+y=");
|
||||
float x = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("y=") + 2;
|
||||
end = url.indexOf("+w=");
|
||||
float y = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("w=") + 2;
|
||||
end = url.indexOf("+h=");
|
||||
float w = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("h=") + 2;
|
||||
end = url.indexOf("+t=");
|
||||
float h = Float.valueOf(url.substring(start, end));
|
||||
|
||||
start = url.indexOf("t=") + 2;
|
||||
String t = url.substring(start);
|
||||
String text = kmKeyboard.convertKeyText(t);
|
||||
|
||||
float left = x - w / 2.0f;
|
||||
float right = left + w;
|
||||
float top = y - 1;
|
||||
float bottom = top + h;
|
||||
|
||||
RectF keyFrame = new RectF(left, top, right, bottom);
|
||||
kmKeyboard.showKeyPreview(context, (int) x, (int) y, keyFrame, text);
|
||||
} else if (url.indexOf("dismissKeyPreview") >= 0) {
|
||||
kmKeyboard.dismissKeyPreview(100);
|
||||
} else if (url.indexOf("showMore") >= 0) {
|
||||
if (kmKeyboard.subKeysWindow != null && kmKeyboard.subKeysWindow.isShowing()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int start = url.indexOf("keyPos=") + 7;
|
||||
int end = url.indexOf("+keys=");
|
||||
kmKeyboard.subKeysWindowPos = url.substring(start, end).split("\\,");
|
||||
|
||||
start = end + 6;
|
||||
end = url.indexOf("+font=");
|
||||
if (end < 0) {
|
||||
end = url.length();
|
||||
kmKeyboard.specialOskFont = "";
|
||||
} else {
|
||||
kmKeyboard.specialOskFont = KMManager.KMFilename_Osk_Ttf_Font;
|
||||
}
|
||||
|
||||
String keys = url.substring(start, end);
|
||||
|
||||
String[] keyList = keys.split("\\;");
|
||||
int klCount = keyList.length;
|
||||
kmKeyboard.subKeysList = new ArrayList<HashMap<String, String>>();
|
||||
for (int i = 0; i < klCount; i++) {
|
||||
String[] values = keyList[i].split("\\:");
|
||||
String keyId = (values.length > 0) ? values[0] : "";
|
||||
String keyText = (values.length > 1) ? values[1] : "";
|
||||
|
||||
HashMap<String, String> hashMap = new HashMap<String, String>();
|
||||
hashMap.put("keyId", keyId);
|
||||
hashMap.put("keyText", keyText);
|
||||
kmKeyboard.subKeysList.add(hashMap);
|
||||
}
|
||||
} else if (url.indexOf("refreshBannerHeight") >= 0) {
|
||||
int start = url.indexOf("change=") + 7;
|
||||
String change = url.substring(start);
|
||||
|
|
|
|||
|
|
@ -2153,15 +2153,6 @@ public final class KMManager {
|
|||
* @param keyboardType KeyboardType KEYBOARD_TYPE_INAPP or KEYBOARD_TYPE_SYSTEM
|
||||
*/
|
||||
public static void handleGlobeKeyAction(Context context, boolean globeKeyDown, KeyboardType keyboardType) {
|
||||
// Clear preview and subkeys
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
InAppKeyboard.dismissKeyPreview(0);
|
||||
InAppKeyboard.dismissSubKeysWindow();
|
||||
} else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
SystemKeyboard.dismissKeyPreview(0);
|
||||
SystemKeyboard.dismissSubKeysWindow();
|
||||
}
|
||||
|
||||
// Update globeKeyState
|
||||
if (globeKeyState != GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS) {
|
||||
globeKeyState = globeKeyDown ? GlobeKeyState.GLOBE_KEY_STATE_DOWN : GlobeKeyState.GLOBE_KEY_STATE_UP;
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.keyman.engine.KMKeyPreviewView
|
||||
android:id="@+id/kmKeyPreviewView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/preview_padding"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ffffffff" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/subkey_button"
|
||||
style="@style/subkey_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="1dp"
|
||||
android:minWidth="1dp" >
|
||||
|
||||
</Button>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.keyman.engine.KMPopoverView
|
||||
android:id="@+id/kmPopoverView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/popup_margin" >
|
||||
|
||||
</GridLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -6,9 +6,5 @@
|
|||
<color name="popup_bg">#ff282828</color>
|
||||
<color name="popup_bg2">#ff000000</color>
|
||||
<color name="popup_border">#ff282828</color>
|
||||
|
||||
<color name="key_preview_bg">#ff838383</color>
|
||||
<color name="key_preview_bg2">#ff333333</color>
|
||||
<color name="key_preview_border">#ff737373</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -213,8 +213,8 @@ export class GestureSourceSubview<HoveredItemType> extends GestureSource<Hovered
|
|||
let start = 0;
|
||||
let length = source.path.coords.length;
|
||||
if(source instanceof GestureSourceSubview) {
|
||||
const expectedLength = source._baseStartIndex + source.path.coords.length;
|
||||
start = source._baseStartIndex;
|
||||
const expectedLength = start + length;
|
||||
// Check against the full remaining length of the original source; does
|
||||
// the subview provided to us include its source's most recent point?
|
||||
const sampleCountSinceStart = source.baseSource.path.coords.length;
|
||||
|
|
@ -256,8 +256,7 @@ export class GestureSourceSubview<HoveredItemType> extends GestureSource<Hovered
|
|||
|
||||
subpath = new GesturePath<HoveredItemType>();
|
||||
for(let i=0; i < length; i++) {
|
||||
const index = start + i;
|
||||
subpath.extend(translateSample(baseSource.path.coords[index]));
|
||||
subpath.extend(translateSample(baseSource.path.coords[start + i]));
|
||||
}
|
||||
|
||||
this._path = subpath;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,19 @@ import { GestureModel, GestureResolution, GestureResolutionSpec, RejectionDefaul
|
|||
import { ManagedPromise, TimeoutPromise } from "@keymanapp/web-utils";
|
||||
import { FulfillmentCause, PathMatcher } from "./pathMatcher.js";
|
||||
|
||||
/**
|
||||
* This interface specifies the minimal data necessary for setting up gesture-selection
|
||||
* among a set of gesture models that will conceptually follow from the most
|
||||
* recently-matched gesture-model. The most standard implementation of this is the
|
||||
* `GestureMatcher` class.
|
||||
*
|
||||
* Up until very recently, KeymanWeb would delegate certain gestures to be handled by
|
||||
* host apps when it was in an embedded state. While that pattern has been dropped,
|
||||
* the abstraction gained from reaching compatibility with it is useful. Either way,
|
||||
* for such scenarios, as long as fulfilled gestures can be linked to an implementation
|
||||
* of this interface, they can be integrated into the gesture-sequence staging system -
|
||||
* even if not matched directly by the recognizer itself.
|
||||
*/
|
||||
export interface PredecessorMatch<Type> {
|
||||
readonly sources: GestureSource<Type>[];
|
||||
readonly allSourceIds: string[];
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ interface MockedPredecessor<Type> {
|
|||
sample: InputSample<Type>,
|
||||
baseItem: Type
|
||||
},
|
||||
sources: GestureSource<Type>[], // FIX ME.
|
||||
sources: GestureSource<Type>[],
|
||||
_result: {
|
||||
action: {
|
||||
item: Type
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ builder_parse "$@"
|
|||
function compile_schemas() {
|
||||
# We need the schema files at runtime and bundled, so always copy it for all actions except `clean`
|
||||
local schemas=(
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json"
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json"
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json"
|
||||
"$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json"
|
||||
"$KEYMAN_ROOT/common/schemas/kvks/kvks.schema.json"
|
||||
"$KEYMAN_ROOT/common/schemas/kpj/kpj.schema.json"
|
||||
"$KEYMAN_ROOT/common/schemas/kpj-9.0/kpj-9.0.schema.json"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface LDMLKeyboardTestDataXMLSourceFile {
|
|||
/**
|
||||
* <keyboardTest> -- the root element.
|
||||
*/
|
||||
keyboardTest: LKTKeyboardTest;
|
||||
keyboardTest3: LKTKeyboardTest;
|
||||
}
|
||||
|
||||
export interface LKTKeyboardTest {
|
||||
|
|
|
|||
|
|
@ -39,27 +39,27 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
* @returns true on success, false on failure
|
||||
*/
|
||||
private boxArrays(source: any) : boolean {
|
||||
if (source?.keyboard) {
|
||||
if (!source.keyboard.keys) {
|
||||
source.keyboard.keys = {
|
||||
if (source?.keyboard3) {
|
||||
if (!source.keyboard3.keys) {
|
||||
source.keyboard3.keys = {
|
||||
key: [],
|
||||
flicks: [],
|
||||
};
|
||||
}
|
||||
if (!source.keyboard.keys.import) {
|
||||
source.keyboard.keys.import = [];
|
||||
if (!source.keyboard3.keys.import) {
|
||||
source.keyboard3.keys.import = [];
|
||||
}
|
||||
}
|
||||
boxXmlArray(source?.keyboard, 'layers');
|
||||
boxXmlArray(source?.keyboard?.displays, 'display');
|
||||
boxXmlArray(source?.keyboard?.names, 'name');
|
||||
boxXmlArray(source?.keyboard?.vkeys, 'vkey');
|
||||
boxXmlArray(source?.keyboard?.keys, 'key');
|
||||
boxXmlArray(source?.keyboard?.keys, 'flicks');
|
||||
boxXmlArray(source?.keyboard?.locales, 'locale');
|
||||
boxXmlArray(source?.keyboard, 'transforms');
|
||||
if(source?.keyboard?.layers) {
|
||||
for(let layers of source?.keyboard?.layers) {
|
||||
boxXmlArray(source?.keyboard3, 'layers');
|
||||
boxXmlArray(source?.keyboard3?.displays, 'display');
|
||||
boxXmlArray(source?.keyboard3?.names, 'name');
|
||||
boxXmlArray(source?.keyboard3?.vkeys, 'vkey');
|
||||
boxXmlArray(source?.keyboard3?.keys, 'key');
|
||||
boxXmlArray(source?.keyboard3?.keys, 'flicks');
|
||||
boxXmlArray(source?.keyboard3?.locales, 'locale');
|
||||
boxXmlArray(source?.keyboard3, 'transforms');
|
||||
if(source?.keyboard3?.layers) {
|
||||
for(let layers of source?.keyboard3?.layers) {
|
||||
boxXmlArray(layers, 'layer');
|
||||
if(layers?.layer) {
|
||||
for(let layer of layers?.layer) {
|
||||
|
|
@ -68,18 +68,18 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(source?.keyboard?.keys?.flicks) {
|
||||
for(let flicks of source?.keyboard?.keys?.flicks) {
|
||||
if(source?.keyboard3?.keys?.flicks) {
|
||||
for(let flicks of source?.keyboard3?.keys?.flicks) {
|
||||
boxXmlArray(flicks, 'flick');
|
||||
}
|
||||
}
|
||||
if(source?.keyboard?.variables) {
|
||||
boxXmlArray(source?.keyboard?.variables, 'set');
|
||||
boxXmlArray(source?.keyboard?.variables, 'string');
|
||||
boxXmlArray(source?.keyboard?.variables, 'unicodeSet');
|
||||
if(source?.keyboard3?.variables) {
|
||||
boxXmlArray(source?.keyboard3?.variables, 'set');
|
||||
boxXmlArray(source?.keyboard3?.variables, 'string');
|
||||
boxXmlArray(source?.keyboard3?.variables, 'unicodeSet');
|
||||
}
|
||||
if(source?.keyboard?.transforms) {
|
||||
for(let transforms of source.keyboard.transforms) {
|
||||
if(source?.keyboard3?.transforms) {
|
||||
for(let transforms of source.keyboard3.transforms) {
|
||||
boxXmlArray(transforms, 'transformGroup');
|
||||
for (let transformGroup of transforms.transformGroup) {
|
||||
boxXmlArray(transformGroup, 'transform');
|
||||
|
|
@ -208,7 +208,7 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
*/
|
||||
public validate(source: LDMLKeyboardXMLSourceFile | LDMLKeyboardTestDataXMLSourceFile): boolean {
|
||||
const ajv = new Ajv();
|
||||
if(!ajv.validate(Schemas.ldmlKeyboard, source)) {
|
||||
if(!ajv.validate(Schemas.ldmlKeyboard3, source)) {
|
||||
for (let err of ajv.errors) {
|
||||
this.callbacks.reportMessage(CommonTypesMessages.Error_SchemaValidationError({
|
||||
instancePath: err.instancePath,
|
||||
|
|
@ -345,16 +345,16 @@ export class LDMLKeyboardXMLSourceFileReader {
|
|||
boxTestDataArrays(raw: any) : LDMLKeyboardTestDataXMLSourceFile | null {
|
||||
if (!raw) return null;
|
||||
const a : LDMLKeyboardTestDataXMLSourceFile = {
|
||||
keyboardTest: {
|
||||
conformsTo: raw?.keyboardTest?.$?.conformsTo,
|
||||
keyboardTest3: {
|
||||
conformsTo: raw?.keyboardTest3?.$?.conformsTo,
|
||||
}
|
||||
};
|
||||
|
||||
const $$ : NameAndProps[] = raw?.keyboardTest?.$$;
|
||||
const $$ : NameAndProps[] = raw?.keyboardTest3?.$$;
|
||||
|
||||
this.stuffBoxes(a.keyboardTest, $$, 'info');
|
||||
this.stuffBoxes(a.keyboardTest, $$, 'repertoire', true);
|
||||
this.stuffBoxes(a.keyboardTest, $$, 'tests', true, (o, r) => {
|
||||
this.stuffBoxes(a.keyboardTest3, $$, 'info');
|
||||
this.stuffBoxes(a.keyboardTest3, $$, 'repertoire', true);
|
||||
this.stuffBoxes(a.keyboardTest3, $$, 'tests', true, (o, r) => {
|
||||
// start with basic unpack
|
||||
const tests : LKTTests = LDMLKeyboardXMLSourceFileReader.defaultMapper(o, r);
|
||||
// add ingredients
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface LDMLKeyboardXMLSourceFile {
|
|||
/**
|
||||
* <keyboard> -- the root element.
|
||||
*/
|
||||
keyboard: LKKeyboard;
|
||||
keyboard3: LKKeyboard;
|
||||
}
|
||||
|
||||
export interface LKKeyboard {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
import kpj from './schemas/kpj.schema.js';
|
||||
import kpj90 from './schemas/kpj-9.0.schema.js';
|
||||
import kvks from './schemas/kvks.schema.js';
|
||||
import ldmlKeyboard from './schemas/ldml-keyboard.schema.js';
|
||||
import ldmlKeyboardTest from './schemas/ldml-keyboardtest.schema.js';
|
||||
import ldmlKeyboard3 from './schemas/ldml-keyboard3.schema.js';
|
||||
import ldmlKeyboardTest3 from './schemas/ldml-keyboardtest3.schema.js';
|
||||
import displayMap from './schemas/displaymap.schema.js';
|
||||
import touchLayoutClean from './schemas/keyman-touch-layout.clean.spec.js';
|
||||
import touchLayout from './schemas/keyman-touch-layout.spec.js';
|
||||
|
|
@ -12,11 +12,11 @@ const Schemas = {
|
|||
kpj,
|
||||
kpj90,
|
||||
kvks,
|
||||
ldmlKeyboard,
|
||||
ldmlKeyboardTest,
|
||||
ldmlKeyboard3,
|
||||
ldmlKeyboardTest3,
|
||||
displayMap,
|
||||
touchLayoutClean,
|
||||
touchLayout,
|
||||
};
|
||||
|
||||
export default Schemas;
|
||||
export default Schemas;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
</names>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
<keys>
|
||||
|
||||
</keys>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
<keys>
|
||||
<key id="a" to="å"/> <!-- override -->
|
||||
</keys>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="und" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
|
|
@ -10,4 +10,4 @@
|
|||
<key id="zz" to="zz"/>
|
||||
<key id="hash" to="##"/> <!-- override -->
|
||||
</keys>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd"
|
||||
Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc.
|
||||
-->
|
||||
<keyboard locale="mt" conformsTo="nothing-anyone-ever-heard-of"> <!-- invalid -->
|
||||
<keyboard3 locale="mt" conformsTo="nothing-anyone-ever-heard-of"> <!-- invalid -->
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<key id="that" to="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd"
|
||||
DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd"
|
||||
Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc.
|
||||
-->
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
</keyboard>
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
</keyboard3>
|
||||
|
|
|
|||
6
common/web/types/test/fixtures/test-fr.xml
vendored
6
common/web/types/test/fixtures/test-fr.xml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="fr-t-k0-azerty.xml" author="Team Keyboard" name="fr-test" />
|
||||
<repertoire name="simple-repertoire" chars="[a b c d e \u{22}]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
|
||||
<repertoire name="chars-repertoire" chars="[á é ó]" type="gesture" /> <!-- verify that these outputs are all available from simple or gesture keys on any layer, for touch -->
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<check result="abc\u0022...stuv" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export function testReaderCases(cases : CompilationCase[]) {
|
|||
assert.includeDeepMembers(callbacks.messages, testcase.warnings, 'expected warnings to be included');
|
||||
} else if (!expectFailure) {
|
||||
// no warnings, so expect zero messages
|
||||
assert.strictEqual(callbacks.messages.length, 0, 'expected zero messages');
|
||||
assert.deepEqual(callbacks.messages, [], 'expected zero messages');
|
||||
}
|
||||
|
||||
// run the user-supplied callback if any
|
||||
|
|
|
|||
|
|
@ -11,16 +11,16 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
subpath: 'test-fr.xml',
|
||||
callback: (data, source) => {
|
||||
assert.ok(source);
|
||||
assert.ok(source.keyboardTest);
|
||||
assert.equal(source.keyboardTest.conformsTo, constants.cldr_version_latest);
|
||||
assert.ok(source.keyboardTest3);
|
||||
assert.equal(source.keyboardTest3.conformsTo, constants.cldr_version_latest);
|
||||
|
||||
assert.deepEqual(source.keyboardTest.info, {
|
||||
assert.deepEqual(source.keyboardTest3.info, {
|
||||
keyboard: 'fr-t-k0-azerty.xml',
|
||||
author: 'Team Keyboard',
|
||||
name: 'fr-test'
|
||||
});
|
||||
|
||||
assert.sameDeepMembers(source.keyboardTest.repertoire, [
|
||||
assert.sameDeepMembers(source.keyboardTest3.repertoire, [
|
||||
{
|
||||
name: 'simple-repertoire',
|
||||
chars: '[a b c d e \\u{22}]',
|
||||
|
|
@ -29,10 +29,10 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{ name: 'chars-repertoire', chars: '[á é ó]', type: 'gesture' }
|
||||
]);
|
||||
|
||||
assert.equal(1, source.keyboardTest.tests?.length);
|
||||
assert.equal('key-tests', source.keyboardTest.tests[0].name);
|
||||
assert.equal(1, source.keyboardTest.tests[0].test?.length);
|
||||
const test0 = source.keyboardTest.tests[0].test[0];
|
||||
assert.equal(1, source.keyboardTest3.tests?.length);
|
||||
assert.equal('key-tests', source.keyboardTest3.tests[0].name);
|
||||
assert.equal(1, source.keyboardTest3.tests[0].test?.length);
|
||||
const test0 = source.keyboardTest3.tests[0].test[0];
|
||||
assert.equal('key-test', test0.name);
|
||||
assert.equal('abc\\u0022...', test0.startContext?.to);
|
||||
assert.sameDeepOrderedMembers([
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'invalid-structure-per-dtd.xml',
|
||||
errors: [CommonTypesMessages.Error_SchemaValidationError({
|
||||
instancePath: '/keyboard',
|
||||
instancePath: '/keyboard3',
|
||||
keyword: 'required',
|
||||
message: `must have required property 'names'`,
|
||||
params: 'missingProperty="names"',
|
||||
|
|
@ -24,7 +24,7 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'invalid-conforms-to.xml',
|
||||
errors: [CommonTypesMessages.Error_SchemaValidationError({
|
||||
instancePath: '/keyboard/conformsTo',
|
||||
instancePath: '/keyboard3/conformsTo',
|
||||
keyword: 'enum',
|
||||
message: `must be equal to one of the allowed values`,
|
||||
params: 'allowedValues="techpreview"',
|
||||
|
|
@ -33,8 +33,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-minimal.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'},
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
@ -45,8 +45,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-minimal1.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'},
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
@ -57,8 +57,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-minimal2.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'},
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
@ -70,8 +70,8 @@ describe('ldml keyboard xml reader tests', function () {
|
|||
{
|
||||
subpath: 'import-symbols.xml',
|
||||
callback: (data, source, subpath, callbacks) => {
|
||||
assert.ok(source?.keyboard?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']);
|
||||
assert.ok(source?.keyboard3?.keys);
|
||||
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']);
|
||||
assert.sameDeepOrderedMembers(k, [
|
||||
{id: 'a', to: 'a'}, // implied
|
||||
{id: 'b', to: 'b'},
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
@@expect-error: This keyboard is invalid, so it will fail to load
|
||||
|
||||
-->
|
||||
<keyboard />
|
||||
<keyboard3 />
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
@@expect:
|
||||
|
||||
-->
|
||||
<keyboard />
|
||||
<keyboard3 />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_001_tiny.xml" author="srl295" name="k_001_tiny" />
|
||||
<!-- <repertoire chars="[ħ ថា]" type="simple" name="our-little-language" /> TODO-LDML: not working yet -->
|
||||
<repertoire chars="[ħ]" type="simple" name="minus-khmer" />
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<check result="ħថាħ"/>
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
@@expected: \u0127\u1790\u17B6\u0127
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -26,4 +26,4 @@
|
|||
<row keys="hmaqtugha that" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@@expected: \u0127\u1790\u17B6\u0127\uD83D\uDE40\u0127
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -25,4 +25,4 @@
|
|||
<row keys="hmaqtugha that screamcat" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
@@expected: qu\u00ea
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -58,4 +58,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="ab" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@@expected: \u0037\u1790\u17B6\u0127
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -29,4 +29,4 @@
|
|||
<row keys="seven eee" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
@@expected: \u0061\u0041\u0062\u0063\u0064\u0064\u0065\u0066\u0067\u0067
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -42,4 +42,4 @@
|
|||
<row keys="g" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
@@expected: t
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -58,4 +58,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="ab" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_007_transform_rgx.xml" author="Team Keyboard" name="marker" />
|
||||
<tests name="regex-tests">
|
||||
<test name="regex-test-basic">
|
||||
|
|
@ -21,4 +21,4 @@
|
|||
<check result="ayy" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-keyboards.md#element-transform
|
||||
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -45,4 +45,4 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
<transform from="($[upper])`" to="$[1:lower]"/> <!-- Lowercase (and drop grave): A` » a -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ Gets part of the way,
|
|||
Based on mt.xml from CLDR. 'TODO-LDML' denotes modifications.
|
||||
Note this is the 47-key version.
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<!-- remainder entirely from resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml -->
|
||||
<keyboard locale="mt-t-k0-47key" conformsTo="techpreview">
|
||||
<keyboard3 locale="mt-t-k0-47key" conformsTo="techpreview">
|
||||
<locales>
|
||||
<!-- English is also an official language in Malta.-->
|
||||
<locale id="en" />
|
||||
|
|
@ -93,4 +93,4 @@ Gets part of the way,
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
- an updated DTD path
|
||||
- test case
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<locales>
|
||||
<!-- English is also an official language in Malta.-->
|
||||
<locale id="en" />
|
||||
|
|
@ -90,4 +90,4 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Note: similar to, but slightly ahead of, fr-t-k0-azerty -->
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_020_fr.xml" author="Team Keyboard" name="fr-test-updated" />
|
||||
<repertoire name="simple-repertoire" chars="[a b c d e \u0022]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
|
||||
<repertoire name="chars-repertoire" chars="[á é ó]" type="gesture" /> <!-- verify that these outputs are all available from simple or gesture keys on any layer, for touch -->
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
<check result="abc\u0022...stuv" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Note: similar to, but slightly ahead of, fr-t-k0-azerty -->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="fr-t-k0-azerty" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="fr-t-k0-azerty" conformsTo="techpreview">
|
||||
<locales>
|
||||
<locale id="br" /> <!-- example of including Breton -->
|
||||
</locales>
|
||||
|
|
@ -195,4 +195,4 @@
|
|||
</transformGroup>
|
||||
</transforms>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
@@expected: \u0061
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
<row keys="a gap"/>
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
@@keys: [K_BKQUOTE]
|
||||
@@expected: \u0061
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -26,4 +26,4 @@
|
|||
<row keys="a" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
@@expected: \u0061
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_200_reorder_nod_Lana.xml" author="Team Keyboard" name="nod-Lana" />
|
||||
<tests name="reorder-tests">
|
||||
<test name="roast00-orig-emit">
|
||||
|
|
@ -54,4 +54,4 @@
|
|||
<check result="\u1A21\u1A60\u1A45\u1A6B\u1A76" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
see https://keyman.com/keyboards/sil_boonkit
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="nod" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="nod" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="nod-Lana Test" />
|
||||
|
|
@ -46,4 +46,4 @@
|
|||
<reorder before="\u1A6B" from="\u1A60[\u1A75-\u1A79]\u1A45" order="10 55 10" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest.dtd">
|
||||
<keyboardTest conformsTo="techpreview">
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="k_210_marker.xml" author="Team Keyboard" name="marker" />
|
||||
<tests name="marker-tests">
|
||||
<test name="marker-test-basic-grave">
|
||||
|
|
@ -43,4 +43,4 @@
|
|||
<check result="é" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest>
|
||||
</keyboardTest3>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
Test Keyboard
|
||||
-->
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="en" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Marker Test" />
|
||||
|
|
@ -50,4 +50,4 @@
|
|||
<!-- no cleanup for trailing acute -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -698,15 +698,15 @@ int LdmlJsonTestSourceFactory::load(const km::kbp::path &compiled, const km::kbp
|
|||
return __LINE__;
|
||||
}
|
||||
|
||||
auto conformsTo = data["/keyboardTest/conformsTo"_json_pointer].get<std::string>();
|
||||
auto conformsTo = data["/keyboardTest3/conformsTo"_json_pointer].get<std::string>();
|
||||
assert_or_return(std::string(LDML_CLDR_VERSION_LATEST) == conformsTo);
|
||||
auto info_keyboard = data["/keyboardTest/info/keyboard"_json_pointer].get<std::string>();
|
||||
auto info_author = data["/keyboardTest/info/author"_json_pointer].get<std::string>();
|
||||
auto info_name = data["/keyboardTest/info/name"_json_pointer].get<std::string>();
|
||||
auto info_keyboard = data["/keyboardTest3/info/keyboard"_json_pointer].get<std::string>();
|
||||
auto info_author = data["/keyboardTest3/info/author"_json_pointer].get<std::string>();
|
||||
auto info_name = data["/keyboardTest3/info/name"_json_pointer].get<std::string>();
|
||||
// TODO-LDML: store these elsewhere?
|
||||
std::cout << "JSON: reading " << info_name << " test of " << info_keyboard << " by " << info_author << std::endl;
|
||||
|
||||
auto all_tests = data["/keyboardTest/tests"_json_pointer];
|
||||
auto all_tests = data["/keyboardTest3/tests"_json_pointer];
|
||||
assert_or_return((!all_tests.empty()) && (all_tests.size() > 0)); // TODO-LDML: can be empty if repertoire only?
|
||||
|
||||
for(auto tests : all_tests) {
|
||||
|
|
@ -724,7 +724,7 @@ int LdmlJsonTestSourceFactory::load(const km::kbp::path &compiled, const km::kbp
|
|||
}
|
||||
|
||||
#if defined(HAVE_ICU4C)
|
||||
auto rep_tests = data["/keyboardTest/repertoire"_json_pointer];
|
||||
auto rep_tests = data["/keyboardTest3/repertoire"_json_pointer];
|
||||
assert_or_return((!rep_tests.empty()) && (rep_tests.size() > 0)); // TODO-LDML: can be empty if tests only?
|
||||
|
||||
for(auto rep : rep_tests) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ make-kmcomp-install-zip: copy-schemas
|
|||
|
||||
# TODO: are these required?
|
||||
# kpj.schema.json kvks.schema.json \
|
||||
# ldml-keyboard.schema.json ldml-keyboardtest.schema.json \
|
||||
# ldml-keyboard3.schema.json ldml-keyboardtest3.schema.json \
|
||||
|
||||
copy-schemas:
|
||||
copy $(KEYMAN_ROOT)\common\schemas\keyboard_info\keyboard_info.source.json $(DEVELOPER_ROOT)\bin
|
||||
|
|
|
|||
|
|
@ -421,6 +421,17 @@ export class KmnCompiler implements UnicodeSetParser {
|
|||
return Module.kmcmp_testSentry();
|
||||
}
|
||||
|
||||
/** convert `\u{1234}` to `\u1234` etc */
|
||||
public static fixNewPattern(pattern: string) : string {
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{6})\}/g, `\\U00$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{5})\}/g, `\\U000$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{4})\}/g, `\\u$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{3})\}/g, `\\u0$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{2})\}/g, `\\u00$1`);
|
||||
pattern = pattern.replaceAll(/\\u\{([0-9a-fA-F]{1})\}/g, `\\u000$1`);
|
||||
return pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pattern UnicodeSet pattern such as `[a-z]`
|
||||
|
|
@ -435,6 +446,8 @@ export class KmnCompiler implements UnicodeSetParser {
|
|||
|
||||
// TODO-LDML: Catch OOM
|
||||
const buf = this.wasmExports.malloc(rangeCount * 2 * Module.HEAPU32.BYTES_PER_ELEMENT);
|
||||
// fix \u1234 pattern format
|
||||
pattern = KmnCompiler.fixNewPattern(pattern);
|
||||
/** If <= 0: return code. If positive: range count */
|
||||
const rc = Module.kmcmp_parseUnicodeSet(pattern, buf, rangeCount * 2);
|
||||
if (rc >= 0) {
|
||||
|
|
@ -459,6 +472,8 @@ export class KmnCompiler implements UnicodeSetParser {
|
|||
/* c8 ignore next 2 */
|
||||
return null;
|
||||
}
|
||||
// fix \u1234 pattern format
|
||||
pattern = KmnCompiler.fixNewPattern(pattern);
|
||||
// call with rangeCount = 0 to invoke in 'preflight' mode.
|
||||
const rc = Module.kmcmp_parseUnicodeSet(pattern, 0, 0);
|
||||
if (rc >= 0) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,22 @@ import { CompilerMessages } from '../src/compiler/messages.js';
|
|||
import { compilerErrorFormatCode } from '@keymanapp/common-types';
|
||||
|
||||
describe('Compiler UnicodeSet function', function() {
|
||||
it('should fixup "short" \\u{} escapes', function () {
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{A}`), `\\u000A`); // "
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{22}`), `\\u0022`); // "
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{ead}`), `\\u0ead`); // "
|
||||
});
|
||||
it('should fixup \\u1234 format escapes', function() {
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{1234}`), `\\u1234`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u1234`), `\\u1234`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`[\\u{1234}-\\u{5678}]`), `[\\u1234-\\u5678]`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`something else`), `something else`);
|
||||
});
|
||||
it('should fixup supplemental \\u format escapes', function() {
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{1F640}`), `\\U0001F640`);
|
||||
assert.equal(KmnCompiler.fixNewPattern(`\\u{10FFFD}`),`\\U0010FFFD`);
|
||||
});
|
||||
|
||||
it('should start', async function() {
|
||||
const compiler = new KmnCompiler();
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
|
|
@ -51,6 +67,33 @@ describe('Compiler UnicodeSet function', function() {
|
|||
assert.deepEqual(callbacks.messages, []);
|
||||
assert.equal(len2, set.length);
|
||||
});
|
||||
it('should compile an even more complex uset', async function() {
|
||||
const compiler = new KmnCompiler();
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
assert(await compiler.init(callbacks));
|
||||
assert(compiler.verifyInitialized());
|
||||
|
||||
const pat = "[\\u{10FFFD}\\u{2019}\\u{22}\\u{a}\\u{ead}\\u{1F640}]";
|
||||
const set = compiler.parseUnicodeSet(pat, 23);
|
||||
|
||||
assert.equal(set.length, 6);
|
||||
// verify we're all single chars
|
||||
for (let i = 0; i<set.length; i++) {
|
||||
assert.equal(set.ranges[i][0], set.ranges[i][1], `Range ${i} should be a single char`);
|
||||
}
|
||||
// check the single char value
|
||||
assert.equal(set.ranges[0][0], 0x000A);
|
||||
assert.equal(set.ranges[1][0], 0x0022);
|
||||
assert.equal(set.ranges[2][0], 0x0EAD);
|
||||
assert.equal(set.ranges[3][0], 0x2019);
|
||||
assert.equal(set.ranges[4][0], 0x1F640);
|
||||
assert.equal(set.ranges[5][0], 0x10FFFD);
|
||||
assert.deepEqual(callbacks.messages, []);
|
||||
callbacks.clear();
|
||||
const len2 = compiler.sizeUnicodeSet(pat);
|
||||
assert.deepEqual(callbacks.messages, []);
|
||||
assert.equal(len2, set.length);
|
||||
});
|
||||
it('should fail in various ways', async function() {
|
||||
const compiler = new KmnCompiler();
|
||||
const callbacks = new TestCompilerCallbacks();
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ export class DispCompiler extends SectionCompiler {
|
|||
const tos = new Set();
|
||||
const ids = new Set();
|
||||
|
||||
if (this.keyboard.displays?.display) {
|
||||
for (const { to, id } of this.keyboard.displays?.display) {
|
||||
if (this.keyboard3.displays?.display) {
|
||||
for (const { to, id } of this.keyboard3.displays?.display) {
|
||||
if ((to && id) || (!to && !id)) {
|
||||
this.callbacks.reportMessage(CompilerMessages.Error_DisplayNeedsToOrId({ to, id }));
|
||||
return false;
|
||||
|
|
@ -57,12 +57,12 @@ export class DispCompiler extends SectionCompiler {
|
|||
let result = new Disp();
|
||||
|
||||
// displayOptions
|
||||
result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard.displays?.displayOptions?.baseCharacter);
|
||||
result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard3.displays?.displayOptions?.baseCharacter);
|
||||
|
||||
// TODO-LDML: substitute variables!
|
||||
|
||||
// displays
|
||||
result.disps = this.keyboard.displays?.display.map(display => ({
|
||||
result.disps = this.keyboard3.displays?.display.map(display => ({
|
||||
to: sections.strs.allocAndUnescapeString(sections.vars.substituteMarkerString(display.to)),
|
||||
id: sections.strs.allocString(display.id), // not escaped, not substituted
|
||||
display: sections.strs.allocAndUnescapeString(display.display),
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ export class LdmlKeyboardKeymanWebCompiler {
|
|||
// `${tab}${this.setupDebug()}${nl}` + ? we may use this for modifierBitmask in future
|
||||
// `${tab}this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;${nl}` + ? we probably don't need this, it's for back-compat
|
||||
`${tab}this.KI="${sName}";${nl}` +
|
||||
`${tab}this.KN=${JSON.stringify(source.keyboard.names.name[0])};${nl}` +
|
||||
`${tab}this.KN=${JSON.stringify(source.keyboard3.names.name[0])};${nl}` +
|
||||
`${tab}this.KMINVER=${JSON.stringify(MINIMUM_KMW_VERSION)};${nl}` +
|
||||
`${tab}this.KV=${this.compileVisualKeyboard(source)};${nl}` +
|
||||
`${tab}this.KDU=${displayUnderlying ? '1' : '0'};${nl}` +
|
||||
`${tab}this.KH="";${nl}` + // TODO-LDML: help text not supported
|
||||
`${tab}this.KM=0;${nl}` + // TODO-LDML: mnemonic layout not supported for LDML keyboards
|
||||
`${tab}this.KBVER=${JSON.stringify(source.keyboard.version?.number || '0.0')};${nl}` +
|
||||
`${tab}this.KBVER=${JSON.stringify(source.keyboard3.version?.number || '0.0')};${nl}` +
|
||||
`${tab}this.KMBM=${modifierBitmask};${nl}`;
|
||||
|
||||
if(isRTL) {
|
||||
|
|
@ -111,4 +111,4 @@ export class LdmlKeyboardKeymanWebCompiler {
|
|||
result += `}${nl}`;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ export class KeysCompiler extends SectionCompiler {
|
|||
* @returns just the non-touch layers.
|
||||
*/
|
||||
public hardwareLayers() {
|
||||
return this.keyboard.layers?.filter(({ form }) => form !== "touch");
|
||||
return this.keyboard3.layers?.filter(({ form }) => form !== "touch");
|
||||
}
|
||||
|
||||
public validate() {
|
||||
let valid = true;
|
||||
|
||||
// general key-level validation here, only of used keys
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]);
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
|
||||
for (let key of uniqueKeys) {
|
||||
const { id, flicks } = key;
|
||||
if (!usedKeys.has(id)) {
|
||||
|
|
@ -48,7 +48,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
if (!flicks) {
|
||||
continue; // no flicks
|
||||
}
|
||||
const flickEntry = this.keyboard.keys?.flicks?.find(
|
||||
const flickEntry = this.keyboard3.keys?.flicks?.find(
|
||||
(x) => x.id === flicks
|
||||
);
|
||||
if (!flickEntry) {
|
||||
|
|
@ -80,7 +80,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
|
||||
public compile(sections: DependencySections): Keys {
|
||||
/* c8 ignore next 4 */
|
||||
if (!this.keyboard?.keys?.key && !this.keyboard?.keys?.flicks) {
|
||||
if (!this.keyboard3?.keys?.key && !this.keyboard3?.keys?.flicks) {
|
||||
// short-circuit if no keys or flicks. Doesn't happen in practice due to implied import.
|
||||
return null;
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
}
|
||||
|
||||
public loadFlicks(sections: DependencySections, sect: Keys) {
|
||||
for (let lkflicks of this.keyboard.keys.flicks) {
|
||||
for (let lkflicks of this.keyboard3.keys.flicks) {
|
||||
let flicks: KeysFlicks = new KeysFlicks(
|
||||
sections.strs.allocString(lkflicks.id)
|
||||
);
|
||||
|
|
@ -142,8 +142,8 @@ export class KeysCompiler extends SectionCompiler {
|
|||
}
|
||||
|
||||
public loadKeys(sections: DependencySections, sect: Keys) {
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]);
|
||||
const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
|
||||
|
||||
for (let key of uniqueKeys) {
|
||||
if (!usedKeys.has(key.id)) {
|
||||
|
|
@ -227,7 +227,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
valid = false;
|
||||
}
|
||||
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard.keys?.key]);
|
||||
const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
|
||||
if (layer.row.length > keymap.length) {
|
||||
this.callbacks.reportMessage(
|
||||
CompilerMessages.Error_HardwareLayerHasTooManyRows()
|
||||
|
|
@ -300,7 +300,7 @@ export class KeysCompiler extends SectionCompiler {
|
|||
|
||||
// TODO-LDML: we already validated that the key exists, above.
|
||||
// So here we only need the ID?
|
||||
// let keydef = this.keyboard.keys?.key?.find(x => x.id == key);
|
||||
// let keydef = this.keyboard3.keys?.key?.find(x => x.id == key);
|
||||
|
||||
sect.kmap.push({
|
||||
vkey: keymap[y][x],
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export class LayrCompiler extends SectionCompiler {
|
|||
let totalLayerCount = 0;
|
||||
let hardwareLayers = 0;
|
||||
// let touchLayers = 0;
|
||||
this.keyboard.layers?.forEach((layers) => {
|
||||
this.keyboard3.layers?.forEach((layers) => {
|
||||
const { form } = layers;
|
||||
if (form === 'touch') {
|
||||
// touchLayers++;
|
||||
|
|
@ -62,7 +62,7 @@ export class LayrCompiler extends SectionCompiler {
|
|||
public compile(sections: DependencySections): Layr {
|
||||
const sect = new Layr();
|
||||
|
||||
sect.lists = this.keyboard.layers.map((layers) => {
|
||||
sect.lists = this.keyboard3.layers.map((layers) => {
|
||||
const hardware = constants.layr_list_hardware_map.get(layers.form);
|
||||
// Already validated in validate
|
||||
const list: LayrList = {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export class LocaCompiler extends SectionCompiler {
|
|||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
const locales = this.getLocales(this.keyboard);
|
||||
const locales = this.getLocales(this.keyboard3);
|
||||
for(let tag of locales) {
|
||||
try {
|
||||
new Intl.Locale(tag);
|
||||
|
|
@ -46,7 +46,7 @@ export class LocaCompiler extends SectionCompiler {
|
|||
|
||||
// This also minimizes locales according to Remove Likely Subtags algorithm:
|
||||
// https://www.unicode.org/reports/tr35/#Likely_Subtags
|
||||
const sourceLocales = this.getLocales(this.keyboard);
|
||||
const sourceLocales = this.getLocales(this.keyboard3);
|
||||
const locales = sourceLocales.map((sourceLocale: string) => {
|
||||
const locale = new Intl.Locale(sourceLocale).minimize().toString();
|
||||
if(locale != sourceLocale) {
|
||||
|
|
|
|||
|
|
@ -90,9 +90,6 @@ export class CompilerMessages {
|
|||
|
||||
static Error_InvalidHardware = (o:{form: string}) => m(this.ERROR_InvalidHardware,
|
||||
`layers has invalid value form=${o.form}`);
|
||||
/**
|
||||
* Note: may not hit this due to XML validation.
|
||||
*/
|
||||
static ERROR_InvalidHardware = SevError | 0x0013;
|
||||
|
||||
static Error_InvalidModifier = (o:{layer: string, modifier: string}) => m(this.ERROR_InvalidModifier,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ export class MetaCompiler extends SectionCompiler {
|
|||
public validate(): boolean {
|
||||
let valid = true;
|
||||
|
||||
valid &&= this.validateNormalization(this.keyboard.info?.normalization);
|
||||
valid &&= this.validateVersion(this.keyboard.version?.number);
|
||||
valid &&= this.validateNormalization(this.keyboard3.info?.normalization);
|
||||
valid &&= this.validateVersion(this.keyboard3.version?.number);
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
|
@ -53,16 +53,16 @@ export class MetaCompiler extends SectionCompiler {
|
|||
|
||||
public compile(sections: DependencySections): Meta {
|
||||
let result = new Meta();
|
||||
result.author = sections.strs.allocString(this.keyboard.info?.author);
|
||||
result.conform = sections.strs.allocString(this.keyboard.conformsTo);
|
||||
result.layout = sections.strs.allocString(this.keyboard.info?.layout);
|
||||
result.normalization = sections.strs.allocString(this.keyboard.info?.normalization);
|
||||
result.indicator = sections.strs.allocString(this.keyboard.info?.indicator);
|
||||
result.version = sections.strs.allocString(this.keyboard.version?.number ?? "0.0.0");
|
||||
result.author = sections.strs.allocString(this.keyboard3.info?.author);
|
||||
result.conform = sections.strs.allocString(this.keyboard3.conformsTo);
|
||||
result.layout = sections.strs.allocString(this.keyboard3.info?.layout);
|
||||
result.normalization = sections.strs.allocString(this.keyboard3.info?.normalization);
|
||||
result.indicator = sections.strs.allocString(this.keyboard3.info?.indicator);
|
||||
result.version = sections.strs.allocString(this.keyboard3.version?.number ?? "0.0.0");
|
||||
result.settings =
|
||||
(this.keyboard.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) |
|
||||
(this.keyboard.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) |
|
||||
(this.keyboard.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0);
|
||||
(this.keyboard3.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) |
|
||||
(this.keyboard3.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) |
|
||||
(this.keyboard3.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ export class NameCompiler extends SectionCompiler {
|
|||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
valid = (this.keyboard.names?.name?.length ?? 0) > 0;
|
||||
valid = (this.keyboard3.names?.name?.length ?? 0) > 0;
|
||||
return valid;
|
||||
}
|
||||
|
||||
public compile(sections: DependencySections): Name {
|
||||
let result = new Name();
|
||||
result.names = this.keyboard.names?.name?.map(v => sections.strs.allocString(v.value)) ?? [];
|
||||
result.names = this.keyboard3.names?.name?.map(v => sections.strs.allocString(v.value)) ?? [];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import { SectionIdent, constants } from '@keymanapp/ldml-keyboard-constants';
|
|||
|
||||
/* istanbul ignore next */
|
||||
export class SectionCompiler {
|
||||
protected readonly keyboard: LDMLKeyboard.LKKeyboard;
|
||||
protected readonly keyboard3: LDMLKeyboard.LKKeyboard;
|
||||
protected readonly callbacks: CompilerCallbacks;
|
||||
|
||||
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks) {
|
||||
this.keyboard = source.keyboard;
|
||||
this.keyboard3 = source.keyboard3;
|
||||
this.callbacks = callbacks;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export class TouchLayoutCompiler {
|
|||
layer: []
|
||||
};
|
||||
|
||||
for(let layers of source.keyboard.layers) {
|
||||
for(let layers of source.keyboard3.layers) {
|
||||
for(let layer of layers.layer) {
|
||||
const resultLayer = this.compileHardwareLayer(source, result, layer);
|
||||
result.desktop.layer.push(resultLayer);
|
||||
|
|
@ -41,7 +41,7 @@ export class TouchLayoutCompiler {
|
|||
|
||||
const keys = row.keys.split(' ');
|
||||
for(let key of keys) {
|
||||
const keydef = source.keyboard.keys?.key?.find(x => x.id == key);
|
||||
const keydef = source.keyboard3.keys?.key?.find(x => x.id == key);
|
||||
if(keydef) {
|
||||
const fileKey: TouchLayout.TouchLayoutKey = {
|
||||
id: this.translateKeyIdentifierToTouch(keydef.id) as TouchLayout.TouchLayoutKeyId,
|
||||
|
|
@ -106,4 +106,4 @@ export class TouchLayoutCompiler {
|
|||
// Not a standard key
|
||||
return 'T_'+id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export class TransformCompiler<T extends TransformCompilerType, TranBase extends
|
|||
const reportMessage = this.callbacks.reportMessage.bind(this.callbacks);
|
||||
|
||||
let valid = true;
|
||||
const transforms = this?.keyboard?.transforms;
|
||||
const transforms = this?.keyboard3?.transforms;
|
||||
if (transforms) {
|
||||
const types : string[] = transforms.map(({type}) => type);
|
||||
if (!verifyValidAndUnique(types,
|
||||
|
|
@ -167,7 +167,7 @@ export class TransformCompiler<T extends TransformCompilerType, TranBase extends
|
|||
}
|
||||
|
||||
public compile(sections: DependencySections): TranBase {
|
||||
for(let t of this.keyboard.transforms) {
|
||||
for(let t of this.keyboard3.transforms) {
|
||||
if(t.type == this.type) {
|
||||
// compile only the transforms of the correct type
|
||||
return this.compileTransforms(sections, t);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export class VarsCompiler extends SectionCompiler {
|
|||
|
||||
private validateVars(): boolean {
|
||||
let valid = true;
|
||||
const variables = this.keyboard?.variables;
|
||||
const variables = this.keyboard3?.variables;
|
||||
|
||||
if (!variables) {
|
||||
return true; // nothing to check
|
||||
|
|
@ -152,10 +152,10 @@ export class VarsCompiler extends SectionCompiler {
|
|||
let valid = true;
|
||||
|
||||
// call our friends to validate
|
||||
valid = this.validateVarsMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = KeysCompiler.validateMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = TransformCompiler.validateMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = DispCompiler.validateMarkers(this.keyboard, mt) && valid; // accumulate validity
|
||||
valid = this.validateVarsMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
valid = KeysCompiler.validateMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
valid = TransformCompiler.validateMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
valid = DispCompiler.validateMarkers(this.keyboard3, mt) && valid; // accumulate validity
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ export class VarsCompiler extends SectionCompiler {
|
|||
public compile(sections: DependencySections): Vars {
|
||||
const result = new Vars();
|
||||
|
||||
const variables = this.keyboard?.variables;
|
||||
const variables = this.keyboard3?.variables;
|
||||
// we always have vars, it's depended on by other sections
|
||||
// we already know the variables do not conflict with each other
|
||||
// need to add these one by one, because they depend on each other.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|||
result.header.ansiFont = {...VisualKeyboard.DEFAULT_KVK_FONT};
|
||||
result.header.unicodeFont = {...VisualKeyboard.DEFAULT_KVK_FONT};
|
||||
|
||||
for(let layers of source.keyboard.layers) {
|
||||
for(let layers of source.keyboard3.layers) {
|
||||
for(let layer of layers.layer) {
|
||||
this.compileHardwareLayer(source, result, layer);
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|||
for(let key of keys) {
|
||||
x++;
|
||||
|
||||
let keydef = source.keyboard.keys?.key?.find(x => x.id == key);
|
||||
let keydef = source.keyboard3.keys?.key?.find(x => x.id == key);
|
||||
|
||||
if (!keydef) {
|
||||
throw Error(`Internal Error: could not find key id="${key}" in layer "${layer.id || '<none>'}", row "${y}"`);
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ export class VkeyCompiler extends SectionCompiler {
|
|||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
if(this.keyboard.vkeys) {
|
||||
if(this.keyboard3.vkeys) {
|
||||
let from: string[] = [], to: string[] = [];
|
||||
|
||||
this.keyboard.vkeys.vkey.forEach(vk => {
|
||||
this.keyboard3.vkeys.vkey.forEach(vk => {
|
||||
if(LdmlVkeyNames[vk.from] === undefined) {
|
||||
// TODO-LDML: When we do #7135 this may need to change back to an error.
|
||||
this.callbacks.reportMessage(CompilerMessages.Hint_VkeyIsNotValid({vkey: vk.from}));
|
||||
|
|
@ -51,12 +51,12 @@ export class VkeyCompiler extends SectionCompiler {
|
|||
|
||||
public compile(): Vkey {
|
||||
let result = new Vkey();
|
||||
if(!this.keyboard.vkeys) {
|
||||
if(!this.keyboard3.vkeys) {
|
||||
/* c8 ignore next 2 */
|
||||
return result; // not hit due to boxing
|
||||
}
|
||||
|
||||
result.vkeys = this.keyboard.vkeys?.vkey.map(vk => {
|
||||
result.vkeys = this.keyboard3.vkeys?.vkey.map(vk => {
|
||||
return {
|
||||
vkey: LdmlVkeyNames[vk.from],
|
||||
target: LdmlVkeyNames[vk.to]
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
@@keys: [K_Q][K_W][K_Q]
|
||||
@@expected: \u0127\u1790\u17B6\u0127
|
||||
-->
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<version number="1.0.0" />
|
||||
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
|
@ -65,4 +65,4 @@
|
|||
<transform from="^e" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="bksp-minimal" />
|
||||
</names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<transform from="្ម" to="" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-escaped" />
|
||||
</names>
|
||||
|
|
@ -11,4 +11,4 @@
|
|||
<display to="\u{65}" display="(e)"/>
|
||||
<displayOptions baseCharacter="\u{78}" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -10,4 +10,4 @@
|
|||
<display to="e" id="e" display="(e)"/> <!-- both to and id -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -12,4 +12,4 @@
|
|||
<display id="e" display="(e)"/> <!-- duplicate -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -12,4 +12,4 @@
|
|||
<display to="e" display="(e)"/> <!-- duplicate -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
|
|
@ -10,4 +10,4 @@
|
|||
<display display="(f)"/> <!-- Neither to nor id -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-maximal" />
|
||||
</names>
|
||||
|
|
@ -12,4 +12,4 @@
|
|||
<display to="e" display="(e)"/>
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-minimal" />
|
||||
</names>
|
||||
|
||||
<displays />
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-maximal" />
|
||||
</names>
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
<displays>
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-typical" />
|
||||
</names>
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
<displays>
|
||||
<display to="\u{0300}" display="`" />
|
||||
</displays>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="finl-minimal" />
|
||||
</names>
|
||||
|
|
@ -13,4 +13,4 @@
|
|||
<transform from="xx" to="x" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-escaped" /> <!-- see maximal.xml -->
|
||||
</names>
|
||||
|
|
@ -34,4 +34,4 @@
|
|||
<row keys="q w" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-escaped2" />
|
||||
</names>
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-gap-switch" />
|
||||
</names>
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
<row keys="q w" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
<row keys="QQQ WWW" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -14,4 +14,4 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -30,4 +30,4 @@
|
|||
<row keys="grave one two three four five six seven eight nine ten eleven minus equal" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -22,4 +22,4 @@
|
|||
<row keys="Q W" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-missing-attrs" />
|
||||
</names>
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
<row keys="Q" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-missing-flick" />
|
||||
</names>
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
<row keys="Q W" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
|
|
@ -15,4 +15,4 @@
|
|||
<row keys="foo" />
|
||||
</layer>
|
||||
</layers>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard.dtd">
|
||||
<keyboard locale="mt" conformsTo="techpreview">
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-markers" />
|
||||
</names>
|
||||
|
|
@ -24,6 +24,6 @@
|
|||
<transform from="\m{w}" to="W" /> <!-- to quell marker err -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard>
|
||||
</keyboard3>
|
||||
|
||||
<!-- you can have any output you want, as long as it's an W ! -->
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue