Is_key_pressed (KEY_Z) not working for HTML5 export ONLY (Shift + KeyZ works, though...?)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CoryParsnipson

Hi,

I’m exporting my first game demo (pong) and I can’t move one of my paddles. The left paddle, player 1, is controlled by pressing KEY_A to go up and KEY_Z to go down. This works perfectly in the Godot preview.

When I export it to HTML5, the Z key is “broken” and no longer responds. But if I hold down left shift and then press Z, it works normally.

Here’s the relevant code imo:

func _process(delta):
	if disabled:
		return
	if Input.is_key_pressed(action_up) && !disable_control_up:
		velocity.y = clamp(min(velocity.y, -0.4) * 13, -max_speed, 0)	
	elif Input.is_key_pressed(action_down) && !disable_control_down:
		velocity.y = clamp(max(velocity.y, 0.4) * 13, 0, max_speed)
	else:
		velocity.y /= 1.1
		if (position.y > lower_bound.y && position.y < upper_bound.y && !disable_control_up && !disable_control_down):
			hitting_side = false

And in my Player1 instance, I overwrite exported “action_down” variable to 90 (KEY_Z) in the editor…

I don’t know what where to look…

Also, please let me know if I should post any more information. Thanks!

:bust_in_silhouette: Reply From: CoryParsnipson

I found out the problem by accident…

I was viewing with Google Chrome and I had a VIM extension on which had a shortcut mapped to the “Z” key, so it was being blocked that way. Everything actually works fine…

Sorry for the spam!