fix(core): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled

This commit is contained in:
Eberhard Beilharz 2026-03-24 12:43:11 +01:00
parent 9836070299
commit aa36cfe961
No known key found for this signature in database
GPG key ID: E9140597606020D3
2 changed files with 7 additions and 14 deletions

View file

@ -179,20 +179,13 @@ ldml_processor::process_event(
ldml_state.clear();
try {
switch (vk) {
// Currently, only one VK gets special treatment.
// Special handling for backspace VK
case KM_CORE_VKEY_BKSP:
if (vk == KM_CORE_VKEY_BKSP) {
process_backspace(ldml_state);
break;
default:
// all other VKs
if (is_key_down) {
process_key_down(ldml_state);
} else {
process_key_up(ldml_state);
}
} // end of switch
} else if (is_key_down) {
process_key_down(ldml_state);
} else {
process_key_up(ldml_state);
}
// all key-up and key-down events end up here.
// commit the ldml state into the core state
ldml_state.commit();

View file

@ -187,7 +187,7 @@ public:
* whether or not the keydown handled it internally. Therefore this
* flag exists.
*
* Only used when processing KM_CORE_VKEY_BKSP.
* Only used when processing KM_CORE_VKEY_BKSP with LDML keyboards.
*/
void set_backspace_handled_internally(bool handled) { _backspace_handled_internally = handled; }
bool backspace_handled_internally() const { return _backspace_handled_internally; }