diff options
Diffstat (limited to 'core/globals.cpp')
-rw-r--r-- | core/globals.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/globals.cpp b/core/globals.cpp index 5be53fd853..94fa331bed 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -566,9 +566,11 @@ static Variant _decode_variant(const String& p_string) { ERR_FAIL_COND_V(params.size()!=1 && params.size()!=2,Variant()); int scode=0; - if (params[0].is_numeric()) + if (params[0].is_numeric()) { scode=params[0].to_int(); - else + if (scode<10) + scode+=KEY_0; + } else scode=find_keycode(params[0]); InputEvent ie; |