mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-09 07:27:29 +00:00
Merge pull request #7256 from keymanapp/fix/windows/tsf-app-bksp-delete-smp-cherrypick
fix(windows): TSF apps delete all of smp 🍒
This commit is contained in:
commit
66c6dae7ec
1 changed files with 11 additions and 2 deletions
|
|
@ -30,8 +30,17 @@ static BOOL processAlert(AITIP* app) {
|
|||
static BOOL processBack(AITIP* app, const km_kbp_action_item* actionItem) {
|
||||
if (actionItem->backspace.expected_type == KM_KBP_BT_MARKER) {
|
||||
app->QueueAction(QIT_BACK, BK_DEADKEY);
|
||||
} else /* actionItem->backspace.expected_type == KM_KBP_BT_CHAR, KM_KBP_BT_UNKNOWN */ {
|
||||
app->QueueAction(QIT_BACK, 0);
|
||||
} else if(actionItem->backspace.expected_type == KM_KBP_BT_CHAR) {
|
||||
// If this is a TSF-aware app we need to set the BK_SURROGATE flag to delete
|
||||
// both parts of the surrogate pair. Legacy apps receive a BKSP WM_KEYDOWN event
|
||||
// which results in deleting both parts in one action.
|
||||
if (!app->IsLegacy() && Uni_IsSMP(actionItem->backspace.expected_value)) {
|
||||
app->QueueAction(QIT_BACK, BK_DEFAULT | BK_SURROGATE);
|
||||
} else {
|
||||
app->QueueAction(QIT_BACK, BK_DEFAULT);
|
||||
}
|
||||
} else { // KM_KBP_BT_UNKNOWN
|
||||
app->QueueAction(QIT_BACK, BK_DEFAULT);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue