Can a horizontal scrollbar in ScrollBarContainer be controlled with the keyboard?

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

I’d like for the scroll bar to move left when left is pressed and right when right is pressed. How can I make that happen?

:bust_in_silhouette: Reply From: John97

This works, but may not be the most efficient.

func _process(_delta):
	if self.visible == true:
		if Input.is_action_pressed("ui_right") == true:
			*path to scrollbox container*.set_h_scroll(*path to scrollbox container.get_h_scroll() + 20)
		if Input.is_action_pressed("ui_left") == true:
			*path to scrollbox container*.set_h_scroll(*path to scrollbox container.get_h_scroll() - 20)