### Godot version

Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

Ctrl+Shift+F (Find in Files) in the text editor, for example, causes my laptop to freeze consistently. I also reproduced it with F1 and Ctrl+Shift+R, as well as by using the dropdown instead of shortcuts.

### Steps to reproduce

Trivial

### Minimal reproduction project

N/A
}
	if (keycode == Key::NONE) {
		keycode = (Key)physical_keycode;
	}
	
	
	
	
	
	Ref<InputEventKey> k;
	k.instantiate();
	k->set_window_id(p_window);
	_get_key_modifier_state(xkeyevent->state, k);
	
	
	
	
	
	if (xkeyevent->type != KeyPress) {
		p_echo = false;
		
		
		if (p_event_index + 1 < p_events.size()) {
			XEvent &peek_event = p_events[p_event_index + 1];
			
			
			
			
			
#define ABSDIFF(x, y) (((x) < (y)) ? ((y) - (x)) : ((x) - (y)))