This commit is contained in:
2026-03-02 20:20:28 +08:00
parent a68fb9657f
commit fb6db0649c
11 changed files with 143 additions and 29 deletions

View File

@@ -17,6 +17,7 @@
#import "KBKeyboardSubscriptionView.h"
#import "KBLocalizationManager.h"
#import "KBSkinManager.h"
#import "KBSkinInstallBridge.h"
#import "KBSuggestionEngine.h"
#import "KBKeyboardLayoutResolver.h"
#import <SDWebImage/SDWebImage.h>
@@ -254,10 +255,9 @@ static NSString *KBFormatMB(uint64_t bytes) {
- (void)kb_checkAndApplyLayoutIfNeeded {
NSString *currentProfileId = [[KBKeyboardLayoutResolver sharedResolver] currentProfileId];
if (currentProfileId.length == 0) {
currentProfileId = @"en_US_qwerty"; // 退
currentProfileId = @"en_US_qwerty";
}
// profileId
if ([currentProfileId isEqualToString:_kb_lastLoadedProfileId]) {
return;
}
@@ -265,16 +265,20 @@ static NSString *KBFormatMB(uint64_t bytes) {
NSLog(@"[KeyboardViewController] Detected profileId change: %@ -> %@", _kb_lastLoadedProfileId, currentProfileId);
_kb_lastLoadedProfileId = currentProfileId;
// KBKeyBoardMainView
if (self.keyBoardMainView && [self.keyBoardMainView respondsToSelector:@selector(reloadLayoutWithProfileId:)]) {
[self.keyBoardMainView performSelector:@selector(reloadLayoutWithProfileId:) withObject:currentProfileId];
}
//
NSString *suggestionEngine = [[KBKeyboardLayoutResolver sharedResolver] suggestionEngineForProfileId:currentProfileId];
if (suggestionEngine.length > 0) {
[self kb_updateSuggestionEngineType:suggestionEngine];
}
NSString *languageCode = [[KBKeyboardLayoutResolver sharedResolver] currentLanguageCode];
if (languageCode.length > 0) {
NSLog(@"[KeyboardViewController] Reloading skin icon map for language: %@", languageCode);
[KBSkinInstallBridge reloadCurrentSkinIconMapForLanguageCode:languageCode];
}
}
- (void)kb_updateSuggestionEngineType:(NSString *)engineType {

View File

@@ -97,9 +97,11 @@
"letter_l_upper" = "key_l_up";
/* 字母 ñ(小写)- 西班牙语专用 */
"letter_ñ_lower" = "key_n_tilde";
"letter_ñ_lower" = "key_ñ";
/* 字母 Ñ(大写)- 西班牙语专用 */
"letter_ñ_upper" = "key_n_tilde_up";
"letter_ñ_upper" = "key_ñ_up";
/* 字母 ñ(基础映射) */
"letter_ñ" = "key_ñ";
/* 字母 z小写 */
"letter_z_lower" = "key_z";