aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-09-26 01:09:56 +0200
committerTeddy Wing2018-09-26 01:09:56 +0200
commit16ad9788c27e9fb038aa650b19c2c9ac507a0e1d (patch)
tree32c4ad846629bd32a8d30bd7c925654141b846d7
parent593bd59487c8e759350738f2d66c66c84bf21078 (diff)
downloadDomeKey-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.m23
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];
}