|
|
@ -84,6 +84,15 @@
|
|
|
|
// The list of parameters as they would be passed to a call to the handler.
|
|
|
|
// The list of parameters as they would be passed to a call to the handler.
|
|
|
|
// Parameter names must match the names assigned to the call arguments.
|
|
|
|
// Parameter names must match the names assigned to the call arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define _DEPRECATED_MESSAGE_ON_KEYSWITCH_EVENT_HANDLER_V1 \
|
|
|
|
|
|
|
|
"The event handler signature\n" __NL__ \
|
|
|
|
|
|
|
|
"EventHandlerResult onKeyswitchEvent(Key &mappedKey, byte row, byte col, \n" __NL__ \
|
|
|
|
|
|
|
|
" uint8_t keyState)\n" __NL__ \
|
|
|
|
|
|
|
|
"has been deprecated. Please use the new signature\n" __NL__ \
|
|
|
|
|
|
|
|
"EventHandlerResult onKeyswitchEvent(Key &mappedKey, KeyAddr key_addr, \n" __NL__ \
|
|
|
|
|
|
|
|
" uint8_t keyState)\n" __NL__ \
|
|
|
|
|
|
|
|
"instead."
|
|
|
|
|
|
|
|
|
|
|
|
#define _FOR_EACH_EVENT_HANDLER(OPERATION, ...) __NL__ \
|
|
|
|
#define _FOR_EACH_EVENT_HANDLER(OPERATION, ...) __NL__ \
|
|
|
|
__NL__ \
|
|
|
|
__NL__ \
|
|
|
|
OPERATION(onSetup, __NL__ \
|
|
|
|
OPERATION(onSetup, __NL__ \
|
|
|
@ -100,6 +109,7 @@
|
|
|
|
_NOT_ABORTABLE, __NL__ \
|
|
|
|
_NOT_ABORTABLE, __NL__ \
|
|
|
|
(), (), ##__VA_ARGS__) __NL__ \
|
|
|
|
(), (), ##__VA_ARGS__) __NL__ \
|
|
|
|
__NL__ \
|
|
|
|
__NL__ \
|
|
|
|
|
|
|
|
/* DEPRECATED */ __NL__ \
|
|
|
|
/* Function called for every non-idle key, every cycle, so it */ __NL__ \
|
|
|
|
/* Function called for every non-idle key, every cycle, so it */ __NL__ \
|
|
|
|
/* can decide what to do with it. It can modify the key (which is */ __NL__ \
|
|
|
|
/* can decide what to do with it. It can modify the key (which is */ __NL__ \
|
|
|
|
/* passed by reference for this reason), and decide whether */ __NL__ \
|
|
|
|
/* passed by reference for this reason), and decide whether */ __NL__ \
|
|
|
@ -109,11 +119,26 @@
|
|
|
|
/* will stop processing there. */ __NL__ \
|
|
|
|
/* will stop processing there. */ __NL__ \
|
|
|
|
OPERATION(onKeyswitchEvent, __NL__ \
|
|
|
|
OPERATION(onKeyswitchEvent, __NL__ \
|
|
|
|
1, __NL__ \
|
|
|
|
1, __NL__ \
|
|
|
|
_CURRENT_IMPLEMENTATION, __NL__ \
|
|
|
|
DEPRECATED(ON_KEYSWITCH_EVENT_HANDLER_V1), __NL__ \
|
|
|
|
_ABORTABLE, __NL__ \
|
|
|
|
_ABORTABLE, __NL__ \
|
|
|
|
(Key &mappedKey, byte row, byte col, uint8_t keyState), __NL__ \
|
|
|
|
(Key &mappedKey, byte row, byte col, uint8_t keyState), __NL__ \
|
|
|
|
(mappedKey, row, col, keyState), ##__VA_ARGS__) __NL__ \
|
|
|
|
(mappedKey, row, col, keyState), ##__VA_ARGS__) __NL__ \
|
|
|
|
__NL__ \
|
|
|
|
__NL__ \
|
|
|
|
|
|
|
|
/* Function called for every non-idle key, every cycle, so it */ __NL__ \
|
|
|
|
|
|
|
|
/* can decide what to do with it. It can modify the key (which is */ __NL__ \
|
|
|
|
|
|
|
|
/* passed by reference for this reason), and decide whether */ __NL__ \
|
|
|
|
|
|
|
|
/* further handles should be tried. If it returns */ __NL__ \
|
|
|
|
|
|
|
|
/* EventHandlerResult::OK, other handlers will also get a chance */ __NL__ \
|
|
|
|
|
|
|
|
/* to react to the event. If it returns anything else, Kaleidoscope */ __NL__ \
|
|
|
|
|
|
|
|
/* will stop processing there. */ __NL__ \
|
|
|
|
|
|
|
|
OPERATION(onKeyswitchEvent, __NL__ \
|
|
|
|
|
|
|
|
2, __NL__ \
|
|
|
|
|
|
|
|
_CURRENT_IMPLEMENTATION, __NL__ \
|
|
|
|
|
|
|
|
_ABORTABLE, __NL__ \
|
|
|
|
|
|
|
|
(Key &mappedKey, KeyAddr key_addr, uint8_t keyState), __NL__ \
|
|
|
|
|
|
|
|
(mappedKey, key_addr, keyState), ##__VA_ARGS__) __NL__ \
|
|
|
|
|
|
|
|
__NL__ \
|
|
|
|
|
|
|
|
__NL__ \
|
|
|
|
/* Called by an external plugin (such as Kaleidoscope-FocusSerial) */ __NL__ \
|
|
|
|
/* Called by an external plugin (such as Kaleidoscope-FocusSerial) */ __NL__ \
|
|
|
|
/* via Kaleidoscope::onFocusEvent. This is where Focus events can */ __NL__ \
|
|
|
|
/* via Kaleidoscope::onFocusEvent. This is where Focus events can */ __NL__ \
|
|
|
|
/* be handled. The function can return EventHandlerResult::OK, and */ __NL__ \
|
|
|
|
/* be handled. The function can return EventHandlerResult::OK, and */ __NL__ \
|
|
|
@ -181,9 +206,10 @@
|
|
|
|
OP(beforeEachCycle, 1) __NL__ \
|
|
|
|
OP(beforeEachCycle, 1) __NL__ \
|
|
|
|
END(beforeEachCycle, 1) __NL__ \
|
|
|
|
END(beforeEachCycle, 1) __NL__ \
|
|
|
|
__NL__ \
|
|
|
|
__NL__ \
|
|
|
|
START(onKeyswitchEvent, 1) __NL__ \
|
|
|
|
START(onKeyswitchEvent, 1, 2) __NL__ \
|
|
|
|
OP(onKeyswitchEvent, 1) __NL__ \
|
|
|
|
OP(onKeyswitchEvent, 1) __NL__ \
|
|
|
|
END(onKeyswitchEvent, 1) __NL__ \
|
|
|
|
OP(onKeyswitchEvent, 2) __NL__ \
|
|
|
|
|
|
|
|
END(onKeyswitchEvent, 1, 2) __NL__ \
|
|
|
|
__NL__ \
|
|
|
|
__NL__ \
|
|
|
|
START(onFocusEvent, 1) __NL__ \
|
|
|
|
START(onFocusEvent, 1) __NL__ \
|
|
|
|
OP(onFocusEvent, 1) __NL__ \
|
|
|
|
OP(onFocusEvent, 1) __NL__ \
|
|
|
|