mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-19 06:47:41 +00:00
fix(core): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
This commit is contained in:
parent
9836070299
commit
aa36cfe961
2 changed files with 7 additions and 14 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue