1

I looked up ways to bind keys to commands in minecraft, but came up empty. I would like to bind a key in a command block that gives the effect "levitation 255" so you would press a key and glide for a few seconds. I am not looking forward to getting mods for this.

New contributor
Mochi is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

There is no way to do this in Vanilla Minecraft, except by having the command in the clipboard and quickly pressing the command key, Ctrl+V and Enter. You can also select it from the command history using the up and down arrow keys.

Directly binding to commands is only possible with mods or with third party software (like keyboard automation programs that do what I suggested, but very fast, or something that inputs commands for you on a server).

Not the answer you're looking for? Browse other questions tagged or ask your own question.