[Keymap] Drashna Mouse keys and oled updates (#16556)

This commit is contained in:
Drashna Jaelre 2022-03-06 22:12:17 -08:00 committed by GitHub
parent d8971d707e
commit ff6c70415c
Failed to generate hash of commit
37 changed files with 776 additions and 465 deletions

View file

@ -57,7 +57,7 @@ void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiato
void watchdog_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) { watchdog_ping_done = true; }
#endif
#ifdef OLED_ENABLE
#ifdef CUSTOM_OLED_DRIVER
# include "oled/oled_stuff.h"
void keylogger_string_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
if (initiator2target_buffer_size == OLED_KEYLOGGER_LENGTH) {
@ -71,7 +71,7 @@ void keyboard_post_init_transport_sync(void) {
transaction_register_rpc(RPC_ID_USER_STATE_SYNC, user_state_sync);
transaction_register_rpc(RPC_ID_USER_KEYMAP_SYNC, user_keymap_sync);
transaction_register_rpc(RPC_ID_USER_CONFIG_SYNC, user_config_sync);
#ifdef OLED_ENABLE
#ifdef CUSTOM_OLED_DRIVER
transaction_register_rpc(RPC_ID_USER_KEYLOG_STR, keylogger_string_sync);
#endif
@ -92,7 +92,7 @@ void user_transport_update(void) {
user_state.audio_enable = is_audio_on();
user_state.audio_clicky_enable = is_clicky_on();
#endif
#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
#if defined(CUSTOM_POINTING_DEVICE)
user_state.tap_toggling = tap_toggling;
#endif
#ifdef UNICODE_COMMON_ENABLE
@ -111,7 +111,7 @@ void user_transport_update(void) {
#ifdef UNICODE_COMMON_ENABLE
unicode_config.input_mode = user_state.unicode_mode;
#endif
#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
#if defined(CUSTOM_POINTING_DEVICE)
tap_toggling = user_state.tap_toggling;
#endif
#ifdef SWAP_HANDS_ENABLE
@ -127,7 +127,7 @@ void user_transport_sync(void) {
static uint16_t last_keymap = 0;
static uint32_t last_config = 0, last_sync[4], last_user_state = 0;
bool needs_sync = false;
#ifdef OLED_ENABLE
#ifdef CUSTOM_OLED_DRIVER
static char keylog_temp[OLED_KEYLOGGER_LENGTH] = {0};
#endif
@ -187,7 +187,7 @@ void user_transport_sync(void) {
needs_sync = false;
}
#ifdef OLED_ENABLE
#ifdef CUSTOM_OLED_DRIVER
// Check if the state values are different
if (memcmp(&keylog_str, &keylog_temp, OLED_KEYLOGGER_LENGTH)) {
needs_sync = true;