| 284 | } |
| 285 | |
| 286 | String keycode_get_v2_string(Key p_code) { |
| 287 | String codestr; |
| 288 | |
| 289 | p_code &= KeyModifierMask::CODE_MASK; |
| 290 | |
| 291 | const _KeyCodeText *kct = &_keycodes[0]; |
| 292 | |
| 293 | while (kct->text) { |
| 294 | if (kct->code == p_code) { |
| 295 | codestr += kct->text; |
| 296 | return codestr; |
| 297 | } |
| 298 | kct++; |
| 299 | } |
| 300 | // Couldn't find it in keycode mapping |
| 301 | codestr += String::chr((int)p_code); |
| 302 | |
| 303 | return codestr; |
| 304 | } |
| 305 | |
| 306 | String get_v2_string_from_iek(Ref<InputEventKey> iek) { |
| 307 | return keycode_get_v2_string(iek->get_keycode()); |
no outgoing calls
no test coverage detected