diff options
| author | Teddy Wing | 2018-09-26 01:09:56 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-09-26 01:09:56 +0200 | 
| commit | 16ad9788c27e9fb038aa650b19c2c9ac507a0e1d (patch) | |
| tree | 32c4ad846629bd32a8d30bd7c925654141b846d7 | |
| parent | 593bd59487c8e759350738f2d66c66c84bf21078 (diff) | |
| download | DomeKey-16ad9788c27e9fb038aa650b19c2c9ac507a0e1d.tar.bz2 | |
HeadphoneKey(runAction): Get rid of keyboard simulation
Delete the code that simulates key presses from map actions. Also delete
the mode saving code and the unused `cleanup` label.
Simulating key presses is now handled by the Rust library using the
'autopilot' crate. It felt easier that way to handle all types of key
presses.
| -rw-r--r-- | DomeKey/HeadphoneKey.m | 23 | 
1 files changed, 0 insertions, 23 deletions
| diff --git a/DomeKey/HeadphoneKey.m b/DomeKey/HeadphoneKey.m index 44fd4e6..eff43c6 100644 --- a/DomeKey/HeadphoneKey.m +++ b/DomeKey/HeadphoneKey.m @@ -83,29 +83,6 @@      const CKeyActionResult *result = c_run_key_action(_state, trigger, _in_mode); -//    if ([self maybeSwitchToMode:result]) { -//        goto cleanup; -//    } - -    if (result->kind) { -        if (*result->kind == ActionKind_Map) { -            const char *c = result->action; -            int i = 0; -            while (*c) { -                [KeyboardSimulator simpleKeyPressWithKey:result->action[i]]; -                i++; -                *c++; -            } -        } -        else if (*result->kind == ActionKind_Mode) { -//            [self maybeSwitchToMode:result]; -            // _in_mode = malloc(sizeof(Trigger)) -            // *_in_mode = *result->in_mode; -//            memcpy(_in_mode, result->in_mode, sizeof(const Trigger)); -        } -    } - -cleanup:      [_key_buffer removeAllObjects];  } | 
