main/main.c
void handle_keystate_update_internally(uint8_t keyState, void (*symbol_handler)(symbol_t input))
{
  static bool is_shifted = false;
  static bool is_numsymed = false;

  display_timeout_last_activity = xTaskGetTickCount();
  symbol_t symbol = keymap[keyState][is_numsymed ? 6 : (is_shifted? 4 : 5)];

  switch (symbol) {
    case MOD_LSHIFT:
      is_shifted = !is_shifted;
      //is_numsymed = false;
      return;
    case MOD_RSHIFT:
      is_shifted = !is_shifted;
      //is_numsymed = false;
      return;
    case MODE_NUM:
      //is_shifted = false;
      is_numsymed = true;
      return;
    default:
      (*symbol_handler)(symbol);
      is_shifted = false;
      is_numsymed = false;
  }
}
/* Redirector, so that the core logic (shifted not shifted) can be managed
 * centrally:
 */
Redirector, so that the core logic (shifted not shifted) can be managed
centrally.
Redirector so that the core logic ( shifted not shifted ) can be managed centrally .
void handle_keystate_update_internally(uint8_t keyState, void (*symbol_handler)(symbol_t input))
{
  static bool is_shifted = false;
  static bool is_numsymed = false;
  display_timeout_last_activity = xTaskGetTickCount();
  symbol_t symbol = keymap[keyState][is_numsymed ? 6 : (is_shifted? 4 : 5)];
  switch (symbol) {
    case MOD_LSHIFT:
      is_shifted = !is_shifted;
      return;
    case MOD_RSHIFT:
      is_shifted = !is_shifted;
      return;
    case MODE_NUM:
      is_numsymed = true;
      return;
    default:
      (*symbol_handler)(symbol);
      is_shifted = false;
      is_numsymed = false;
  }
}
void handle_keystate_update_internally ( uint8_t keyState , void ( * symbol_handler ) ( symbol_t input ) ) { static bool is_shifted = false ; static bool is_numsymed = false ; display_timeout_last_activity = xTaskGetTickCount ( ) ; symbol_t symbol = keymap [ keyState ] [ is_numsymed ? 6 : ( is_shifted ? 4 : 5 ) ] ; switch ( symbol ) { case MOD_LSHIFT : is_shifted = ! is_shifted ; return ; case MOD_RSHIFT : is_shifted = ! is_shifted ; return ; case MODE_NUM : is_numsymed = true ; return ; default : ( * symbol_handler ) ( symbol ) ; is_shifted = false ; is_numsymed = false ; } }
Redirector, so that the core logic (shifted not shifted) can be managed
 centrally:
Redirector so that the core logic ( shifted not shifted ) can be managed centrally :
//is_numsymed = false; //is_numsymed = false; //is_shifted = false;