mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-26 10:17:41 +00:00
chore(common/web): Merge branch 'master' into test/common/web/types/9052-unit-tests-element-string
This commit is contained in:
commit
98dbdca164
16 changed files with 125 additions and 50 deletions
11
HISTORY.md
11
HISTORY.md
|
|
@ -1,5 +1,16 @@
|
|||
# Keyman Version History
|
||||
|
||||
## 18.0.164 alpha 2025-01-08
|
||||
|
||||
* fix(windows): add language and close button fit inside pop-window (#12855)
|
||||
* chore(windows): add bcp47 code and tips to diagnostic (#12843)
|
||||
* fix(android/engine): Cleanup KMManager API keys and calls (#12861)
|
||||
* docs(developer,mac): add playable video links to the help documentation (#12828)
|
||||
|
||||
## 18.0.163 alpha 2025-01-06
|
||||
|
||||
* docs: clarify that sections in KMX file might not be aligned (#12856)
|
||||
|
||||
## 18.0.162 alpha 2024-12-19
|
||||
|
||||
* fix(mac): standardize interaction between OSK and physical keyboard (#12836)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
18.0.163
|
||||
18.0.165
|
||||
|
|
@ -241,11 +241,11 @@ function enableSuggestions(model, suggestionType) {
|
|||
[true, true, false], // 2 = SuggestionType.PREDICTIONS_WITH_CORRECTIONS
|
||||
[true, true, true], // 3 = SuggestionType.PREDICTIONS_WITH_AUTO_CORRECT
|
||||
];
|
||||
const t = suggestionSettings[suggestionType]
|
||||
const t = suggestionSettings[suggestionType]
|
||||
? suggestionSettings[suggestionType] : suggestionSettings[0];
|
||||
keyman.core.languageProcessor.mayPredict = t[0];
|
||||
keyman.core.languageProcessor.maySuggest = t[1];
|
||||
// keyman.core.languageProcessor.mayAutoCorrect = t[2];
|
||||
keyman.core.languageProcessor.mayAutoCorrect = t[2];
|
||||
|
||||
registerModel(model);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ public final class KMManager {
|
|||
|
||||
public final static String predictionPrefSuffix = ".mayPredict";
|
||||
public final static String correctionPrefSuffix = ".mayCorrect";
|
||||
public final static String autoCorrectionPrefSuffix = ".mayAutoCorect";
|
||||
public final static String autoCorrectionPrefSuffix = ".mayAutoCorrect";
|
||||
|
||||
// Special override for when the keyboard may have haptic feedback when typing.
|
||||
// haptic feedback disabled for hardware keystrokes
|
||||
|
|
@ -305,11 +305,6 @@ public final class KMManager {
|
|||
public static final String KMKey_LexicalModelVersion = "lmVersion";
|
||||
public static final String KMKey_LexicalModelPackageFilename = "kmpPackageFilename";
|
||||
|
||||
// DEPRECATED keys
|
||||
public static final String KMKey_CustomKeyboard = "CustomKeyboard";
|
||||
public static final String KMKey_CustomModel = "CustomModel";
|
||||
public static final String KMKey_HelpLink = "helpLink";
|
||||
|
||||
// Keyman internal keys
|
||||
protected static final String KMKey_ShouldShowHelpBubble = "ShouldShowHelpBubble";
|
||||
|
||||
|
|
@ -1714,26 +1709,6 @@ public final class KMManager {
|
|||
return KeyboardPickerActivity.addKeyboard(context, keyboardInfo);
|
||||
}
|
||||
|
||||
// Intend to deprecate in Keyman 15.0
|
||||
public static boolean addKeyboard(Context context, HashMap<String, String> keyboardInfo) {
|
||||
String packageID = keyboardInfo.get(KMManager.KMKey_PackageID);
|
||||
String keyboardID = keyboardInfo.get(KMManager.KMKey_KeyboardID);
|
||||
String keyboardName = keyboardInfo.get(KMManager.KMKey_KeyboardName);
|
||||
String languageID = keyboardInfo.get(KMManager.KMKey_LanguageID);
|
||||
String languageName = keyboardInfo.get(KMManager.KMKey_LanguageName);
|
||||
String version = keyboardInfo.get(KMManager.KMKey_KeyboardVersion);
|
||||
String helpLink = keyboardInfo.get(KMManager.KMKey_CustomHelpLink);
|
||||
String kmpLink = MapCompat.getOrDefault(keyboardInfo, KMManager.KMKey_KMPLink, "");
|
||||
String font = keyboardInfo.get(KMManager.KMKey_Font);
|
||||
String oskFont = keyboardInfo.get(KMManager.KMKey_OskFont);
|
||||
boolean isNewKeyboard = true;
|
||||
|
||||
Keyboard k = new Keyboard(packageID, keyboardID, keyboardName,
|
||||
languageID, languageName, version, helpLink, kmpLink,
|
||||
isNewKeyboard, font, oskFont);
|
||||
return addKeyboard(context, k);
|
||||
}
|
||||
|
||||
public static boolean removeKeyboard(Context context, int position) {
|
||||
return KeyboardPickerActivity.removeKeyboard(context, position);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ public class KMManagerTest {
|
|||
HashMap<String, String> kmInfo = new HashMap<String, String>();
|
||||
kmInfo.put(KMManager.KMKey_PackageID, "khmer_angkor");
|
||||
kmInfo.put(KMManager.KMKey_KeyboardID, "khmer_angkor");
|
||||
kmInfo.put(KMManager.KMKey_CustomKeyboard, "Y");
|
||||
kmInfo.put(KMManager.KMKey_LanguageID, "km");
|
||||
kmInfo.put(KMManager.KMKey_KeyboardName, "Khmer Angkor");
|
||||
kmInfo.put(KMManager.KMKey_LanguageName, "Central Khmer");
|
||||
|
|
|
|||
|
|
@ -66,7 +66,21 @@ public class FunctionalTestHelper {
|
|||
|
||||
Assert.assertEquals(installedKbds.size(),1);
|
||||
|
||||
KMManager.addKeyboard(ApplicationProvider.getApplicationContext(),(HashMap<String, String>) installedKbds.get(0));
|
||||
HashMap<String, String> map = (HashMap<String, String>)installedKbds.get(0);
|
||||
Keyboard keyboard = new Keyboard(
|
||||
map.get(KMManager.KMKey_PackageID),
|
||||
map.get(KMManager.KMKey_KeyboardID),
|
||||
map.get(KMManager.KMKey_KeyboardName),
|
||||
map.get(KMManager.KMKey_LanguageID),
|
||||
map.get(KMManager.KMKey_LanguageName),
|
||||
map.get(KMManager.KMKey_KeyboardVersion),
|
||||
map.get(KMManager.KMKey_CustomHelpLink),
|
||||
map.get(KMManager.KMKey_KMPLink),
|
||||
true,
|
||||
null,
|
||||
null
|
||||
);
|
||||
KMManager.addKeyboard(ApplicationProvider.getApplicationContext(), keyboard);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ Linux.
|
|||
There are two core applications included in Keyman Developer: the Keyman
|
||||
Developer IDE (formerly called TIKE), and the command line compiler kmc.
|
||||
|
||||
[Watch a video](https://youtu.be/kwhgx_eX4Es) that highlights some of
|
||||
the Keyman Developer features.
|
||||
Watch a video that highlights some of the Keyman Developer 14.0 features (57:23)
|
||||
|
||||
:<img class="video-thumbnail" data-video="https://www.youtube.com/embed/kwhgx_eX4Es" src="https://img.youtube.com/vi/kwhgx_eX4Es/maxresdefault.jpg" width="600px" alt="Keyman Developer 14.0 Webinar">
|
||||
|
||||
## Keyman Developer IDE
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,14 @@ source files.
|
|||
zeroed. Note that `COMP_KEYBOARD_KMXPLUS` must follow immediately after
|
||||
`COMP_KEYBOARD` with no empty space (that is at byte offset 64).
|
||||
|
||||
A .kmx file is essentially a 32-bit memory mapped file. In a 32-bit process, the
|
||||
A .kmx file is essentially a 32-bit memory mapped file, however there is
|
||||
no guarantee that all sections start at a 32-bit boundary.
|
||||
In a 32-bit process on architectures that use flexible alignment, the
|
||||
file can be loaded into a memory buffer, and (assuming the file is valid), all
|
||||
offset values in the file can be rewritten into pointers by adding the base of
|
||||
the memory buffer to them. (In a 64-bit process, a fixup is needed to make space
|
||||
for 64-bit pointers.)
|
||||
the memory buffer to them. (In a 64-bit process or on architectures that
|
||||
use strict alignment (like emscripten), a fixup is needed to make space
|
||||
for aligned pointers.)
|
||||
|
||||
## `COMP_KEYBOARD`: KMX header
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ You must have a Keyman keyboard installed to type with Keyman for macOS in your
|
|||
|
||||
Here's how to download and install a Keyman keyboard within Keyman for macOS:
|
||||
|
||||
[ Watch Video](https://youtu.be/VirHygx8iqg) for installing the Khmer Angkor keyboard for Keyman for macOS.
|
||||
 Watch this video for installing the Khmer Angkor keyboard for Keyman for macOS (0:51)
|
||||
|
||||
:<img class="video-thumbnail" data-video="https://www.youtube.com/embed/VirHygx8iqg" src="https://img.youtube.com/vi/VirHygx8iqg/maxresdefault.jpg" width="600px" alt="Tutorial: Install Khmer Angkor Keyboard on Keyman for macOS">
|
||||
|
||||
1. Choose Keyman from the Input menu in the menu bar.
|
||||
2. Open Keyman Configuration, from the Configuration link under Keyman in the Input menu.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ title: Install Keyman for macOS
|
|||
*Keyman for macOS* is available for [download](https://keyman.com/mac/download) as a standard
|
||||
Apple Disk Image (.dmg) file. It should be installed according to the following instructions.
|
||||
|
||||
[ Watch Video](https://youtu.be/7Ax71QeUNfo)
|
||||
 Watch Video (0:33)
|
||||
|
||||
:<img class="video-thumbnail" data-video="https://www.youtube.com/embed/7Ax71QeUNfo" src="https://img.youtube.com/vi/7Ax71QeUNfo/maxresdefault.jpg" width="600px" alt="Tutorial: Install Keyman for macOS">
|
||||
|
||||
1. Double click the DMG file to open it in Finder.
|
||||
2. Double click the **Install Keyman** icon to open the Keyman installer.
|
||||
|
|
|
|||
|
|
@ -71,4 +71,6 @@ export interface LanguageProcessorSpec extends EventEmitter<LanguageProcessorEve
|
|||
applyReversion(reversion: LexicalModelTypes.Reversion, outputTarget: OutputTarget): Promise<LexicalModelTypes.Suggestion[]>;
|
||||
|
||||
get wordbreaksAfterSuggestions(): boolean;
|
||||
|
||||
get mayAutoCorrect(): boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ export default class PredictionContext extends EventEmitter<PredictionContextEve
|
|||
this.keepSuggestion = s as Keep;
|
||||
}
|
||||
|
||||
if(s.autoAccept && !this.selected) {
|
||||
if (this.langProcessor.mayAutoCorrect && s.autoAccept && !this.selected) {
|
||||
this.selected = s;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export class LanguageProcessor extends EventEmitter<LanguageProcessorEventMap> {
|
|||
|
||||
private _mayPredict: boolean = true;
|
||||
private _mayCorrect: boolean = true;
|
||||
private _mayAutoCorrect: boolean = false; // initialized to false - #12767
|
||||
|
||||
private _state: StateChangeEnum = 'inactive';
|
||||
|
||||
|
|
@ -402,6 +403,14 @@ export class LanguageProcessor extends EventEmitter<LanguageProcessorEventMap> {
|
|||
this._mayCorrect = flag;
|
||||
}
|
||||
|
||||
public get mayAutoCorrect() {
|
||||
return this._mayAutoCorrect;
|
||||
}
|
||||
|
||||
public set mayAutoCorrect(flag: boolean) {
|
||||
this._mayAutoCorrect = flag;
|
||||
}
|
||||
|
||||
public get wordbreaksAfterSuggestions() {
|
||||
return this.configuration.wordbreaksAfterSuggestions;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -614,6 +614,7 @@ table tr
|
|||
{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 200px;
|
||||
gap: 4px;
|
||||
}
|
||||
.list_languages_title
|
||||
|
|
@ -622,6 +623,11 @@ table tr
|
|||
}
|
||||
|
||||
/* keyboard languages */
|
||||
.keyboard_language_list
|
||||
{
|
||||
flex-grow:1
|
||||
}
|
||||
|
||||
.keyboard_language
|
||||
{
|
||||
display: flex;
|
||||
|
|
@ -1199,10 +1205,8 @@ th
|
|||
}
|
||||
|
||||
.list_languages_add {
|
||||
padding-top: 10px;
|
||||
position: fixed;
|
||||
top: 223px; /* Have to use fixed position can't use flex or grid inside a fixed child */
|
||||
right: 281px;
|
||||
padding-bottom: 10px;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.modify .keyboard_language {
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@
|
|||
|
||||
<div class="list_languages">
|
||||
<div class="popup_header"><xsl:value-of select="$locale/string[@name='S_Languages_Addremove']"/></div>
|
||||
<div>
|
||||
<div class="keyboard_language_list">
|
||||
<xsl:apply-templates select="KeymanKeyboardLanguagesInstalled/KeymanKeyboardLanguageInstalled[isinstalled]">
|
||||
<xsl:with-param name="modify">1</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,38 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<h1>User Profile Options</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Languages</th>
|
||||
<th>ShowAutoCorrection</th>
|
||||
<th>ShowTextPrediction</th>
|
||||
<th>ShowCasing</th>
|
||||
<th>ShowShiftLock</th>
|
||||
<th>InputMethodOverride</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates select="//Key[@Path='HKEY_CURRENT_USER\Control Panel\International\User Profile']/Value"/>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h1>BCP47 Codes</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>BCP47 Code</th>
|
||||
<th>Transient LangId</th>
|
||||
<th>Cached Language Name</th>
|
||||
<th>{LangID}:{Keyboard Layout ID}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates select="//Key[@Path='HKEY_CURRENT_USER\Control Panel\International\User Profile']/Key"/>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h1>Windows Keyboard Hotkeys</h1>
|
||||
<table>
|
||||
<thead>
|
||||
|
|
@ -88,7 +120,7 @@
|
|||
<td><xsl:value-of select="Value[@Name='Layout File' or @Name='layout file']/@Value"/></td>
|
||||
<td><xsl:value-of select="Value[@Name='Layout Text' or @Name='layout text']/@Value"/></td>
|
||||
<td><xsl:if test="Value[@Name='keyman install' or @Name='Keyman Install']">Keyman system shadow keyboard</xsl:if></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
<xsl:template match="//Locale">
|
||||
<tr>
|
||||
|
|
@ -96,9 +128,9 @@
|
|||
<td><xsl:value-of select="@Name"/></td>
|
||||
<td><xsl:value-of select="@Country"/></td>
|
||||
<td><xsl:value-of select="@Flags"/></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="//Key[@Path='HKEY_CURRENT_USER\keyboard layout\Toggle']/Value">
|
||||
<tr>
|
||||
<td><xsl:value-of select="@Name"/></td>
|
||||
|
|
@ -114,6 +146,27 @@
|
|||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="//Key[@Path='HKEY_CURRENT_USER\Control Panel\International\User Profile']/Value">
|
||||
<tr>
|
||||
<td><xsl:value-of select="@Name"/></td>
|
||||
<td><xsl:value-of select="@Value"/></td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="//Key[@Path='HKEY_CURRENT_USER\Control Panel\International\User Profile']/Key">
|
||||
<tr>
|
||||
<td><xsl:value-of select="substring-after(@Path, 'User Profile\')"/></td>
|
||||
<td><xsl:value-of select="Value[@Name='TransientLangId']/@Value"/></td>
|
||||
<td><xsl:value-of select="Value[@Name='CachedLanguageName']/@Value"/></td>
|
||||
<td>
|
||||
<xsl:for-each select="Value[contains('0123456789', substring(@Name,1,1))]">
|
||||
<xsl:value-of select="@Name"/>
|
||||
<xsl:if test="position() != last()">, </xsl:if>
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="//Key[@Path='HKEY_CURRENT_USER\keyboard layout\Preload']/Value">
|
||||
<xsl:variable name="LanguageID">0000<xsl:value-of select="substring(@Value,5,4)"/></xsl:variable>
|
||||
<xsl:variable name="KeyboardID">
|
||||
|
|
@ -125,7 +178,7 @@
|
|||
<xsl:variable name="KeyboardRegistryKey" select="//Key[translate(@Path,$uppercase,$lowercase)=translate(concat('HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\keyboard layouts\',$KeyboardID),$uppercase,$lowercase)]"/>
|
||||
<xsl:variable name="KeyboardName" select="$KeyboardRegistryKey/Value[translate(@Name,$uppercase,$lowercase)='layout text']/@Value" />
|
||||
<xsl:variable name="Language" select="//Locale[@ID=$LanguageID]" />
|
||||
|
||||
|
||||
<xsl:variable name="LayoutFile" select="$KeyboardRegistryKey/Value[translate(@Name,$uppercase,$lowercase)='layout file']/@Value" />
|
||||
<xsl:variable name="LayoutID" select="$KeyboardRegistryKey/Value[translate(@Name,$uppercase,$lowercase)='layout id']/@Value" />
|
||||
|
||||
|
|
@ -166,7 +219,7 @@
|
|||
<xsl:otherwise>No</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue