### Godot version

 Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

![image](https://user-images.githubusercontent.com/85438892/214476911-0ce83a43-b959-4b13-88fd-d6b9af0cd63a.png)

### Steps to reproduce

Open any script

### Minimal reproduction project

N/A
}
	if (xkeyevent->type == KeyPress && wd.xic) {
		Status status;
#ifdef X_HAVE_UTF8_STRING
		int utf8len = 8;
		char *utf8string = (char *)memalloc(sizeof(char) * utf8len);
		int utf8bytes = Xutf8LookupString(wd.xic, xkeyevent, utf8string,
				utf8len - 1, &keysym_unicode, &status);
		if (status == XBufferOverflow) {
			utf8len = utf8bytes + 1;
			utf8string = (char *)memrealloc(utf8string, utf8len);
			utf8bytes = Xutf8LookupString(wd.xic, xkeyevent, utf8string,
					utf8len - 1, &keysym_unicode, &status);
		}
		utf8string[utf8bytes] = '\0';
		if (status == XLookupChars) {
			bool keypress = xkeyevent->type == KeyPress;
			Key keycode = KeyMappingX11::get_keycode(keysym_keycode);
			Key physical_keycode = KeyMappingX11::get_scancode(xkeyevent->keycode);
			if (keycode >= Key::A + 32 && keycode <= Key::Z + 32) {
				keycode -= 'a' - 'A';
			}
			String tmp;
			tmp.parse_utf8(utf8string, utf8bytes);
			for (int i = 0; i < tmp.length(); i++) {
				Ref<InputEventKey> k;
				k.instantiate();
				if (physical_keycode == Key::NONE && keycode == Key::NONE && tmp[i] == 0) {
					continue;
				}