MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / keycode_get_v2_string

Function keycode_get_v2_string

compat/input_event_parser_v2.cpp:286–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286String 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
306String get_v2_string_from_iek(Ref<InputEventKey> iek) {
307 return keycode_get_v2_string(iek->get_keycode());

Callers 1

get_v2_string_from_iekFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected