How to stop typing in open scripts while playtesting game

Godot Version

4.7.2

Question

Just asking if there's a way to disable keys you are using while playtesting from being typed into scripts. It can be worked around pretty easily by switching to another tab in the editor, but it would be nice to not have to worry about it happening at all.

If you’re on Linux then that’s probably a known bug in the editor. There’s a workaround that someone here made but I can’t find the original post, essentially you can create the following script and autoload it:

extends Node

func _ready():
	if OS.has_feature("editor"):
		# Wait one frame for linux window manager
		await get_tree().process_frame
		get_window().grab_focus()