public StateInteractive key_typed(char p_key_char){
  StateInteractive curr_return_state=this;
  if (Character.isDigit(p_key_char)) {
    BrdLayerStructure layer_structure=r_brd.layer_structure;
    int digit=Character.digit(p_key_char,10);
    digit=Math.min(digit,layer_structure.signal_layer_count());
    digit=Math.max(digit - 1,0);
    BrdLayer new_layer=layer_structure.get_signal_layer(digit);
    digit=layer_structure.get_no(new_layer);
    if (digit >= 0) {
      change_layer_action(digit);
    }
  }
 else   if (p_key_char == '+') {
    BrdLayerStructure layer_structure=r_brd.layer_structure;
    int current_layer_no=i_brd.itera_settings.layer_no;
    for (; ; ) {
      ++current_layer_no;
      if (current_layer_no >= layer_structure.size() || layer_structure.is_signal(current_layer_no)) {
        break;
      }
    }
    if (current_layer_no < layer_structure.size()) {
      change_layer_action(current_layer_no);
    }
  }
 else   if (p_key_char == '-') {
    board.BrdLayerStructure layer_structure=r_brd.layer_structure;
    int current_layer_no=i_brd.itera_settings.layer_no;
    for (; ; ) {
      --current_layer_no;
      if (current_layer_no < 0 || layer_structure.is_signal(current_layer_no)) {
        break;
      }
    }
    if (current_layer_no >= 0) {
      change_layer_action(current_layer_no);
    }
  }
 else {
    curr_return_state=super.key_typed(p_key_char);
  }
  return curr_return_state;
}

public StateInteractive key_typed ( char p_key_char ) { StateInteractive curr_return_state = this ; if ( Character . isDigit ( p_key_char ) ) { BrdLayerStructure layer_structure = r_brd . layer_structure ; int digit = Character . digit ( p_key_char , 10 ) ; digit = Math . min ( digit , layer_structure . signal_layer_count ( ) ) ; digit = Math . max ( digit - 1 , 0 ) ; BrdLayer new_layer = layer_structure . get_signal_layer ( digit ) ; digit = layer_structure . get_no ( new_layer ) ; if ( digit >= 0 ) { change_layer_action ( digit ) ; } } else if ( p_key_char == '+' ) { BrdLayerStructure layer_structure = r_brd . layer_structure ; int current_layer_no = i_brd . itera_settings . layer_no ; for ( ; ; ) { ++ current_layer_no ; if ( current_layer_no >= layer_structure . size ( ) || layer_structure . is_signal ( current_layer_no ) ) { break ; } } if ( current_layer_no < layer_structure . size ( ) ) { change_layer_action ( current_layer_no ) ; } } else if ( p_key_char == '-' ) { board . BrdLayerStructure layer_structure = r_brd . layer_structure ; int current_layer_no = i_brd . itera_settings . layer_no ; for ( ; ; ) { -- current_layer_no ; if ( current_layer_no < 0 || layer_structure . is_signal ( current_layer_no ) ) { break ; } } if ( current_layer_no >= 0 ) { change_layer_action ( current_layer_no ) ; } } else { curr_return_state = super . key_typed ( p_key_char ) ; } return curr_return_state ; }
action to be taken when a key is pressed ( shortcut ) .
