How to make a button press (ctrl) change a variable

I am attempting to make a slam feature where the player gets pushed to the ground if you press ctrl, here’s the very basic code so far. (i dabble on and off and its been probably 3 months since I even opened godot)

@export_category(“MovementParameters”)
@export var jump_peak_time : float = .5
@export var jump_fall_time: float = .5
@export var jump_height: float = 2
@export var jump_distance: float = 4
var default_speed: float = 12.5
var sprint_speed = 300
var jump_velocity: float = 5
var fall_gravity: float = 18

I want to change the var “fall_gravity” to 50 or so (gotta tweak the number once its working) so that they fall quicker, giving the illusion of being pushed down

I suggest you to look up how Input in Godot works, as there are a couple of ways you can do that. See this article which describes the examples:

In case you have any issues converting these examples to your project - let me know.