When you type a tilde ~ into chat or into a command block, the game will be unable to be interacted with until you click it again, almost as if it becomes unfocused, but repeatedly doing this and clicking the window will not allow you to interact with the game and the only option is to close it.
Related issues
is duplicated by
Comments

i am trying to recreate this bug,
10 times of typing ~1,
1=>game is fine
0=>game is died
(using EN-US keyboard layout,win7,java8)
operations:
1.singleplayermode
2.create world
3.type "~1" in the input box
result:
0101010101

well,it is work like this
whenever you type ~,in the input box
you must type ~ again to leave the frozen state

Do you have Discord open? The Discord overlay key is also the "~".

I don't get how this is invalid. There are still many people who have this problem, including me, so this bug should not be marked as invalid

confirmed in 1.13 pre release 7

This is caused by third-party software. Not something Mojang can fix.

I only had this issue on Prerelease 8 that I'm aware of. I didn't even think of Discord. When I saw I had Discord processes running, I killed them and it restored proper behavior. I'll see about altering the discord ~ key.

This is happening in 1.13 official. If you type a tilde ~ anywhere in any chat box, command, etc. It locks the controls...no mouse or keyboard possible and you have to abort the game process and restart. Nothing but pure vanilla.
***EDIT: Verified that this is caused by Discord running in background.
Typing tildes isn't a problem for me at all (using EN-US keyboard layout). Which keyboard layout do you use?